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

    zynth

    09/20/2022, 3:12 PM
    I just have one singleton called homepage where you can add blocks which represent a section in my one pager.
  • z

    zynth

    09/20/2022, 3:13 PM
    And I want to render the navbar based on the blocks titles. 😄
  • h

    Harings Rob

    09/20/2022, 3:13 PM
    So you can do: Homepage::first()->blocks
  • z

    zynth

    09/20/2022, 3:15 PM
    omg
  • z

    zynth

    09/20/2022, 3:16 PM
    Thanks that's what I needed.
  • z

    zynth

    09/20/2022, 3:16 PM
    I really need to get into Eloquent
  • h

    Harings Rob

    09/20/2022, 3:17 PM
    Most of how you will render your site if you go for the coupled way is standard Laravel.
  • z

    zynth

    09/20/2022, 3:19 PM
    Yeah I know. The thing is, this is my first time using both. At my old job we used Doctrine and a custom backend framework if you can call it that.
  • z

    zynth

    09/20/2022, 3:20 PM
    Also more of a frontend guy so these things are kinda new to me. But I'm enjoying it so far. 😄
  • z

    zynth

    09/20/2022, 3:22 PM
    Anyways, thanks a bunch dude.
  • t

    tfilos

    09/20/2022, 6:47 PM
    Hey folks, I am oddly having this issue on my 2.8 install on Laravel 9 --- it just started happening. I've got my Twill setup to only use local storage, my .env settings are exactly like in this Github issue --- oddly I am seeing this exception appearing every 3 seconds in my laravel log. I don't have any scheduled jobs or anything in cron. It's a bit confusing, it's a staging site so there's no traffic to speak of: https://github.com/area17/twill/issues/1530
  • t

    tfilos

    09/20/2022, 6:49 PM
    Well, mine is similar, the error message has a slightly different body: `Error retrieving credentials from the instance profile metadata service. Aws\\Exception\\CredentialsException (Client error:
    GET http://169.254.169.254/latest/meta-data/iam/security-credentials/
    resulted in a `404 Not Found``
  • t

    tfilos

    09/20/2022, 6:49 PM
    It's a bit confusing since I don't use AWS at all on here
  • i

    ifox

    09/20/2022, 7:12 PM
    Are you sure you have
    FILE_LIBRARY_ENDPOINT=local
    too?
  • t

    tfilos

    09/20/2022, 7:13 PM
    That one I do not have, @ifox
  • t

    tfilos

    09/20/2022, 7:14 PM
    Will see if that resolves it, thanks
  • t

    tfilos

    09/20/2022, 7:16 PM
    It's still going, unfortunately
  • t

    tfilos

    09/20/2022, 7:17 PM
    I assume Twill has vendor/aws/aws-sdk-php as a dependency
  • i

    ifox

    09/20/2022, 7:19 PM
    by default in Twill 2 it is set S3 (set to local in Twill 3, we learned from it not being a good default), make sure you clear config cache because if both media and file libraries are set to local there is no code trying to use the AWS sdk
  • t

    tfilos

    09/20/2022, 7:20 PM
    Yep, I clear config cache on every deploy. Will do it manually to cover my bases
  • t

    tfilos

    09/20/2022, 7:20 PM
    Weirdest thing, still going
  • t

    tfilos

    09/20/2022, 7:21 PM
    Will double check the env values are actually being picked up.
  • t

    tfilos

    09/20/2022, 7:21 PM
    Copy code
    FILE_LIBRARY_ENDPOINT_TYPE=local
    FILE_LIBRARY_CASCADE_DELETE=false
    MEDIA_LIBRARY_ENDPOINT_TYPE=local
    FILE_LIBRARY_ENDPOINT=local
    MEDIA_LIBRARY_IMAGE_SERVICE=A17\Twill\Services\MediaLibrary\Glide
  • i

    ifox

    09/20/2022, 7:22 PM
    maybe you have something static in your twill config file?
  • t

    tfilos

    09/20/2022, 7:22 PM
    Interestingly calling those in tinker with
    env()
    they all return null
  • t

    tfilos

    09/20/2022, 7:22 PM
    Which is odd because I have a working site with tons of images that are working on a local level
  • t

    tfilos

    09/20/2022, 7:24 PM
    Ahh, I had assumed that these were pulled in dynamically, the only thing I have in my twill config file other than the enabled flag is:
    Copy code
    'media_library' => [
            'local_path' => env('MEDIA_LIBRARY_LOCAL_PATH', 'uploads'),
        ],
  • i

    ifox

    09/20/2022, 7:24 PM
    yeah that's all good the rest is merged automatically
  • i

    ifox

    09/20/2022, 7:25 PM
    so that's not the issue
  • t

    tfilos

    09/20/2022, 7:26 PM
    I just blew away my cache dir and re built it, still happening
1...400401402...484Latest