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

    KyleAF

    08/04/2021, 11:18 PM
    I am! I haven't switched over to the newer method yet
  • i

    ifox

    08/04/2021, 11:19 PM
    Can you share the part where you define that block in there?
  • k

    KyleAF

    08/04/2021, 11:19 PM
    So I'm not sure if my first attempt at creating a block with gallery as the title, somehow used the stub code instead and the cache is hiding somewwhere
  • k

    KyleAF

    08/04/2021, 11:19 PM
    Can do
  • k

    KyleAF

    08/04/2021, 11:19 PM
    Copy code
    'gallery2' => [
                    'title' => 'Gallery',
                    'icon' => 'image',
                    'component' => 'a17-block-gallery2',
                    'group' => 'page'
                ],
  • k

    KyleAF

    08/04/2021, 11:21 PM
    It might also be worth noting that this seems to have started after I did a recent twill:blocks command (I know I don't need to do that anymore, but I was having a cache issue with twill and trying ways to fix it)
  • i

    ifox

    08/04/2021, 11:22 PM
    ha interesting, did you run a build after that? Which version are you on?
  • k

    KyleAF

    08/04/2021, 11:23 PM
    Oh, whoops! It was twill:build, not :blocks. Umm.. let me check
  • k

    KyleAF

    08/04/2021, 11:23 PM
    Looks like I'm still on 2.x-dev
  • i

    ifox

    08/04/2021, 11:24 PM
    assuming you're on a recent version and not using custom Vue blocks you don't need to build so I would try doing
    php artisan twill:update
    and make sure you don't have a
    gallery
    block blade file in the blocks folder. For the 500 error, are you using custom blocks views mapping by any chance? That could explain gallery2 trying to load site.blocks.gallery
  • i

    ifox

    08/04/2021, 11:26 PM
    oh my bad the conflict with gallery is coming from the one that ships with twill I see
  • i

    ifox

    08/04/2021, 11:26 PM
    i mean if you're using gallery2 it should not
  • k

    KyleAF

    08/04/2021, 11:28 PM
    Just double checked that I have no gallery block in the admin.blocks folder, as well as the site.blocks folder. Also just tired twill:update (it ran successfully), but still seeing the rouge built-in block code 😢
  • i

    ifox

    08/04/2021, 11:31 PM
    So weird, sorry you're running into that. When you said you're on 2.x-dev, which commit exactly? Trying to understand if you're using pre or post the new blocks implementation
  • k

    KyleAF

    08/04/2021, 11:31 PM
    Just tried something else: I changed the title from
    'title' => 'Gallery',
    to
    'title' => 'Gallery 2'
    , and now it shows up as "Gallery 2" in the Add Content button, but when I select it it's still the code with the stub code in it! Very bizzare, lol
  • k

    KyleAF

    08/04/2021, 11:31 PM
    To be honest, I'm not sure how to check which commit 😆
  • i

    ifox

    08/04/2021, 11:32 PM
    yeah it's reading your php config but loading the wrong Vue template/component for that block
  • i

    ifox

    08/04/2021, 11:32 PM
    in your composer.lock file
  • k

    KyleAF

    08/04/2021, 11:33 PM
    Looks like https://api.github.com/repos/area17/twill/zipball/a5b3ffc20ab7826bff6825f28982444e7272537d
  • i

    ifox

    08/04/2021, 11:36 PM
    ok so you're on the new implementation, which could explain a lot. I will give your config a try tomorrow. we tried to account for both approaches but you might be facing an outlier for some reason.
  • i

    ifox

    08/04/2021, 11:37 PM
    I'd try using the new approach, no config, just those blade directives at the top
  • k

    KyleAF

    08/04/2021, 11:38 PM
    Am I able to use a mix of both (so testing on just the gallery block, and the config for the other blocks)?
  • i

    ifox

    08/04/2021, 11:38 PM
    yes
  • k

    KyleAF

    08/04/2021, 11:38 PM
    sweet!
  • k

    KyleAF

    08/04/2021, 11:38 PM
    Alright, I appreciate the help! I'll report back how it works out
  • k

    KyleAF

    08/04/2021, 11:57 PM
    Alright, removing it from config and putting
    Copy code
    @twillBlockTitle('Gallery 2')
    @twillBlockIcon('slideshow')
    @twillBlockGroup('page')
    into the admin block fixed it!
  • k

    KyleAF

    08/04/2021, 11:59 PM
    In case you do end up looking into this: I also had this same issue with a "Quote" block and "Image" block that I didn't mention for brevity's sake, just FYI. I'll do this same fix for them as well.
  • k

    KyleAF

    08/04/2021, 11:59 PM
    Thanks again for the help!
  • p

    Philipp Grimm

    08/05/2021, 7:31 AM
    hi, I´m new to twill and I´m trying to validate the required field of e repeater in a block in the backend. Has anybody a hint for me how to do this ?
  • i

    ifox

    08/05/2021, 9:17 AM
    Hi @Philipp Grimm you mean in the FormRequest class, correct?
1...727374...484Latest