Bug tracker

This ticket has been moved to our new tracker. Open Ticket PHPBB3-8768 now.

Update from 3.0.5 to 3.0.6RC2 drops cpf setting display on viewtopic (fix completed in vcs)

Hello,

I have recently updated a board from 3.0.5 to 3.0.6RC2 and found that custom profile fields no longer where displayed in viewtopic.

For some reason this setting:
"Display on viewtopic screen:
If this option is enabled, the field will be displayed in the mini-profile on the topic screen."

is changed from yes to no when updating from 3.0.5 to 3.0.6RC2.

If you update from 3.0.5 to 3.0.6RC1 and then to 3.0.6RC2 there is no problems.

Comments / History

Posted by mtrs on Oct 2nd 2009, 08:50

In 3.0.6, there is a new custom profile fields viewtopic visibility option. But the default setting coming as 0, see below
phpBB3.0.6-RC2/install/database_update.php
Code: Select all
   PROFILE_FIELDS_TABLE         => array(               'field_show_on_vt'      => array('BOOL', 0),
            ),

That may cause current custom profile fields disappear in topic pages, so may need to configure viewtopic option at ACP again, after 3.0.6 update.

I believe, while field_show_on_vt default value is set to 0 in new custom profile fields, phpBB3 versions older than 3.0.6 should get that data value set to 1 during database update to 3.0.6

Posted by Acyd Burn (Server Manager) on Oct 2nd 2009, 11:01

stokerpiller, make sure you enable the PHPBB_QA constant, else your database will not be updated.

Assigned ticket to user "Acyd Burn"

Action performed by Acyd Burn (Server Manager) on Oct 2nd 2009, 11:02

Edited post #189495

Action performed by mtrs on Oct 2nd 2009, 11:38

Posted by stokerpiller on Oct 2nd 2009, 11:38

Its was enabled and still is.
I used the automatic updater.
Board version is showing correct under general and system tab.
The screen we get after database is updated showed no errors.
So I am quite sure the DB is updated.

Posted by Acyd Burn (Server Manager) on Oct 2nd 2009, 12:25

Then it is impossible that you get different results for updating from 3.0.5 to RC2 and RC1 to RC2. ;) Because there are no differences regarding this field.

Posted by stokerpiller on Oct 2nd 2009, 12:55

I will try reproduce it next week by installing a 3.0.5 add some cpf and then update to RC2

I am not alone with this problem: viewtopic.php?f=46&t=1796835

Posted by Kellanved (Former Team Member) on Oct 2nd 2009, 13:02

There is no real reason to do so. The problem is pretty clear cut and will only happen on updates to 3.0.6.

Posted by stokerpiller on Oct 2nd 2009, 14:26

Okay.
Its no big deal anyway.

Now for my little screw up.
I did have the same problem on the other board.
I just didnt notice :oops:

Posted by Acyd Burn (Server Manager) on Oct 3rd 2009, 11:58

Would this be ok?

Code: Select all
         // Update the Custom Profile Fields based on previous settings to the new format
         $sql = 'SELECT field_id, field_required, field_show_on_reg, field_show_profile, field_hide
               FROM ' . PROFILE_FIELDS_TABLE;
         $result = _sql($sql, $errored, $error_ary);

         while ($row = $db->sql_fetchrow($result))
         {
            if ($row['field_required'] || $row['field_show_on_reg'] || $row['field_show_profile'])
            {
               _sql('UPDATE ' . PROFILE_FIELDS_TABLE . ' SET field_show_on_vt WHERE field_id = ' . (int) $row['field_id'], $errored, $error_ary);
               $no_updates = false;
            }
         }
         $db->sql_freeresult($result);

Ticket details

Related SVN changesets