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

    valhalla14

    07/13/2022, 6:25 AM
    Hi, im trying to add a custom role and followed the guide. https://twill.io/docs/user-management/#roles All working fine but as a SUPERADMIN, when I go to /admin/users I'm getting this error
    Cannot declare class A17\Twill\Models\Enums\UserRole, because the name is already in use
    Any idea what I'm missing?
  • h

    Harings Rob

    07/13/2022, 6:27 AM
    hey @valhalla14 did you also add
    exclude-from-classmap
    to your composer.json?
  • h

    Harings Rob

    07/13/2022, 6:28 AM
    Make sure that after the composer json adjustments you do a composer install
  • v

    valhalla14

    07/13/2022, 6:36 AM
    Yes, I've also excluded the file in composer.json. I did a composer dumpautoload. Im not sure what exactly I did but it seems to be working now. Thanks
  • u

    24C Felix

    07/13/2022, 6:37 AM
    Hey @Harings Rob ! Thanks for your answer. I guessed the same but hoped maybe it could work in settings haha
  • h

    Harings Rob

    07/13/2022, 6:38 AM
    In 3.x we might deprecate Settings and re-document it to use singletons (and maybe provide some helpers).
  • u

    24kappa

    07/14/2022, 3:53 PM
    I've just discovered you guys already provide an image service for TwiPics, you're awesome
  • u

    24kappa

    07/14/2022, 3:54 PM
    there's anybody here who is using it?
  • u

    24kappa

    07/14/2022, 3:57 PM
    I've noticed that the service is using the API method to get the images and not the javascript way by adding a tag. On my current installation i have
    Copy code
    MEDIA_LIBRARY_ENDPOINT_TYPE=local
    MEDIA_LIBRARY_IMAGE_SERVICE=A17\Twill\Services\MediaLibrary\TwicPics
  • u

    24kappa

    07/14/2022, 4:05 PM
    TwicPics url should be created in this way :
    https://<sub>.twic.pics/<path_to_image>
    so in my case it would be:
    https://krios.twic.pics/https://site.dev/storage/uploads/hash/image.jpg
    but the
    TwillImage
    render produce this type of url:
    https://krios.twic.pics/https://site.dev/hash/image.jpg
    It seems is missing
    storage/uploads
    part has anyone ever had this problem?
  • p

    pboivin

    07/14/2022, 4:20 PM
    Hi @24kappa , are you setting
    TWICPICS_PATH
    in your
    .env
    ?
  • p

    pboivin

    07/14/2022, 4:21 PM
    I don't remember ever using a full URL as part of my TwicPics URL (in the image path...)
  • u

    24kappa

    07/14/2022, 4:23 PM
    I'm using absolute url , the documentation says i can do that. Didn't know what to set to path
  • p

    pboivin

    07/14/2022, 4:24 PM
    Do you want to try without absolute URL? I can help you find the right config.
    u
    • 2
    • 8
  • u

    24kappa

    07/14/2022, 4:25 PM
    Yes, thanks. Could we do it tomorrow? Now I have to handle other boring stuff
  • p

    pboivin

    07/14/2022, 4:25 PM
    Sure haha, I need to refresh my memory anyway. I'll just post here and you can try it whenever you have time.
  • u

    24kappa

    07/14/2022, 4:26 PM
    Thanks
  • p

    pboivin

    07/14/2022, 4:39 PM
    Do you want to try without absolute URL
  • d

    DKC

    07/15/2022, 2:37 AM
    Hello @Harings Rob I see your fix in https://github.com/area17/twill/pull/1734/files Thanks so much!! May I know if you will have further idea about nested repeaters
  • h

    Harings Rob

    07/15/2022, 6:27 AM
    Hey @DKC I do not have ideas at the moment, I looked into it a bit, but will do that again when 3.x is out of the way.
  • d

    DKC

    07/15/2022, 10:00 AM
    This is sad, I am using this feature and suddenly found that not work for the third level nested items. Hope there will be quick solution : ( I am also trying to figure it out.
  • i

    ifox

    07/15/2022, 12:39 PM
    @DKC just want to make sure I'm caught up on your issue. Do you have an issue other than the ones you described with cloning?
  • d

    DKC

    07/15/2022, 12:41 PM
    Currently only have block cloning issue
  • i

    ifox

    07/15/2022, 1:05 PM
    ok thanks for confirming
  • m

    MedvedOurs

    07/18/2022, 1:10 PM
    Hello! I'm trying to use
    @formCollapsedFields
    but I can't seem to find any example and can't seem to make it work by myself (it might be a side effect of my brain melting due to the temperature!) - the goal is to have fieldsets collapsed by default, if that's even possible with it!)
  • i

    ifox

    07/18/2022, 1:12 PM
    hi @MedvedOurs, try
    @formFieldset(['title' => 'test', 'open' => false])
  • m

    MedvedOurs

    07/18/2022, 1:13 PM
    That's magic 😄 I've literally been looking for this for more than a year now...
  • m

    MedvedOurs

    07/18/2022, 1:13 PM
    Thank you so much.
  • m

    MedvedOurs

    07/18/2022, 1:14 PM
    (I just recently updraded from 2.1.1, maybe it wasn't available before?)
  • i

    ifox

    07/18/2022, 1:16 PM
    it was exposed to the blade directive on 2.7, but the option was available since the very first release when directly using the underlying
    <a17-fieldset>
    component
1...362363364...484Latest