User tests: Successful: Unsuccessful:
Pull Request for Issue #15287.
When you create certain types of fields (tested on list and checkbox fields) and text/values have special characters like accents, you will get a warning when editing an article. See #15287 for details.
This PR adds html_entity_decode() function to SimpleXMLElement string.
Pull Request for Issue # .
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Title |
|
Category | Libraries | ⇒ | com_fields Libraries |
Title |
|
Category | Libraries com_fields | ⇒ | Libraries |
Title |
|
||||||
Easy | No | ⇒ | Yes |
Category | Libraries | ⇒ | com_fields Libraries |
Title |
|
Category | Libraries com_fields | ⇒ | Libraries |
Category | Libraries | ⇒ | com_fields Libraries |
I would not do that in JForm itself but on the place where the load function is called. I'm not sure if the change on JForm will have some unpredictable side effects.
Category | Libraries com_fields | ⇒ | Libraries |
It's in the FieldsHelper::renderForm function.
I can't find renderForm function in administrator/com_fields/helpers/fields.php file. Did you mean function render()?
Labels |
Added:
?
|
Category | Libraries | ⇒ |
Category | ⇒ | Administration com_fields |
Ok, I hope I got it right, after making a change in helper file warning is gone. Change in JForm was reverted.
Looks good for me
I have tested this item
Not this value R&B
does not work.
PHP Warning: SimpleXMLElement::__construct(): Entity: line 2: parser error : EntityRef: expecting ';' in \joomla-cms-staging\libraries\joomla\form\form.php on line 728
PHP Warning: SimpleXMLElement::__construct(): hint="" required="false" readonly="false" validate="options"><option value="R&B in \joomla-cms-staging\libraries\joomla\form\form.php on line 728
PHP Warning: SimpleXMLElement::__construct(): ^ in \joomla-cms-staging\libraries\joomla\form\form.php on line 728
PHP Warning: SimpleXMLElement::__construct(): Entity: line 2: parser error : EntityRef: expecting ';' in \joomla-cms-staging\libraries\joomla\form\form.php on line 728
PHP Warning: SimpleXMLElement::__construct(): ="" required="false" readonly="false" validate="options"><option value="R&B">R&B in \joomla-cms-staging\libraries\joomla\form\form.php on line 728
PHP Warning: SimpleXMLElement::__construct(): ^ in \joomla-cms-staging\libraries\joomla\form\form.php on line 728
I think I have a solution. Change htmlentities
to htmlspecialchars
in the following 2 lines:
No more errors with the values: A&B
and Manuel Gómez Padilla
.
I don't know if it requires , ENT_COMPAT, 'UTF-8'
with htmlspecialchars
or something else. If someone knows, please submit a pull request. Thanks.
Great find @Quy !
It seems that it works, I've checked it on field title, name, label and text/values for fields color, list and checkboxes.
Regarding , ENT_COMPAT, 'UTF-8'
part: PHP 5.4 and PHP 5.5 will use UTF-8 as the default encoding. In PHP 5.6 default_charset configuration option is used as the default value. Official docs on php.net still recommends specifying charset if you are using PHP 5.5 or earlier, so probably we should include it.
Category | Administration com_fields | ⇒ |
I've updated PR, reverted previous commit to helper file and updated fieldslistplugin.php.
Category | ⇒ | Administration com_fields |
List of changed file is empty, probably a missing commit.
Yep, I've made a commit to wrong branch. Done.
I appreciate the info/pr. I am not at my computer to test, however, the pr looks good.
I have tested this item
Created radio, checkboxes, and list custom fields. No errors on backend and frontend in article edit mode.
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC after two successful tests.
Merge into 3.7.1?
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-05-04 21:44:23 |
Closed_By | ⇒ | rdeutz | |
Labels |
Added:
?
|
I have tested this item✅ successfully on 5284d05
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15294.