No Code Attached Yet bug
avatar idefax
idefax
30 Mar 2024

Steps to reproduce the issue

Set Cassiopeia template as default.
Add file user.css to /media/templates/site/cassiopeia/css
Add new class to the file:

.testclass {
	background: yellow;
} 

Add a menu link of type Users > User Profile.

Open Users > Field Groups: Add a group
Open Users > Fields

  1. Add a field of type text and assign it to the group created before.
  2. Switch to tab "Options". In section "Display Options" add CSS class "testclass" into the field "Display Class".
  3. In fields "Prefix" and "Suffix" add any value.
  4. Save and close.
  5. Edit the profile of a registered user. Add any value into the custom field ceated before.
  6. Save and close.

Login in Frontend as registered user. Click menu link to show User Profile.

Expected result

The field container of the User Custom Field having a yellow background.
Value stored in field Prefix to be shown before value of user custom field.
Value stored in field Suffix to be shown after value of user custom field.

Actual result

The field container of the User Custom Field has no yellow background because CSS class "testclass" is not beeing applied to the container.

Values set in Prefix and Suffix are not shown.

System information (as much as possible)

J5.0.3
PHP 8.3.3
Cassiopeia template

Additional comments

The same issue regarding CSS classes goes as well for following fields in section "Display Options":

  • Value Class
  • Label Class

The issue regarding CSS classes, Prefix and Suffix does not apply to Custom Fields of type com_content. It's working there.

avatar idefax idefax - open - 30 Mar 2024
avatar joomla-cms-bot joomla-cms-bot - change - 30 Mar 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 30 Mar 2024
avatar idefax idefax - change - 30 Mar 2024
Title
J5.0.3 com_user custom fields > Display options > CSS classes not working, not beeing applied
J5.0.3 com_user custom fields > Display options > CSS classes not working, not beeing applied. Prefix and Suffix not shown.
avatar idefax idefax - edited - 30 Mar 2024
avatar Quy
Quy - comment - 30 Mar 2024

Duplicate #38238?

avatar brianteeman
brianteeman - comment - 30 Mar 2024

Bug confirmed.

Nothing to do with the issue @Quy refers to.

The problem is that the code in com_users is hardcoded to output a field and does not use the field layouts. In other words there is no code in the com_users view to display fields correctly

avatar brianteeman
brianteeman - comment - 2 Apr 2024

First reported #23212

avatar Hackwar Hackwar - change - 2 Apr 2024
Labels Added: bug
avatar Hackwar Hackwar - labeled - 2 Apr 2024
avatar brudra
brudra - comment - 14 Jul 2024

Hello! I am using Joomla v5.1.2 and couldn't figure out what I was doing wrong. I just found this open issue (which seems to be open since 2018?)

I was wondering if there is any approx timeline on when it will be resolved?
(based on comments in #23212, fixing the issue in com_users has the added benefit of bringing consistency across components in how custom fields are rendered?)

Add a Comment

Login with GitHub to post a comment