Custom user field of Media type not displayed

Need help with the Administration of your Joomla! 4.x site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Locked
oorzaak
Joomla! Apprentice
Joomla! Apprentice
Posts: 40
Joined: Tue Feb 17, 2009 2:19 pm

Custom user field of Media type not displayed

Post by oorzaak » Mon Sep 27, 2021 7:04 pm

Hi,

In Joomla 3, I was able to add an avatar field to Joomla core user profiles by creating a user custom field of the type Media. This field is then displayed in the Joomla core user profile view, and it can also be used in overrides.

I tried to reproduce this trick in Joomla 4, however the image is only displayed in edit mode. When viewing the profile page, I do see the field label but there is no html output for the image. When testing with a custom field of the type Text, the content of this field was displayed ok.

When trying to use the custom fields in an override, I got even more confused. I am trying to create a template override on layouts/joomla/content/info_block/author.php in order to display the user avatar in the info block of the the Article view. When using the method FieldsHelper::getFields('com_users.user', $userid, true) in this override, I do get the titles and settings of both custom fields [edit: so I mean the field meta data], but no content of either field (media or text). Maybe something has changed here that was not yet documented?

I hope that someone can help me get this cleared up.

Kind regards,

Frits
Last edited by imanickam on Tue Sep 28, 2021 9:05 am, edited 1 time in total.
Reason: Manual Signature removed

oorzaak
Joomla! Apprentice
Joomla! Apprentice
Posts: 40
Joined: Tue Feb 17, 2009 2:19 pm

Re: Custom user field of Media type not displayed

Post by oorzaak » Tue Sep 28, 2021 8:57 am

I now reported this in the Issue Tracker:

https://issues.joomla.org/tracker/joomla-cms/35690


Locked

Return to “Administration Joomla! 4.x”