Octopoos / SEBLOD

Build high-end websites with SEBLOD®, a CCK for Joomla!
https://www.seblod.com
GNU General Public License v2.0
129 stars 54 forks source link

Copy/Translate on Free Object in 4.1 breaks JForm Associations #753

Open Giuse69 opened 1 year ago

Giuse69 commented 1 year ago

After upgrade from 4.0.6 to 4.1, when I try to edit in backend any object of a custom type that uses the JFormAssociation field, I get a critical error "Cannot use object of type stdClass as array". Stack trace: #0 [ROOT]/libraries/cck/_/cck.php(34): plgCCK_Storage_LocationJoomla_Article_Helper::getAssociationsForm()

Troubleshooting the problem, it appears as the new feature Copy/Translate feature commited with https://github.com/Octopoos/SEBLOD/commit/90bbc1eba5a3cc4bf63586cefc5b9ea42fc05248 has broken the usage of the AssociationField at least with Seblod custom types. Infact reverting line 84/85 $form = ....array( $id, $name, $field, $config ) to the previous version $form = .... array( $id, $name, $config ) everything works again.