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

    ifox

    01/29/2023, 2:34 AM
    that would need to be done in the Uploader.vue component but I'm not even sure it is possible because it is made to work with S3 providers accepting a signed request
  • i

    ifox

    01/29/2023, 2:35 AM
    what you could do is use the local endpoint type with a disk configured on contabo
  • i

    ifox

    01/29/2023, 2:37 AM
    it will go through your Laravel app so uploads will be a bit slower that's it
  • a

    amargoCactus

    01/29/2023, 3:10 AM
    If I change to MinIO it will work well?
  • a

    amargoCactus

    01/29/2023, 3:10 AM
    The media library upload will work?
  • i

    ifox

    01/29/2023, 10:47 AM
    yes minio works fine
  • a

    amargoCactus

    01/29/2023, 7:05 PM
    I installed MinIO, is working now lol
  • a

    amargoCactus

    01/29/2023, 7:05 PM
    Thanks
  • e

    Erwin

    01/30/2023, 11:30 AM
    I'm using a repeater inside of a block, the block is called "news-showcase" and this is the code:
    Copy code
    @twillBlockTitle('News showcase')
    @twillBlockIcon('text')
    @twillBlockGroup('app')
    
    @formField('input', [
        'name' => 'title',
        'label' => 'Title',
    ])
    
    @formField('repeater', ['type' => 'news-showcase-item'])
    This is my repeater item code:
    Copy code
    @twillRepeaterTitle('news-showcase-item')
    @twillRepeaterTitleField('news-showcase-item', ['hidePrefix' => true])
    @twillRepeaterTrigger('Add card')
    @twillRepeaterGroup('app')
    
    @formField('medias', [
        'name' => 'image',
        'label' => 'Image',
        'note' => 'Persoon foto',
    ])
    
    @formField('input', [
        'name' => 'name',
        'label' => 'Naam',
    ])
    
    @formField('input', [
        'name' => 'description',
        'label' => 'Beschrijving',
        'maxlength' => 250,
        'type' => 'textarea',
        'rows' => 3,
    ])
    
    @formField('input', [
        'name' => 'link',
        'label' => 'Link',
        'maxlength' => 60,
    ])
    When i save my page it stores the item in the blocks table 2 times, one time with the right child_key (news-showcase-item) and one with with a strage child_key (blocks-185_news-showcase-item). When i edit something in the repeater item and save my page again it removes te repeater item in the blocks table with the right child_key and leaves the strange child_key. Resulting in the repeater item being removed in the twill admin view... Is this a known problem or am i doing something wrong?
  • i

    ifox

    01/30/2023, 11:32 AM
    hi @Erwin which Twill version are you on? I don't think this is related at all but one thing I'm noticing in your repeater is
    @twillRepeaterTitleField('news-showcase-item', ['hidePrefix' => true])
    which should probably be
    @twillRepeaterTitleField('name', ['hidePrefix' => true])
    instead, as there are no
    news-showcase-item
    field in the repeater.
  • e

    Erwin

    01/30/2023, 11:41 AM
    Im using this Twill version: "area17/twill": "^2.0"
  • e

    Erwin

    01/30/2023, 11:43 AM
    you're right about that btw, thanks!
  • e

    Erwin

    01/30/2023, 11:44 AM
    This is how it stores
  • i

    ifox

    01/30/2023, 11:51 AM
    @Erwin that's your composer requirement but that's not telling which version you are actually on. You can check in the footer of the CMS or in your composer lock file.
  • e

    Erwin

    01/30/2023, 11:51 AM
    Ah my bad, Version 2.10.0
  • i

    ifox

    01/30/2023, 11:52 AM
    thanks! if you can try to update and see if the bug is resolved that'd help
  • e

    Erwin

    01/30/2023, 11:56 AM
    Would you recommend me updating to version 2.12.4?
  • i

    ifox

    01/30/2023, 11:56 AM
    yes
  • e

    Erwin

    01/30/2023, 12:02 PM
    I've updated to version 2.12.4 and the problem still persists, the weird thing is that i am not getting this problem with the previous repeaters that i've created. only if i make a new one
  • i

    ifox

    01/30/2023, 12:06 PM
    ok thank you, we'll look into it. the ones that already exist have an id in db so it is not mixing them up like the new ones you create
  • h

    Harings Rob

    01/30/2023, 12:07 PM
    It sounds like the names are somehow the same.
  • h

    Harings Rob

    01/30/2023, 12:07 PM
    can you send a db screenshot?
  • j

    jefsev

    01/30/2023, 6:59 PM
    Hi, is it possible to get a variable into a block when using renderBlocks or renderNamedBlocks. The file is accessible in de $page obj. i tried some things to get it into the rendered block but no luck ye
  • h

    Harings Rob

    01/30/2023, 7:08 PM
    hey @jefsev if you are on twill 3 check the $renderData object in your block.
  • h

    Harings Rob

    01/30/2023, 7:09 PM
    $renderData->model
    should give you the model in which the block is being renderd.
  • j

    jefsev

    01/30/2023, 8:00 PM
    Ah not yet on twill 3
  • e

    elkex

    01/31/2023, 6:08 PM
    I have a medias field inside a repeater and I also declared its crop at the twill config file > block_editor > crops section.. However, it will not save the image I selected to the field..
  • i

    ifox

    01/31/2023, 6:13 PM
    Is it a JSON repeater?
  • e

    elkex

    01/31/2023, 6:13 PM
    Yes, just a video repeater
  • i

    ifox

    01/31/2023, 6:13 PM
    if it is, they do not support media fields, you need a model with HasMedias to save the repeater items into
1...455456457...484Latest