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

UserBlurb Partially Appearing in Separate Template

#1
In the member_list_item template, there is the following line:
Code:
<div class="userBlurb dimmed">{xen:helper userBlurb, $user}</div>
This allows for something like the following:
Website Manager, Male, from North Texas
I'm trying to duplicate this feature on a page, within an addon, yet the code is identical:
Code:
<div class="userBlurb dimmed">{xen:helper userBlurb, $user}</div>
The problem is that instead of saying ", from <location>", it is missing entirely. So you have the following:
Website Manager, Male
Any ideas where I'm going wrong?
Thanks!
 

Brogan

XenForo moderator
Staff member
#2
It's possible the $user record doesn't contain the data.

You can dump $user on each page/template to see the difference.
Code:
{xen:helper dump, $user}
 
#3
Thank you Brogan.

Not only does it not contain the data, but it does not include nearly as many fields as when I dump the data for the XF Member's page.

So this is a coding issue... do you know which source file I need to investigate so I can see why there are fields that are getting skipped, when it's not the Member's page? IE: it appears I'm running into this sort of problem:

If it is the Member's page, include all fields. Otherwise, include a portion of them.

Cheers
 
#6
Ah, if anyone has a similar problem with the above, the problem is that my page is missing a query for the xf_user_profile table. The Member's page seems to make more than one query: xf_user obviously, and xf_user_profile table among them.