-
-
Notifications
You must be signed in to change notification settings - Fork 242
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
Fix getMediaModel with nested flexible Layout #267
base: master
Are you sure you want to change the base?
Conversation
Instanceof Layout without import return always false and getMediaModel must be public.
With this fix you can implement HasMediaLibrary only on Layouts that have media.
Hi @trippo, Is this PR finished or are you still tweaking it ? Thanks ! |
The last 4 commits are for support validation on translatable fields inside flexible |
But I don't know if there are others methods... Practically in getParsedFlexibleGroup function, convert valid JSON with locales attributes to array and this fixes the validation. |
Can you accept this pull request? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @trippo,
Thanks for your work. I can accept this PR but would like some minor code style changes first.
In Http/ParsesFlexibleAttributes
L 102, Instead of having else { if (is_string($value)) { /* ... */ } }
, please prefer a more readable syntax using elseif (is_string($value)) { /* ... */ }
.
Also, don't forget to add docblocks for your new methods (isTranslatableAttribute
for instance).
Thanks !
@Nyratas please see my changes |
Any update on this? |
Nope but I'm using @trippo version long time on the production |
It is pretty sad that despite the collaboration from the community they have so many PR stacked. Is his version on packagist too? Not packagist, but in composer.json can do like so than install:
|
Please see #326 We would love to get things moving with this but need someone to help us review these PRs. |
I used the actual code fore translatable rule fix, and is working like a charm. The media part don't know. |
Somehow the translatable field will not get the unique key in the payload. This way, it is trying to find with files.0.attributes.transcript.en in the rules, but that doesn't exist, if I add the key in the scoped field rules it will not be able to check, but shows error correctly. I am wondering how could I add the jPsvC4afdJP8SRv0 to the transcript attribute in the payload? Payload: |
Instanceof Layout without import return always false and getMediaModel must be public.