Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-9140

Check current board version in incremental update packages

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.0.7-PL1
    • Fix Version/s: 3.0.8-RC1
    • Component/s: Update system
    • Labels:
      None

      Description

      Support thread

      User downloaded 3.0.7 to 3.0.7-pl1 update package and ran it on 3.0.6 board. The update process then executed "successfully" without making, supposedly, any of the 3.0.6 to 3.0.7 changes. The user then restored database from backup and reran the update using the correct package.

      The suggestion is to check current board version in updating code when using version-specific incremental update packages.

        Activity

        Hide
        Black Antitoon Black Antitoon [X] (Inactive) added a comment -

        Looks like a duplicete of this ticket, which was marked as Will not fix.

        Acyd said that this is intentional because many user asked for "unsupported updates" to be technically allowed. In any case I second the request to add a non-blocking notice if you are trying to update the board with the wrong package.

        Show
        Black Antitoon Black Antitoon [X] (Inactive) added a comment - Looks like a duplicete of this ticket, which was marked as Will not fix. Acyd said that this is intentional because many user asked for "unsupported updates" to be technically allowed. In any case I second the request to add a non-blocking notice if you are trying to update the board with the wrong package.
        Hide
        Oleg Oleg [X] (Inactive) added a comment -

        I think a prominent warning notice will suffice. There is no reason to reduce the functionality of the updater.

        Show
        Oleg Oleg [X] (Inactive) added a comment - I think a prominent warning notice will suffice. There is no reason to reduce the functionality of the updater.
        Hide
        Black Antitoon Black Antitoon [X] (Inactive) added a comment -

        Maybe I was not clear enough, but this is exactly what I meant with "non-blocking notice".

        Show
        Black Antitoon Black Antitoon [X] (Inactive) added a comment - Maybe I was not clear enough, but this is exactly what I meant with "non-blocking notice".
        Hide
        leviatan21 leviatan21 [X] (Inactive) added a comment -

        I made some test on this and this is the way I solve it :

        in the root/install/install_update.php file
        FIND :

        		// Check if the update files stored are for the latest version...
        

        BEFORE ADD :

         
        		// Check if the update files stored are for the actual version...
        		if ($config['version'] != $this->update_info['version']['from'])
        		{
        			$this->unequal_version = true;
         
        			$template->assign_vars(array(
        				'S_ERROR'		=> true,
        				'ERROR_MSG'	=> sprintf($user->lang['INCOMPATIBLE_UPDATE_FILES'], $config['version'], $this->update_info['version']['from'], $this->update_info['version']['to']))
        			);
        		}
        

        Show
        leviatan21 leviatan21 [X] (Inactive) added a comment - I made some test on this and this is the way I solve it : in the root/install/install_update.php file FIND : // Check if the update files stored are for the latest version... BEFORE ADD :   // Check if the update files stored are for the actual version... if ($config['version'] != $this->update_info['version']['from']) { $this->unequal_version = true;   $template->assign_vars(array( 'S_ERROR' => true, 'ERROR_MSG' => sprintf($user->lang['INCOMPATIBLE_UPDATE_FILES'], $config['version'], $this->update_info['version']['from'], $this->update_info['version']['to'])) ); }
        Hide
        naderman Nils Adermann added a comment -

        Used the proposed patch with tiny formatting / comment adjustments.

        Show
        naderman Nils Adermann added a comment - Used the proposed patch with tiny formatting / comment adjustments.
        Hide
        bantu Andreas Fischer added a comment -

        naderman, your patch changes the last line. That's not intented, right?

        Show
        bantu Andreas Fischer added a comment - naderman, your patch changes the last line. That's not intented, right?
        Hide
        bantu Andreas Fischer added a comment -

        Changed commit to not alter last line.

        Show
        bantu Andreas Fischer added a comment - Changed commit to not alter last line.
        Hide
        nickvergessen Joas Schilling added a comment -

        The fix shoudl use $this->current_version, else the message will be displayed after the database got updated.

        Show
        nickvergessen Joas Schilling added a comment - The fix shoudl use $this->current_version, else the message will be displayed after the database got updated.

          People

          • Assignee:
            nickvergessen Joas Schilling
            Reporter:
            Oleg Oleg [X] (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development