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

CAPTCHA plugin migration fails to detect missing plugins

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.1.0-b2
    • Fix Version/s: 3.1.0-b4
    • Component/s: Extensions, Update system
    • Labels:
      None

      Description

      When you have a MOD installed for 3.0.12 that adds a custom CAPTCHA method (such as this one https://www.phpbb.com/customise/db/mod/sortables_captcha_plugin/ ), you run into problems when upgrading to 3.1.0 b2.

      The update itself doesn't throw any errors, but the DB entry for captcha_plugin isn't altered. Since there's a big chance that the equivalent 3.1 extension version is not available directly, this entry will not be correct.

      When accessing the "spam countermeasures" page, the result will be this:

      [phpBB Debug] PHP Warning: in file [ROOT]/includes/captcha/captcha_factory.php on line 35: include(./../includes/captcha/plugins/phpbb_captcha_sortables_plugin.php): failed to open stream: No such file or directory
      [phpBB Debug] PHP Warning: in file [ROOT]/includes/captcha/captcha_factory.php on line 35: include(): Failed opening './../includes/captcha/plugins/phpbb_captcha_sortables_plugin.php' for inclusion (include_path='.;C:/php/pear')
      [phpBB Debug] PHP Warning: in file [ROOT]/includes/captcha/captcha_factory.php on line 37: call_user_func() expects parameter 1 to be a valid callback, class 'phpbb_captcha_sortables' not found
       
      Fatal error: Call to a member function get_demo_template() on a non-object in C:\htdocs\test\includes\acp\acp_captcha.php on line 124
      

      The only way to fix this by the user is to manually edit the config table and change the captcha_plugin value to phpbb_captcha_gd (or other available plugin).

        Issue Links

          Activity

          Hide
          nickvergessen Joas Schilling added a comment -

          Blocking RC1

          Show
          nickvergessen Joas Schilling added a comment - Blocking RC1
          Hide
          nicofuma nicofuma added a comment - - edited

          To handle this issue the whole system needs to be redesigned to use the dependency injection. Currently we can just check is the plugin is available in the core (to be precise, we can check if the file

          $phpbb_root_path . "includes/captcha/plugins/{$plugin_name}_plugin." . $phpEx

          exist

          Show
          nicofuma nicofuma added a comment - - edited To handle this issue the whole system needs to be redesigned to use the dependency injection. Currently we can just check is the plugin is available in the core (to be precise, we can check if the file $phpbb_root_path . "includes/captcha/plugins/{$plugin_name}_plugin." . $phpEx exist
          Hide
          nickvergessen Joas Schilling added a comment -

          We should check whether the files exists if it does update to what it should be, otherwise fall back to the default captcha from install

          Show
          nickvergessen Joas Schilling added a comment - We should check whether the files exists if it does update to what it should be, otherwise fall back to the default captcha from install

            People

            • Assignee:
              nickvergessen Joas Schilling
              Reporter:
              PayBas PayBas
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development