https://twill.io logo
Join Discord
Powered by
# ❓questions
  • f

    FoxThe3rd

    06/10/2021, 6:23 AM
    hi, no i did not try a browser field, because i just need a simple select field. Thanks for the suggestion
  • f

    FoxThe3rd

    06/10/2021, 6:24 AM
    Hi, thank you I will try the suggestion!
  • r

    Rayderxx

    06/10/2021, 6:28 AM
    @User yep my bad didn't notice that you wanted a select
  • r

    Rayderxx

    06/10/2021, 6:39 AM
    @User in my case I don't really like to call model in a view so I use Service or a Component and inject it in the block
  • u

    user

    06/10/2021, 7:56 AM
    Is there documentation about the Capsules?
  • i

    ifox

    06/10/2021, 7:57 AM
    https://github.com/area17/twill/pull/729
  • i

    ifox

    06/10/2021, 7:57 AM
    not yet, but this PR should help
  • f

    FoxThe3rd

    06/10/2021, 8:15 AM
    yeah, i ended up creating a BlockAdminViewService which I inject in the view/admin/form.blade thanks for your help!
  • a

    Andrej

    06/11/2021, 7:52 AM
    Hi guys, do you know what's going on with the
    memoizedTranslations
    property in the HasTranslation trait? If I create a Model which uses this trait over
    Model::create([...])
    the
    Model::create([...])->memoizedTranslations
    is an empty collection instead of
    null
    . This leads to
    Model::create([...])->hasActiveTranslations()
    to return
    false
    .
  • i

    ibes

    06/11/2021, 3:12 PM
    I am interested if there is a way to extend Twill I would like to use input[type=url] which is not available In the docs I find no information about extending Twill. Is there material about that?
  • i

    ifox

    06/11/2021, 3:50 PM
    most extensibility comes from Laravel features
  • i

    ifox

    06/11/2021, 3:50 PM
    so if you want to add support for url type in the input field you could override the blade view
  • i

    ifox

    06/11/2021, 3:51 PM
    and if your change needs customization in the vue components, that should be documented
  • i

    ibes

    06/11/2021, 4:00 PM
    I am new to Laravel. I imagine the blade view you are talking about is bundled in the twill package and I will need to find the right template, check the path, put a template with the same path in my views folder and that Laravel will pick that instead of Twills? (I am open for just being forwarded to the Laravel documentation it the answer to my question is just very basic Laravel stuff)
  • i

    ifox

    06/11/2021, 4:07 PM
    That's correct. You can also publish all Twill views to your codebase.
  • i

    ifox

    06/11/2021, 4:08 PM
    https://laravel-news.com/vendorpublish
  • b

    Bibo

    06/12/2021, 8:34 PM
    Languages Always show active even it is not in database Hello Every One, I wish A great day for all of you I am stuck in a strange problem in Twill's Admin panel, I wish if there any one could help me solving it, I made a multi-language content website using Twill, on the local server everything works perfect, once I transferred the source code to the live server, all languages shows on active state even they are not in the database. I checked from vue dev tools everything looks fine, no errors showing. if there anybody who can give any recommendation, I will be thankful for that
  • i

    ifox

    06/12/2021, 8:40 PM
    Hi @Bibo hard to say but looks like something must be different between your 2 environments. Are you using the same db? does it work if you don't import your dev content and create new content from the server?
  • b

    Bibo

    06/12/2021, 8:47 PM
    At the beginning I had the same exact thought, I made sure all files are identical between local and live server, and yes it works perfect on the live server I can make all CRUD actions and save it in the database. the strange part, for example I made English only active and other 3 languages (ES, IT, FR) Inactive, when I save everything works very well, when I refresh the page it shows again the languages are active. From vue dev tools I check the state of the languages it shows it the correct way, English : published: 1, others published 0 I think there might be a something missing on the server side!! any recommendations on how to debug this?
  • i

    ifox

    06/12/2021, 8:49 PM
    Ha, ok. the state in Vue dev tools after the reload is like that? Or before reloading?
  • b

    Bibo

    06/12/2021, 8:54 PM
    This state when I open The page, It is not supposed to show The 4 languages as published
  • b

    Bibo

    06/12/2021, 8:55 PM
    Then Again I turned off the 3 languages, the vue state changed like that, but when I refresh it turn back again to the first screen shot
  • i

    ifox

    06/12/2021, 9:03 PM
    ok so something's going on with casting/encoding
  • b

    Bibo

    06/12/2021, 9:04 PM
    BTW The same exact problem also is happening in showing published / drafts on the model index page, I can unpublish a page and it save correctly but on table it shows always as published, I tried the same code on a different server it works perfect without any problems, I am 100% sure that the server is producing this issue, but I am not able to findout from where should I start tracing, Is it something related to servers php modules or ...
  • i

    ifox

    06/12/2021, 9:07 PM
    https://github.com/area17/twill/issues/180#issuecomment-488178448
  • i

    ifox

    06/12/2021, 9:07 PM
    check this thread
  • i

    ifox

    06/12/2021, 9:07 PM
    what db and version are you using locally and on the server?
  • b

    Bibo

    06/12/2021, 9:17 PM
    I am using MySQL 8 on the local machine, I am checking what is the live server database version on the server ....
  • b

    Bibo

    06/12/2021, 10:06 PM
    Sorry for being very late on replying that, I contacted the cs of the server finally, they are using mysql v5.7 while I use mysql 8 on the local machine, I think this is the reason why casting/encoding cannot happen properly ...
  • b

    Bibo

    06/12/2021, 11:12 PM
    I have checked on another server using mysql v5.7 it works fine, I checked also the database collate for both local server and the live one they are identical : Collate utf8_mb4_unicode_ci, so since it works on a server with mysql 5.7 it means that it is nothing else than the db version
1...252627...484Latest