• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.2 Add custom user field to message user bit

Neil E.

Active member
#1
Users>Custom User Fields: Create custom user field.......done
Basic Information tab: set display location to "preferences".......done
General Options tab: set viewable in "message user info".......done
Style Properties: Message Elements: set to "show user custom fields"......done

The custom field does not show up in the user bit. I can't find any CSS height restriction (the user bit expands to hold the content).

Has something changed in 1.2x? (worked perfectly in 1.1x)
 

Brogan

XenForo moderator
Staff member
#2
They still work fine for me in 1.2.

Check your style has been updated and is compatible with 1.2 and there are no outdated templates.
 

Neil E.

Active member
#3
Reverted message_user_info just in case a previous edit was at fault, no change.
Checked for outdated templates, none listed (at time of upgrade to 1.2 several templates had to be manually merged, no problems).
Checked EXTRA for an errant display: none or anything else to do with the userbit, nothing unusual found.
Ran a file health check, found two "unexpected contents".
1) js/xenforo/xenforo.js (small edit to change timing on dropdown)
2) library/XenForo/ControllerPublic/Forum.php (no idea what is changed)

Can someone post the contents for the forum.php file from 1.2.2? I'd like to do a diff compare.
 

Neil E.

Active member
#5
Thanks Martok, very good suggestion. I still had the download on hand so it was easy to investigate.

Original:
'nodeBreadCrumbs' => $ftpHelper->getNodeBreadCrumbs($forum, false),

Change:
'nodeBreadCrumbs' => $ftpHelper->getNodeBreadCrumbs($forum),

I remember now that this was an edit Jake pointed out when I wanted a full path in the breadcrumb.
I doubt it could have any effect on the display of custom user fields.

More suggestions as to tracking down the problem are welcomed.

[Perhaps one day I'll learn enough to figure out how I manage to come up with so many unexplained little bits of weird functionality.]
 

Martok

Well-known member
#6
[Perhaps one day I'll learn enough to figure out how I manage to come up with so many unexplained little bits of weird functionality.]
For any code changes I make, I always add a comment so that in the future I know what it does. I also have a comment at the start of the code change and one at the end (beginning with the words Start and End) so I know what's been edited. If the edit changes or deletes any original code I will include the original code in the comment too in case I want to revert back at a later stage.
 

Neil E.

Active member
#7
Agreed, I do something similar. I add a comment at the end of each bit of code change describing what it does. Now that I've switched to direct template editing (from the old TMS addon), these comments are more important. As to reverting individual edits, I cut and paste back from the View Custom Changes window (that contains the master code). For completely new templates (that have no master code to highlight changes) keeping documentation is more critical.

One huge advantage of the old TMS addon was the ability to quickly turn on and off edits to look for issues. Very handy and fast for problem solving.