User tests: Successful: Unsuccessful:
Currently the field LimitboxField
generates a hash so it doesn't have to calculate the options with each appearance of the same element. This is fine.
Howvere the has is created from $this->element
which is a simpleXMLElement. We all know that stuff behaves very strange and in unexpected ways.
In this case, $hash = md5($this->element);
doesn't create a hash based on the whole element with all its attributes. The hash is instead created on an empty simpleXMLElement (ignoring attributes) which ends up the same hash for each instance of the field.
This PR changes the hash so it is created from the XML string instead.
Simplest test would be to add two fields to the article form (administrator/components/com_content/models/forms/article.xml)
Within the fieldset "basic" add this lines:
<field
name="list_limit"
type="limitbox"
label="List"
useglobal="true"
/>
<field
name="feed_limit"
type="limitbox"
label="Feed"
useglobal="true"
/>
Now check the options tab in an article. And see the value in "Use Global"
If your installation has the default values, then the List field should show 20 and the Feed field should show 10 (values come from global configuration).
Both fields show the same value, because the hash is actually the same for both fields
Fields are showing correct values since hashes are different.
None
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
I have tested this item
Labels |
Added:
?
|
@alikon and @gostn Can you please retest? I applied a nice suggestion by @HLeithner
I have tested this item
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-12-30 09:52:10 |
Closed_By | ⇒ | HLeithner | |
Labels |
Added:
?
|
thanks
I have tested this item✅ successfully on bfac765
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31706.