Moodle
  1. Moodle
  2. MDL-17405

Installer broken by call to formslib

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Installation
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Rank:
      30233

      Description

      When the web installer gets to the environmental checks it dies on call to formslib.. did a debgging('foo') to get the backtrace

      foo
      line 24 of lib/formslib.php: call to debugging()
      line 30 of lib/portfolio/forms.php: call to require_once()
      line 35 of lib/portfoliolib.php: call to require_once()
      line 2579 of mod/data/lib.php: call to require_once()
      line 555 of lib/environmentlib.php: call to include_once()
      line 452 of lib/environmentlib.php: call to environment_custom_checks()
      line 86 of lib/environmentlib.php: call to environment_check()
      line 802 of install.php: call to check_moodle_environment()
      line 610 of install.php: call to form_table()

      Warning: require_once(HTML/QuickForm.php) [function.require-once]: failed to open stream: No such file or directory in /srv/moodledev/moodle/lib/formslib.php on line 27

      Fatal error: require_once() [function.require]: Failed opening required 'HTML/QuickForm.php' (include_path='.:/usr/share/php:/usr/share/pear') in /srv/moodledev/moodle/lib/formslib.php on line 27

        Issue Links

          Activity

          Hide
          Petr Škoda added a comment -

          eh, just noticed that too - seems to work fine in 1.9.x

          Show
          Petr Škoda added a comment - eh, just noticed that too - seems to work fine in 1.9.x
          Hide
          Dan Poltawski added a comment -

          Portfolio not in 1.9 and including call to formslib?

          Presumably its broken by the pear include_path 'hack' not being setup at that point

          Show
          Dan Poltawski added a comment - Portfolio not in 1.9 and including call to formslib? Presumably its broken by the pear include_path 'hack' not being setup at that point
          Hide
          Samuli Karevaara added a comment -

          What Dan said: work's fine if the ini_set trick is done in the formslib.php, as it used to. Maybe it should be done in the beginning of install.php, as config.php is not present to call the setup.php yet?

          Show
          Samuli Karevaara added a comment - What Dan said: work's fine if the ini_set trick is done in the formslib.php, as it used to. Maybe it should be done in the beginning of install.php, as config.php is not present to call the setup.php yet?
          Hide
          Samuli Karevaara added a comment -

          The environment check is calling the function data_check_required_entries_fields(), for this function it includes the /mod/data/lib.php. This file has require_once('portfoliolib.php') is outside the called function, maybe it's not even needed by the install.php, but just included "in case"?

          Show
          Samuli Karevaara added a comment - The environment check is calling the function data_check_required_entries_fields(), for this function it includes the /mod/data/lib.php. This file has require_once('portfoliolib.php') is outside the called function, maybe it's not even needed by the install.php, but just included "in case"?
          Hide
          Petr Škoda added a comment -

          hmm, module specific code does not belong into environment.xml, 3rd party modules can not do this, there is no reason why official mods should be allowed to do it - going to rewrite the this part

          Show
          Petr Škoda added a comment - hmm, module specific code does not belong into environment.xml, 3rd party modules can not do this, there is no reason why official mods should be allowed to do it - going to rewrite the this part
          Hide
          Petr Škoda added a comment -

          should be fixed now....

          Show
          Petr Škoda added a comment - should be fixed now....
          Hide
          Jérôme Mouneyrac added a comment -

          Hi Petr,
          in mod/data/db/upgrade.php if there is not flag, we don't need to unset it:

          if (!get_config('data', 'requiredentriesfixflag')) {
          unset_config('requiredentriesfixflag', 'data');
          ...

          You probably wanted to unset it if there is one...

          Show
          Jérôme Mouneyrac added a comment - Hi Petr, in mod/data/db/upgrade.php if there is not flag, we don't need to unset it: if (!get_config('data', 'requiredentriesfixflag')) { unset_config('requiredentriesfixflag', 'data'); ... You probably wanted to unset it if there is one...
          Hide
          Petr Škoda added a comment -

          hmm, yes - will have a look at it again today

          Show
          Petr Škoda added a comment - hmm, yes - will have a look at it again today
          Hide
          Jérôme Mouneyrac added a comment -

          I reopened this issue in order to remind you, Petr. I just fixed the MDL-16999. Thanks.

          Show
          Jérôme Mouneyrac added a comment - I reopened this issue in order to remind you, Petr. I just fixed the MDL-16999 . Thanks.
          Hide
          Petr Škoda added a comment -

          flag unsetting moved, thanks

          Show
          Petr Škoda added a comment - flag unsetting moved, thanks

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: