Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[streams-platform] Addon field translations not working properly with multidimensional arrays #4710

Closed
Dinushasilva opened this issue Jan 1, 2018 · 11 comments
Labels
Priority: Medium Type: Bug Report Reported bug, not confirmed

Comments

@Dinushasilva
Copy link

Field Type = textarea
PyroCMS = v3.4.10

This is not working, as the field is unable to show the instructions on all three fields (movies,series,topics), it will only show on the first field which is (movies).

return [
    'description' => [
        'name' => 'Description',
        'instructions' => [
            'movies' => 'Brief description about the Movies.',
            'series' => 'Brief description about the Series.',
            'topics' => 'Brief description about the Topics.',
        ]
    ],
];

But this will work

return [
    'description' => [
        'name' => 'Description',
        'instructions' => 'Brief description.'
    ],
];
@Piterden
Copy link
Contributor

Piterden commented Jan 1, 2018

You set translations for only one field, which is description.

@Dinushasilva
Copy link
Author

as in?

@Piterden
Copy link
Contributor

Piterden commented Jan 1, 2018

Instructions property must be a string value

@Dinushasilva
Copy link
Author

Dinushasilva commented Jan 1, 2018

But it's working for name field, you mean Instructions can't be an array type?

@Piterden
Copy link
Contributor

Piterden commented Jan 1, 2018

Yes, it must be string

@Dinushasilva
Copy link
Author

But then how can we use it for multiple fields? let's say if we have description field on three different streams?.

How can we manage unique instructions for all three?.

@Piterden
Copy link
Contributor

Piterden commented Jan 2, 2018

The thing is you have fields attached to the domain, which is the module in our case. Streams have assignments, not fields. And assignment item can override fields settings.

@RyanThompson
Copy link
Member

This should indeed be working and I see it working elsewhere.. might be a compiler issue. I'll look into it though.

@RyanThompson RyanThompson added the Type: Bug Report Reported bug, not confirmed label Jan 3, 2018
@RyanThompson
Copy link
Member

@Dinushasilva does re-compiling the streams fix this?

@Dinushasilva
Copy link
Author

Dinushasilva commented Jan 12, 2018

@RyanThompson , Sorry i couldn't mention that, yup recompiling the streams would do the fix,

if anyone needs a temporary fix,

php artisan streams:cleanup
php artisan streams:compile

@Piterden Piterden changed the title Addon field translations not working properly with multidimensional arrays [streams-platform] Addon field translations not working properly with multidimensional arrays Jan 25, 2018
@Pixney-William
Copy link
Contributor

@RyanThompson did you fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Medium Type: Bug Report Reported bug, not confirmed
Projects
None yet
Development

No branches or pull requests

4 participants