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

    jefsev

    10/03/2022, 9:00 AM
    Thx man! 😄
  • j

    jefsev

    10/03/2022, 3:10 PM
    Another Q 😄 I have a multilingual site, i followed the steps in de docs on twill.io . frontend everything works create but in de twill CMS the permalink is not the correct one, it is with the module prefix instead of the translated ones from /resources/lang/en/routes.php . Probably need to change it for the admin somewhere else but i cannot find it.
  • i

    ifox

    10/03/2022, 4:50 PM
    Hi @jefsev you'd need to implement
    getLocalizedPermalinkBase
    in the controller
  • i

    ifox

    10/03/2022, 4:51 PM
    https://twill.io/docs/crud-modules/controllers.html#localizing-the-permalink
  • j

    jefsev

    10/04/2022, 7:23 AM
    Thx ifox! 😄
  • d

    dedli

    10/04/2022, 7:17 PM
    Hi guys ) I have multilang site. Is it possible to use the one slug for all langs version?
  • t

    tfilos

    10/04/2022, 7:47 PM
    Hey! So I am sure I am missing something... Client asked me in 11th hour to get rid of a relation and replace it with a single text field --- I've taken the relation browser out of the module admin form, removed any reference to the relation (including $with) in the model. It seems to be still looking for the relation and I can't figure out why. Maybe some Twill level caching that isn't being touched by optimize:clear? I checked the stack trace and grepped for anything but there doesn't seem to be any reference left. I even truncated the model table in question. The image is what I was getting when I'd try to edit one of the models. It complains about the relation not existing when I create something new, from the Controller store() in BaseModuleController. Any thoughts on if there is some kind of caching situation here, etc?
  • i

    ifox

    10/04/2022, 11:21 PM
    @tfilos did you remove it from the repository class?
  • i

    ifox

    10/04/2022, 11:21 PM
    was it in a block?
  • t

    tfilos

    10/04/2022, 11:23 PM
    It's not in a block, but not only did I not remove it from the repository class, I also left in a filter method referring to said relation... Hopefully this is the momentum I needed to remember that the repository layer exists
  • t

    tfilos

    10/04/2022, 11:23 PM
    I got tripped up because the repository class isn't showing up in the stack trace
  • t

    tfilos

    10/04/2022, 11:24 PM
    That was the problem though, thanks for the reminder
  • i

    ifox

    10/04/2022, 11:24 PM
    👍
  • g

    ghostbane

    10/05/2022, 7:00 AM
    I'm looking at the
    afterDelete()
    in the ModuleRepository. Whenever I delete an item, it goes to the trash and triggers
    afterDelete()
    1) Is there a separate hook that can be called whenever an item gets destroyed from the Trash folder? Or is it the same hook? If so, can we tell the difference on runtime? 2) Is there a way to remove the Trash functionality and straight up hard delete items? Couldn't find anything in the docs. I'm 2.8 btw. Thank you.
    i
    • 2
    • 14
  • s

    savchuk.ivan

    10/05/2022, 11:14 AM
    Good afternoon friends! Can you tell me how to correctly check fields from blocks? In the folder with the name of the blocks there is a file test.blade.php It has a title and a description field. Created App/Twill/Block TestBlock I add the following code: public $rulesForTranslatedFields = [ 'header_block' => 'required', ]; If the block was not saved, then the check will work, but if there was a save and then clear the fields, and then try to save again, then the check will not work and the field will be saved.
  • h

    Harings Rob

    10/05/2022, 11:39 AM
    hey @savchuk.ivan it should work with this https://twill.io/docs/block-editor/validating-blocks.html#blade-directive
  • h

    Harings Rob

    10/05/2022, 11:40 AM
    I think you can remove softDeletes trait? also perhaps you can disable delete and just leave forcedelete https://twill.io/docs/crud-modules/controllers.html
  • i

    ifox

    10/05/2022, 11:42 AM
    afterDestroy hook
  • s

    savchuk.ivan

    10/05/2022, 11:59 AM
    return $this->rulesForTranslatedFields
  • m

    Mentally

    10/06/2022, 7:46 AM
    Hello, I created a new user. Set up the email and pass in TW, but I can't access CMS admin. When I visit mypage/admin nothing happens. Using twill in laravel 9. I would like to give you more info but i don't have any. Thank you for any help that may have arisen.
  • h

    Harings Rob

    10/06/2022, 8:11 AM
    Hey, do you see the login screen or not even that?
  • m

    Mentally

    10/06/2022, 8:14 AM
    No, the only thing I see is 404 | NOT FOUND
  • h

    Harings Rob

    10/06/2022, 8:20 AM
    Did you setup the .env so that it uses /admin?
  • m

    Mentally

    10/06/2022, 8:27 AM
    I did not set up anything in the env related to twill. How can I attempt to do that?
  • h

    Harings Rob

    10/06/2022, 8:30 AM
    There is some documentation on how to install here: https://twill.io/docs/getting-started/installation.html#env
  • m

    Mentally

    10/06/2022, 8:31 AM
    Thank you for pointing me in the right direction.
  • d

    dedli

    10/06/2022, 10:21 AM
    Hi. Is it possible to set same slug for all language version? Or I should use $page->getSlug('uk') for desired slug version? Thanks
  • h

    Hip-Hop

    10/06/2022, 11:31 AM
    Good afternoon! How to access a block field to validate it? The template is in the blocks/company/about folder
  • b

    BA7YA

    10/06/2022, 11:50 AM
    Hi guys. I have exact the same problem as here https://github.com/area17/twill/issues/1730 . Do you have any updates about it?
    i
    m
    • 3
    • 4
  • i

    ifox

    10/06/2022, 12:27 PM
    Duplicate nested module
1...411412413...484Latest