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

    Sami

    09/09/2021, 10:38 AM
    Still struggling -
    Copy code
    php
    Element::create([
        'en' => ['title' => 'Water'],
        'de' => ['title' => 'Wasser'],
    ]);
    gives me
    Argument 1 passed to Illuminate\Database\Grammar::parameterize() must be of the type array, string given
    it's trying to put
    updated_at
    string value to the
    parametrize
    function
    Illuminate\Database\Query\Grammars\Grammar::Illuminate\Database\Query\Grammars\{closure}("2021-09-09 10:31:19", "updated_at")
    When I dump the arguments of
    parametrize
    , I get this, which tells me that
    update_at
    is not an array and it's still being put to that function
    Copy code
    php
    array:3 [
      "de" => array:1 [
        "title" => "Wasser"
      ]
      "updated_at" => "2021-09-09 10:33:44"
      "created_at" => "2021-09-09 10:33:44"
    ]
    i
    • 2
    • 10
  • m

    Mho

    09/09/2021, 10:49 AM
    Thanks again for you quick support. I did try all those but not improvements. I also noticed issue is with the block_editor field. It's not picking the list blocks. Other field types work fine. Also blocks are inlined in the view:source.
    i
    • 2
    • 47
  • s

    sapta34

    09/09/2021, 11:07 AM
    How i give a special permission for a module by using a custom role? So when any user login with that particular role, then those user can only access this module along with listing and editing and addition of that particular module.
    i
    p
    s
    • 4
    • 37
  • i

    ifox

    09/09/2021, 11:17 AM
    missing-blocks
  • s

    sapta34

    09/09/2021, 11:22 AM
    User Custom Role with Permission to custom module.
  • i

    ifox

    09/09/2021, 11:39 AM
    seeding-translations
  • a

    afatmustafa

    09/09/2021, 12:07 PM
    Hi, is there any way add media to json repeaters
  • i

    ifox

    09/09/2021, 12:08 PM
    not at the moment @afatmustafa
  • a

    afatmustafa

    09/09/2021, 12:08 PM
    Well, I can add it to regular repeaters, right?
  • i

    ifox

    09/09/2021, 12:08 PM
    definitely
  • a

    afatmustafa

    09/09/2021, 12:09 PM
    Ok thanks @User
  • b

    Blade

    09/09/2021, 1:53 PM
    Can't find a solution. Uploading a png file to local media library which has Cyrillic name. Upload fails due to iconv failing on illegal characters. Changing in replaceAccents() return iconv('UTF-8', 'ASCII//TRANSLIT', $str); to return iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $str); clears a warning,, but removes all Cyrillic characters, so filename uploads as '.png' (just an extension)
  • p

    pboivin

    09/09/2021, 2:17 PM
    Hi @User , I'm not an expert at all on i18n but can you try
    ASCII//IGNORE//TRANSLIT
    ?
  • b

    Blade

    09/09/2021, 2:19 PM
    @User tried that too already. same thing
  • c

    Chronos

    09/09/2021, 4:51 PM
    How do you get the activity log displaying on the dashboard? I tried dashboard->modules->blogs->activity->true
  • i

    ifox

    09/09/2021, 7:03 PM
    Hi @Chronos, did you define a morph map for blogs?
  • k

    KyleAF

    09/10/2021, 12:51 AM
    Hey twill team! I was wondering if you might have a suggestion. Other than updating composer and npm files, I haven't made any change recently, but now the Add Content button is not showing up, and it looks like some other icons aren't showing up either.
  • k

    KyleAF

    09/10/2021, 12:51 AM
    I've tried clearing the cache, republishing assets with twill:update, and even rebuilding (just in case) with twill:build. No luck 😦
  • i

    ifox

    09/10/2021, 12:52 AM
    Hey @User, did you publish and modify Twill blade views? you'd have a twill folder under resources/views/vendor in your app if so
  • k

    KyleAF

    09/10/2021, 12:54 AM
    I do have a twill folder under that directory right now, yup
  • k

    KyleAF

    09/10/2021, 12:54 AM
    It has auth, blocks, emails., errors, layouts, partials, and users as sub directories looks like
  • i

    ifox

    09/10/2021, 12:55 AM
    if you didn't apply any modifications in there, you can delete them. if you did, there are few updates you'll have to do
  • k

    KyleAF

    09/10/2021, 12:56 AM
    nope I hadn't modified any of those files. So delete the directory then?
  • i

    ifox

    09/10/2021, 12:56 AM
    those are Twill internal views, they are only meant to be individually override as needed but of course that means they then need to be maintained. so yes if you aren't doing any of that, you don't need that whole folder
  • k

    KyleAF

    09/10/2021, 12:58 AM
    that fixed it, you're the best! Thanks for the help. To avoid this in the future, I'm assuming me having done a twill:update in the past before caused this once some internal twill files changed after updating then, and there must have been a conflict I assume?
  • i

    ifox

    09/10/2021, 1:01 AM
    twill:update wouldn't update those files, but a composer update got you on the last version which is loading icons differently from one of those Blade files that you had published in your views. you probably did an
    artisan vendor:publish
    at some point that published all Twill views, which is not really recommended. one last point: if you do not have any custom Vue block/component to get into Twill, you never have to run
    twill:build
    , as
    twill:update
    will copy the latest build you need for you (much faster and makes sure you don't build with different dependencies)
  • k

    KyleAF

    09/10/2021, 1:03 AM
    ahhh, that makes sense. I'll keep this in mind, thank you again for the help @User!
  • d

    Defenestrația

    09/10/2021, 4:20 AM
    How do I use the browser in a two-way fashion? I have a belongsToMany relationship between 2 models... Let's call them First and Second. When I create the form for First, I set this up: @formField('browser', [ 'moduleName' => 'seconds', 'name' => 'first_second', 'label' => 'Second', ]) On the form for Second, I set this up: @formField('browser', [ 'moduleName' => 'firsts', 'name' => 'first_second', 'label' => 'First', ]) When I link my Second to my First in the First form, it creates an entry in the "related" table with subject_type First and related_type Second. When I link my First to my Second in the Second form, it creates a second entry in the "related" table with subject_type Second and related_type First. How do I link these together so I have one relationship that can be created/edited/deleted in either form?
  • s

    Sami

    09/10/2021, 8:01 AM
    Today I opened my project and when I try to save something in admin, it does the fade effect but no message is shown and the data are not being saved. Haven't had this problem before
  • i

    ifox

    09/10/2021, 8:04 AM
    @Sami nothing in console / Laravel logs?
1...888990...484Latest