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

    Mouse83

    06/07/2022, 9:55 PM
    and I get this error
    Block estateGallery does not exists or the mandatory property 'title' was not found on this block. If you are still using blocks on the twill.php file, please check if the block is present and properly configured.
  • i

    ifox

    06/07/2022, 9:55 PM
    Hi @Mouse83 i just responded to you on YouTube, I'd recommend checking the repeater docs instead of following the video
  • m

    Mouse83

    06/07/2022, 9:55 PM
    thanks 🙂 frustration got me good 🙂
  • i

    ifox

    06/07/2022, 9:56 PM
    if you have the repeater defined in config (which isnt needed anymore because of a new block annotation feature that wasnt there at the time of the video), it should not throw that error though
  • i

    ifox

    06/07/2022, 9:58 PM
    basically, add
    @twillBlockTitle('Estate Gallery')
    at the top of your estateGallery file and that error should go away
  • c

    ckmirafss

    06/08/2022, 5:27 AM
    Hello, If I disable the activity/dashboard, is it possible to redirect it to other route?
  • i

    ifox

    06/08/2022, 7:25 AM
    Hey, yes, see https://github.com/area17/twill/blob/06556bf7e2e13d5dc5343ea4e35287f707cdcbfc/config/twill.php#L165
  • c

    ckmirafss

    06/08/2022, 8:30 AM
    Thanks @ifox ! How about uploading the images/files directly to the live server? Is that possible also? I'm planning to upload the files directly to live server and not on my localhost.
  • i

    ifox

    06/08/2022, 8:33 AM
    From your local instance?
  • c

    ckmirafss

    06/08/2022, 8:34 AM
    MEDIA_LIBRARY_ENDPOINT_TYPE = current.com ??
  • i

    ifox

    06/08/2022, 8:35 AM
    that's what things like S3 are for, Twill will not be able to upload to a remote server from your local application
  • c

    ckmirafss

    06/08/2022, 8:35 AM
    Oh alright. Copyyyy!
  • i

    ifox

    06/08/2022, 8:35 AM
    can you explain why you would need something like that?
  • c

    ckmirafss

    06/08/2022, 8:36 AM
    Because when I save the file from local instance. The current url from local instance will be saved. Ex: local.com
  • c

    ckmirafss

    06/08/2022, 8:37 AM
    So when I upload the database from my local instance, the path was local.com
  • i

    ifox

    06/08/2022, 8:37 AM
    hmm no it doesn't save anything like that
  • c

    ckmirafss

    06/08/2022, 8:37 AM
    and the issue is the images are missing
  • i

    ifox

    06/08/2022, 8:38 AM
    where do you see a local.com url in your database after uploading an image?
  • i

    ifox

    06/08/2022, 8:46 AM
    don't spend too much time searching for it, there's none. References are relative in the db and don't include anything else than the image filename and UUID of the folder it was uploaded to. So if you upload your storage folder to the same location on your remote and import your local database, your images would work. You probably have a different issue. Check if images are responding with a 404 or 500, look at the url, etc...
  • c

    ckmirafss

    06/08/2022, 9:07 AM
    Dang it. Yeahh saw it already. I thought the current url will be saved on the database. I think I look for the wrong site a while ago. ✌🏻
  • c

    ckmirafss

    06/08/2022, 9:07 AM
    Many many thanks @ifox !
  • c

    ckmirafss

    06/08/2022, 9:09 AM
    I’m loving Twill rn. I saved more time than creating manual cms for my clients.
  • k

    Kormi

    06/08/2022, 12:31 PM
    Hi, i need to print in model table a shortcode.
    Copy code
    protected $indexColumns = [
            'title' => [
                'field' => 'title',
                'title' => 'Title',
                'sort' => true,
            ],
            'shortcode' => [
                'field' => 'shortcode',
                'title' => 'Shortcode',
                'sort' => false,
            ],
        ];
    This shortcode is not stored in db, in edit is valorized like this
    Copy code
    public function getFormFields($object)
        {
            $fields = parent::getFormFields($object);
            $fields['shortcode'] = '[contact id="'.$object->id.'"]';
    
            return $fields;
        }
    is There Any Way to do this? Thank u
    i
    k
    • 3
    • 6
  • k

    Kormi

    06/08/2022, 12:50 PM
    Hi
  • m

    mateoD

    06/08/2022, 3:41 PM
    hello, i have i block with image and when i dont put an image on it returns 'Attempt to read property "width" on null ', can you help me to avoid this ?
  • i

    ifox

    06/08/2022, 5:29 PM
    @mateoD
    if ($block->hasImage('your_image_role'))
  • c

    ckmirafss

    06/09/2022, 3:36 AM
    Hlello, So I made the fields required but still submitting even if it is empty.
  • h

    Harings Rob

    06/09/2022, 6:34 AM
    hey @ckmirafss, that is for now the behaviour indeed, it is just a visual indicator. You need to add validation rules on the back-end to double-check this. If it is on a block check: https://twill.io/docs/block-editor/validating-blocks.html If it is a model check: https://twill.io/docs/crud-modules/form-requests.html#form-requests
  • c

    ckmirafss

    06/09/2022, 6:47 AM
    Oh alright. Copy!
  • c

    ckmirafss

    06/09/2022, 6:47 AM
    Thanks!
1...339340341...484Latest