When you get this error you didn't downloaded jquery ui -> activating jquery ui fails -> modalframe wants to use it... It would be better to check for this in the module...

Comments

BrandTim’s picture

Status: Closed (fixed) » Active

Changing status to active as this is a major bug when installing.

If you attempt to enable jQuery UI and Modal Frame API at the same time and don't have the correct version of the jQuery UI library installed in the correct location (it took me three tries), the form submits but you get a WSOD (maybe with a PHP undefined function error).

I'm not sure why its happening, but Modal Frame API should not be throwing a PHP error on a failed install of another module. Because of this behavior, the 'failed to install' warning message from jQuery UI is not displayed.

Tim Knittel

irakli’s picture

Priority: Normal » Critical

Moving the issue status to critical, because due to this bug installing modalframe as part of an installation_profile becomes impossible :(

irakli’s picture

Priority: Critical » Normal

Sorry, after some more testing - existing code can actually be used in an installation profile. Bringing priority back to "normal"

Sorry for the confusion :(

giorgio79’s picture

+1

markus_petrux’s picture

Status: Active » Fixed

The file modalframe.info already defines the module dependency, so that should affect new installations, hence the jquery_ui should exists in that case. So we should be fine telling Drupal to explicitly load jquery_ui before checking the version in our hook_requirements('install').

http://drupal.org/cvs?commit=378908

Thanks for reporting, and sorry for the headache.

Josephnewyork’s picture

Status fixed? I had this problem as well. I had to enable jquery UI before modal frame to get around it.

markus_petrux’s picture

The jQuery UI module has been a requirement from the beginning of Modal Frame API. So the jQuery UI module must be enabled before installing Modal Frame API. That's how module dependencies work in Drupal 6.

You should not be able to install Modal Frame API until the jQuery UI module is enabled. If jQuery UI is enabled, then all we need to do is make sure the .module file is loaded when we want to check for jquery_ui_get_version(). And that is what has been fixed here.

Josephnewyork’s picture

OK, I was under the impression that required modules and their required-by should be able to be enabled at the same time. I literally do it almost daily an have never had an issue.

I thought this was an important dependency ability, especially for instillation profiles. This is good to know because I was going to create a brightcove (which depends on modal frame) installation profile and it would have confused me for hours when fails! Scratch that idea. :)

ryan_courtnage’s picture

Status: Fixed » Needs review

I think explicitly loading jquery_ui.module breaks install profiles. I applied this patch (in #5), and now after the "Set up database" step, my profile aborts with:

Warning: Table 'test_rclocal.system' doesn't exist query: SELECT filename FROM system WHERE name = 'jquery_ui' AND type = 'module' in /Users/rcourtna/Projects/wpg/includes/database.mysqli.inc on line 128

This error is affected buy the order that modules are listed in the .profile. I get the "table doesn't exist" error if jquery_ui is listed before modalframe:

function mymodule_profile_modules() {
  return array(
              'jquery_ui',
              'modalframe',
              );
}

If I reverse the order so that modalframe is listed before jquery_ui, then the check for jquery.ui >= 1.7 fails (because "jquery_ui_get_version()" doesn't exist).

I'm not sure how we can reliably check the jquery.ui version during the install phase, as it appears that, in the case of install profiles, hook_requirements() is called before the 'system' table is created.

markus_petrux’s picture

Status: Needs review » Fixed

There is nothing else to review in this issue. There was a bug that has already been fixed.

For further discussion on the hook_requirements() implementation, I think we can use this one: #798618: Deprecate support for jQuery UI library 1.6.x

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.