joomla / joomla-cms

Home of the Joomla! Content Management System
https://www.joomla.org
GNU General Public License v2.0
4.77k stars 3.65k forks source link

[5.3] Revert #44161 #44462

Closed bembelimen closed 5 days ago

bembelimen commented 1 week ago

Summary of Changes

With #44161 the limitation that custom fields has to be unique system wide was removed. This could break when e.g. a plugin loads custom fields from another extension into a form.

To simulare the problem

Joomla\Component\Fields\Administrator\Helper\FieldsHelper::prepareForm('com_contact.contact', $this->form, []);

Expected result

two "Foobar" fields visible

Actual problem

Only one "Foobar" field is loaded, the fields are conflicting. This has also different effect when e.g. saving etc.

Solution

I like in general the idea of the original PR, but it has to be in a Major version respecting the B/C rules.

@Hackwar

laoneo commented 1 week ago

Thanks @bembelimen!

richard67 commented 1 week ago

I have tested this item :white_check_mark: successfully on 2cba92917b83d87721cafc0d06bd5a97133873f7

Hint for other testers: When having applied this PR, it is not enough just to visit the user registration again to see both fields. You have to edit one of the 2 fields again (or proceed again from the start where you have none of these fields yet). Then you won't be able to save the field (2nd in case if you started again from scratch). You have to manually chose a different name, then you can save, and then you will see both fields in the user registration.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44462.

Quy commented 6 days ago

I have tested this item :white_check_mark: successfully on 2cba92917b83d87721cafc0d06bd5a97133873f7


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44462.

Quy commented 6 days ago

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44462.

HLeithner commented 5 days ago

Thanks