Announcement

Collapse
No announcement yet.

Problem with user profile fields

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with user profile fields

    I followed this article on VB.org written by Lynne

    http://www.vbulletin.org/forum/showt...=297041&page=4

    All appeared fine until I actually completed the field in my own profile, when I clicked on "Save" I had a :

    White page and There is a serious error and the page cannot be rendered

    I deleted the template
    Deleted the new field

    But the forum was rendered useless.

    In order to remove the error I had to re-install and upgrade to 5.1.0

    I attempted the same process, this time ensuring I followed Lynnes instructions to the letter

    I have exactly the same issue There is a serious error and the page cannot be rendered

    I am using 5.1.0 and default style

    Advice on how to get my forum up and running again please, restoring a back up does not work, the problem is in the core code, so I'm thinking I have to re-install yet again.

    Can developers please ensure that :

    These MODs need testing on all versions, and if they don't work on one the OP needs updating that effect, saying "It works fine on mine" isn't a good reason to not update it.

  • #2
    Did you set the profile field as required?

    Comment


    • #3
      Thanks for bringing this up, we were able to identify a bad block of code this morning, and re-open an old bug and I have a temporary fix for you.

      You should be able to use:
      {vb:raw conversation.userinfo.userfield.fieldX}

      In the templates, after applying the following change to

      core/vb/library/content/text.php

      Find

      PHP Code:
       if (!$canseehiddencustomfields)
      {
      // Get profile fields information
      $fieldsInfo vB_Cache::instance(vB_Cache::CACHE_STD)->read('vBProfileFields');

      if (empty(
      $fieldsInfo))
      {
      $fieldsInfo $this->assertor->getRows('vBForum:profilefield');
      vB_Cache::instance(vB_Cache::CACHE_STD)->write('vBProfileFields'$fieldsInfo1440, array('vBProfileFieldsChg'));
      }

      foreach (
      $fieldsInfo as $field)
      {
      $fields['field' $field['profilefieldid']] = $field['hidden'];
      }

      Change it too
      PHP Code:

      // Get profile fields information
      $fieldsInfo vB_Cache::instance(vB_Cache::CACHE_STD)->read('vBProfileFields');
        if (empty(
      $fieldsInfo))
      {
      $fieldsInfo $this->assertor->getRows('vBForum:profilefield');
      vB_Cache::instance(vB_Cache::CACHE_STD)->write('vBProfileFields'$fieldsInfo1440, array('vBProfileFieldsChg'));
      }
        foreach (
      $fieldsInfo as $field)
      {
      $fields['field' $field['profilefieldid']] = $field['hidden'];

      Last edited by Zachery; Wed 23rd Apr '14, 8:46am.

      Comment


    • #4
      Ok done that

      Info is not being displayed in postbit.

      I have cleared the cache vis the ACP and Cntrl + F5

      and tried using both versions of the MOD

      Comment


      • #5
        Update:

        When I use this code in the template it displays the custom field twice :
        Code:
        {vb:data userInfo, user, fetchProfileInfo, {vb:raw conversation.userid}}
        <vb:if condition="$userInfo['field8']"><li><label>{vb:phrase field8_title}:</label> <span>{vb:raw userInfo.customFields.default.field8_title.val}</span></li></vb:if>
        When I use this it displays the inputted text, but not the field title twice

        Code:
        {vb:raw conversation.userinfo.userfield.field8}
        I've tried this but only get M M displayed

        Code:
        {vb:raw conversation.userinfo.userfield.field8.phrase field8_title}

        Comment


        • #6
          This has not fixed the issue.

          Still getting: There is a serious error and the page cannot be rendered

          Using the code changes suggested

          Comment


          • #7
            It is a bug due to required fields. Why this is checked before the page is displayed, I don't know. If you edit your Custom Profile Fields and remove the required portion until we fix the bug properly, you won't have the rendering error.
            Translations provided by Google.

            Wayne Luke
            The Rabid Badger - a vBulletin Cloud customization and demonstration site.
            vBulletin 5 Documentation - Updated every Friday. Report issues here.
            vBulletin 5 API - Full / Mobile
            I am not currently available for vB Messenger Chats.

            Comment


            • #8
              Has this bug been resolved for vBulletin 5.1? If not, could you please post the instructions to add a custom field to be displayed in the postbit template.
              Thank you.

              Comment


              • #9
                It isn't a problem with showing the fields in the postinfo per Lynne's instructions. That the issue happened to the original poster after they added a new field is a coincedence. The issue happens when an administrator has required profile fields that are not filled in. The issue hasn't been resolved yet but administrators should still be able to log into the AdminCP.

                http://tracker.vbulletin.com/browse/VBV-13604
                Translations provided by Google.

                Wayne Luke
                The Rabid Badger - a vBulletin Cloud customization and demonstration site.
                vBulletin 5 Documentation - Updated every Friday. Report issues here.
                vBulletin 5 API - Full / Mobile
                I am not currently available for vB Messenger Chats.

                Comment


                • #10
                  Thank you for the speedy reply. So, I can't create required profile fields without having issues? Or, I can't create a required profile field if existing users have no values for that field?
                  Thanks.

                  Comment

                  widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                  Working...
                  X