1. 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

Discussion in 'XenForo Development Discussions' started by CaptainMorgan, Nov 19, 2014.

  1. CaptainMorgan

    CaptainMorgan Active Member

    In the member_list_item template, there is the following line:
    <div class="userBlurb dimmed">{xen:helper userBlurb, $user}</div>
    This allows for something like the following:
    I'm trying to duplicate this feature on a page, within an addon, yet the code is identical:
    <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:
    Any ideas where I'm going wrong?
  2. Brogan

    Brogan XenForo Moderator Staff Member

    It's possible the $user record doesn't contain the data.

    You can dump $user on each page/template to see the difference.
    {xen:helper dump, $user}
  3. CaptainMorgan

    CaptainMorgan Active Member

    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.

  4. Brogan

    Brogan XenForo Moderator Staff Member

    The data has to be fetched using a query.

    Only the add-on developer can really change that.
  5. CaptainMorgan

    CaptainMorgan Active Member

    That I can do. Thank you - just what I needed. For some reason I didn't think it would be a problem with the addon.
  6. CaptainMorgan

    CaptainMorgan Active Member

    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.

Share This Page