Closed faselunare closed 1 year ago
While this code is present in the lang.php file
'conference' => [
'events' => [
'event' => 'Event',
'event_create' => 'Create',
],
],
I get this other error
htmlspecialchars(): Argument #1 ($string) must be of type string, array given
/Users/francesco/Dev/sites/wn-conference/vendor/winter/storm/src/Support/helpers.php line 23
system.log is empty, no stack trace available
After an investigation, seems that when creating a new string, you can't have something like this
base33.conference::lang.event.event_create
but just
base33.conference::lang.event_create
in the preview version of builder string like this
base33.conference::lang.event.opening
works fine
see an old piece of code that works
<?php return [
'plugin' => [
'name' => 'Conference',
'description' => '',
],
'event' => [
'opening' => 'Opening',
'closing' => 'Closing',
],
...
```
@faselunare I can't replicate this, even with the steps you've added above. You may need to do some more investigation and see if you can narrow it down somewhere.
Ok, the same error happened when creating backend menu
Create a new menu's voice add a code with 'something.somethingelse' and get the error
@faselunare can you please post your entire lang file(s)? I cannot replicate the above either.
this is one lang file from another smallest plugin i'm working on
<?php return [
'plugin' => [
'name' => 'Exhibition Catalog',
'description' => 'Create a catalog of exhibition elements, for example: exhibition spaces, artwork... end with a form for request informations about the selected products.',
],
'forms' => [
'reorder' => 'Reorder',
],
'title' => 'Title',
'slug' => 'Slug',
'description' => 'Description',
'parent' => 'Parent',
'isactive' => 'Is active',
'excat' => 'Exhibition Catalog',
'create' => 'Create',
'excat_categories' => 'Exhibition Catalog Categories',
'select_parent' => 'Select parent category',
'media' => 'Media',
'content' => 'Content',
'image' => 'Image',
'gallery' => 'Gallery',
'active' => 'Active',
'assets' => 'Assets',
'items' => 'Items',
'categories' => 'Categories',
'price' => 'Price',
'test' => [
'active' => 'test active',
],
'permission' => [
'edit_category' => 'Edit category',
],
];
now seems to work when i use a string like base33.excat::lang.permission.edit
@faselunare so you're no longer experiencing the issue?
no
Thanks @faselunare. Please let me know if the issue reoccurs and we'll reopen.
Step to reproduce Go to permission tabs Add permission like
before save, translations are added in the lang.php file
while saving I get this error
and is impossible to save permission