User tests: Successful: Unsuccessful:
Pull Request for Issue # .
When data for a Repeatable field from Joomla 3 migrated to a SubField on Joomla 4, the value for media field type is stored in String, not in JSON format as expected, thus it throws some warnings when the field is being displayed (see #32611 (comment) )
This PR solves that error by overriding method onCustomFieldsPrepareField for Media field to make sure $field->value is an array (for Media field not belong to a Subfield, that's prepared on onCustomFieldsBeforePrepareField already)
This only affect Repetable field migrated to Subfield, so @HLeithner can take a look and if it solves the issue, he can get it merged. I don't want to waste time of tester by having to install Joomla 3.10.0, upgrade to Joomla 4, then test this small fix.
Status | New | ⇒ | Pending |
Category | ⇒ | Front End Plugins |
I'm unsure. The onCustomFieldsPrepareField trigger is available for us to use, so I think we can use it to handle this case, and it is simpler than converting the data. We already do similar check/conversion for media field in onCustomFieldsBeforePrepareField, so It is not hurt to do the same on onCustomFieldsPrepareField
@laoneo Could you give some suggestions here?
If you both agree that we should do data conversion, I will try to do so.
@joomdonation looks fine for me...
Thanks @laoneo. @HLeithner Are you OK with this approach? If not, I will try to find sometime to find a way to convert data to expected format in migration script.
Migration script would be much better tbh...
OK. Thanks for the feedback. I will try to find sometime to do that with migration script, then.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-04-12 07:23:49 |
Closed_By | ⇒ | joomdonation | |
Labels |
Added:
?
?
|
Wouldn't it be better to convert it? Else we need this code till joomla 10.