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

    Daniel Ravenshorst

    06/18/2021, 8:49 AM
    Hello everybody, We are using Twill since version 1.2 Now I have updated it to 2.4 but I can't get the repeaters to work anymore. I have migrated all deprecated configs and moved it to the view with annotations. The problem is that the
    trigger
    button is not rendered. It will render the form if that page has already some data with repeaters, but with new pages I cant get the repeater form to render because the trigger button isn't there. While debugging in vue-devtools I found that the
    computed
    ->
    blockType
    is always empty. Also the
    availableBlocks
    is empty. So the trigger button in
    Repeater.vue
    uses:
    v-if="hasRemainingBlocks && blockType.trigger"
    , so I think this is the issue, but don't know how to fix. Any advice how to fix this?
  • d

    Daniel Ravenshorst

    06/18/2021, 8:49 AM
    I have created a new block with a repeater, for testing purpose:
    blocks/test_parent.blade.php
    Copy code
    blade
    @twillBlockTitle('Test parent')
    @twillBlockIcon('text')
    
    @formField('repeater', ['type' => 'test_child'])
    repeaters/test_child.blade.php
    Copy code
    blade
    @twillRepeaterTitle('Test child')
    @twillRepeaterTrigger('Add test child')
    
    @formField('input', [
        'name' => 'title',
        'label' => 'Title'
    ])
  • i

    ifox

    06/18/2021, 9:04 AM
    Hi @Daniel Ravenshorst, I'll give your snippets a try
  • d

    Daniel Ravenshorst

    06/18/2021, 9:12 AM
    Hi @User, thanks a lot
  • i

    ifox

    06/18/2021, 10:24 AM
    @Daniel Ravenshorst I've been exploring using https://phpsandbox.io/ for a while to support the community with quick shareable sandboxes, and it's really starting to be possible. They recently shipped 4.0 and there are very few issues remaining when installing Twill in there (like media library uploads and some cors issues in embeds). So for your use case this work great, here's a sandbox with your blocks configuration: CMS: https://pc34e.ciroue.com/admin/posts Credentials:
    daniel@daniel.test
    /
    daniel
    Sandbox: https://phpsandbox.io/n/shiny-surf-mppe-pc34e Not sure what's happening for you, as this is working great in this fresh application. Make sure you updated your Twill assets using
    php artisan twill:update
    or
    php artisan twill:build
    if you're using custom Vue components.
  • m

    Mitchell Smith

    06/18/2021, 1:40 PM
    does anyone have any suggestions on how I can use a different set of ENV keys for my S3 data for Twill?
  • m

    Mitchell Smith

    06/18/2021, 1:41 PM
    I already am using spatie's media library with AWS, I was wondering if I could override the ENV key name that pulls the S3 info into Twill so I don't have duplicate keys in my ENV file
  • i

    ifox

    06/18/2021, 1:57 PM
    https://github.com/area17/twill/blob/8066ad159798b778be9e36cbbeb3ddbd3b12bf70/config/disks.php#L19
  • i

    ifox

    06/18/2021, 1:58 PM
    you can use a bunch of different env keys for S3 in Twill
  • m

    Mitchell Smith

    06/18/2021, 2:01 PM
    oh I noticed the AWS_KEY but not the 3rd one, those are the same as the spatie ones! awesome
  • i

    ifox

    06/18/2021, 2:02 PM
    nice
  • m

    Mitchell Smith

    06/18/2021, 2:02 PM
    thanks
  • m

    Mitchell Smith

    06/18/2021, 2:20 PM
    I just started up my twill app and I'm following the basic tutorial but when I try to create a new Page it just says CSRF token mismatch
  • i

    ifox

    06/18/2021, 2:21 PM
    that's probably due to laravel config, did you start from a fresh laravel app?
  • u

    user

    06/18/2021, 2:21 PM
    Hello there!
  • u

    user

    06/18/2021, 2:22 PM
    I've just installed a blank Laravel project (latest version) and I've got a bit of an issue while setting up Twill
  • u

    user

    06/18/2021, 2:22 PM
    I'm unable to create a superadmin account, I've tried using both
    php artisan twill:install
    and
    php artisan twill:superadmin
    but I keep getting the instant 'Aborted' message.
  • u

    user

    06/18/2021, 2:23 PM
    I'm on Windows 10(x64)
  • m

    Mitchell Smith

    06/18/2021, 2:23 PM
    it's not a fresh app, no
  • u

    user

    06/18/2021, 2:29 PM
    Right, found a fix if anyone else encounters the same problem:
    Copy code
    php artisan twill:superadmin myemail@mydomain.com
    and you will get prompted with password input.
  • m

    Mitchell Smith

    06/18/2021, 2:35 PM
    how would I go about diagnosing this issue? it's not a fresh app but if this is a known issue with Twill what is the fix?
  • m

    Mitchell Smith

    06/18/2021, 2:37 PM
    ah looks like clearing some caches etc. fixed it
  • i

    ifox

    06/18/2021, 2:41 PM
    sounds like you are dealing with another issue though if artisan commands are failing
  • m

    Mitchell Smith

    06/18/2021, 2:43 PM
    does the block editor come with any built-in blocks?
  • i

    ifox

    06/18/2021, 2:44 PM
    there are 2 by default (text and image), but it's really meant for you to have full control
  • i

    ifox

    06/18/2021, 2:44 PM
    you can compose any form fields in a block
  • i

    ifox

    06/18/2021, 2:44 PM
    and nest repeaters in blocks
  • m

    Mitchell Smith

    06/18/2021, 2:44 PM
    well text and image are great but I don't see them in my editor.. I used the -B option when creating my module
  • i

    ifox

    06/18/2021, 2:45 PM
    did you add the
    block_editor
    form field to your form view?
  • m

    Mitchell Smith

    06/18/2021, 2:45 PM
    no but the block editor button is there
1...272829...484Latest