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

    Shiftless

    08/02/2022, 11:13 AM
    so i figured it out, it does not work. i think the better approach would be to leave formData as it is and make the rules capable to use dot annotation and Asterisks logic if no language is set by the user. as of now it is not possible to make rules for just one language.
  • l

    leftblank

    08/02/2022, 11:31 AM
    Hey all - trying to update from 2.8.6 to 2.8.8, and in one of my controllers, collections returned by calls to
    getRelated
    seem to causing issues when being converted to json, either using
    toJson
    or returning it from the controller action to the page template - i'm getting max execution time timeouts where i wasn't before. has something changed with this update?
  • k

    kalle

    08/02/2022, 11:47 AM
    Hey, its deff possible that changes in 2.8.8 affect this since this method is updated per changelog of 2.8.8. You can explore this first feature and check if something affects your codebase.
  • l

    leftblank

    08/02/2022, 11:48 AM
    Okay cheers, will take a look 👍
  • l

    leftblank

    08/02/2022, 12:18 PM
    I'm no PHP expert, but it looks like the addition of a
    A17\Twill\Models\RelatedItem
    in the relations of one of the collection's models is breaking the collection's
    toJson
    method for me
  • l

    leftblank

    08/02/2022, 12:18 PM
    Does anyone have any suggestions?
  • m

    mateoD

    08/02/2022, 12:19 PM
    hello , trying to display image in list return this link on inspect element
  • m

    mateoD

    08/02/2022, 12:20 PM
    Do you know where this problem could come from?
  • l

    leftblank

    08/02/2022, 12:24 PM
    Could it be something to do with the relations being circularly referenced?
  • l

    leftblank

    08/02/2022, 12:24 PM
    I can see that the parent's
    RelatedItem
    has its own
    related
    field, which points back to the parent
  • l

    leftblank

    08/02/2022, 12:28 PM
    Which would explain why I was getting max timeouts.
  • l

    leftblank

    08/02/2022, 1:29 PM
    I've worked around the issue by unsetting the pivot relation using
    $page->getRelated('type')->each->unsetRelation('pivot')
    , and the collection now converts to JSON correctly again
  • i

    ifox

    08/02/2022, 1:59 PM
    good catch @leftblank
  • i

    ifox

    08/02/2022, 2:00 PM
    it's depending on many things Twill doesn't really control: web server config, Laravel app url config, Laravel trust proxies middleware etc...
  • i

    ifox

    08/02/2022, 2:00 PM
    most likely it doesn't find an image with role cover and crop desktop
  • i

    ifox

    08/02/2022, 2:01 PM
    Does that correspond to what you're using in your model?
  • m

    mateoD

    08/02/2022, 2:20 PM
    thanks @ifox i fixed it by adding the role name 'image' as my crop
  • m

    mateoD

    08/02/2022, 2:40 PM
    @ifox i want to put seo in my page how can i fix it to show this form
  • i

    ifox

    08/02/2022, 2:57 PM
    What do you mean how can I fix it?
  • i

    ifox

    08/02/2022, 2:57 PM
    Are you asking how to use these fields in your frontend?
  • m

    mateoD

    08/02/2022, 3:00 PM
    i have this script in my form in blade and seo inputs does not appear
  • m

    mateoD

    08/02/2022, 3:01 PM
    do I need to do any other configuration? ?
  • i

    ifox

    08/02/2022, 3:02 PM
    is the package correctly installed? We're not the maintainers of it so I don't know of the top of my head, I'd recommend reading their readme again to see if you've missed anything
  • m

    mateoD

    08/02/2022, 3:08 PM
    Thanks
  • o

    onepiece

    08/03/2022, 10:30 AM
    hello everyone .Im trying to add blocks to the model but its does not appear in the admin dashboard. My block: @twillBlockTitle('Stiki') @twillBlockIcon('edit') @formField('input', [ 'name' => 'title', 'label' => 'Title', 'maxlength' => 200, 'translated' => true ]) My blade model: @formField('block_editor', [ 'label' => 'Aggiungi contenuto', 'blocks' => ['stiki'] ]) and in my model i add : use A17\Twill\Models\Behaviors\HasBlocks; and in my repository model i add : use A17\Twill\Repositories\Behaviors\HandleBlocks; Any help?
  • i

    ifox

    08/03/2022, 10:33 AM
    Hi @onepiece, do you see the field at all? What about if you don't specify a list of blocks?
  • o

    onepiece

    08/03/2022, 10:36 AM
    It doesn't bother me at all
  • o

    onepiece

    08/03/2022, 10:37 AM
    if i dont specify a list of blocks this appears :
  • o

    onepiece

    08/03/2022, 12:31 PM
    i have a different error now
  • o

    onepiece

    08/03/2022, 12:31 PM
    Route [admin.pages.browser] not defined. (View: C:\xampp\htdocs\Baboon\baboon\vendor\area17\twill\views\partials\form\_browser.blade.php) (View: C:\xampp\htdocs\Baboon\baboon\vendor\area17\twill\views\partials\form\_browser.blade.php) (View: C:\xampp\htdocs\Baboon\baboon\vendor\area17\twill\views\partials\form\_browser.blade.php) (View: C:\xampp\htdocs\Baboon\baboon\vendor\area17\twill\views\partials\form\_browser.blade.php)
1...368369370...484Latest