Language Change ? Pending

User tests: Successful: Unsuccessful:

avatar AndySDH
AndySDH
14 Sep 2021

Pull Request for Issue #34903.

PR #34391 that was merged in 3.9.28 was a wrong PR. The render_class was already output for the field parent element. That PR added it to the span of the value itself, which causes problems because now the same class is in two nested elements.

It's not good to apply the global render_class to the value. So we got two solutions:

  • Either UNDO PR #34391 and call it a day
  • Or, if you want a class for just the value, it should be a separate class.

Summary of Changes

So here's what I did:

  • Revert back the wrong changed made in #34391
  • Create a separate class input for just the value
  • Make the value use this value class instead of the parent render class
  • As a bonus, as suggested by @pepperstreet, I added the field name/alias to the class of the parent element of the field

Testing Instructions

Actual result BEFORE applying this Pull Request

The render_class of a custom field is also applied to the span of the field-value

Expected result AFTER applying this Pull Request

  • The "Render Class" of a custom field is reverted back to only appear in the parent element of the field
  • The parent element of the field now also gets the fieldname as additional class
  • You can now use the new "Value Class" setting to give a class to the span of the field-value
avatar AndySDH AndySDH - open - 14 Sep 2021
avatar AndySDH AndySDH - change - 14 Sep 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 14 Sep 2021
Category Administration com_fields Language & Strings Front End
avatar AndySDH AndySDH - change - 14 Sep 2021
The description was changed
avatar AndySDH AndySDH - edited - 14 Sep 2021
avatar AndySDH AndySDH - change - 14 Sep 2021
The description was changed
avatar AndySDH AndySDH - edited - 14 Sep 2021
ba740df 14 Sep 2021 avatar AndySDH typo
avatar AndySDH AndySDH - change - 14 Sep 2021
Labels Added: Language Change ?
avatar AndySDH
AndySDH - comment - 15 Sep 2021

Please test @pepperstreet

avatar zero-24 zero-24 - test_item - 17 Sep 2021 - Tested successfully
avatar zero-24
zero-24 - comment - 17 Sep 2021

I have tested this item successfully on ba740df

Works good to me. Thanks


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

avatar AndySDH
AndySDH - comment - 18 Sep 2021

Thanks! Need one more test :)

avatar hans2103
hans2103 - comment - 13 Oct 2021

I have tested this item successfully on ba740df


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

avatar hans2103 hans2103 - test_item - 13 Oct 2021 - Tested successfully
avatar zero-24
zero-24 - comment - 13 Oct 2021

Thanks for testing will merge here now ?

avatar zero-24 zero-24 - close - 13 Oct 2021
avatar zero-24 zero-24 - merge - 13 Oct 2021
avatar zero-24 zero-24 - change - 13 Oct 2021
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-10-13 12:49:36
Closed_By zero-24
avatar AndySDH
AndySDH - comment - 13 Oct 2021

Thank you!

avatar pepperstreet
pepperstreet - comment - 23 Oct 2021

Please test @pepperstreet

@AndySDH
Sorry for the late reply, I got side-tracked by other things and I totally missed your PR and the notification. Thank you so much for listening and caring about this issue! I am going to have a closer look as soon as possible...

One quick thought about the extra field NAME as class. I know, an alias/name is more readable, but it could be changed in the backend easily... so, I would suggest to add the unique field ID as well. Either as an additional class, or as a real, separate id. Field ID's are save and can't be changed by accident. Also useful for further targeting and handling in Javascript etc.

Again, your help and work is much appreciated!

Add a Comment

Login with GitHub to post a comment