It's probably time to close this!

CommentFileSizeAuthor
#1 date_popup-jquery-dependency.patch376 bytesbeanjammin

Comments

beanjammin’s picture

StatusFileSize
new376 bytes

Patch against current head adding the jquery_ui dependency to date popup.

karens’s picture

It is deliberately not a dependency because adding a new dependency to an existing configuration causes the dependent module to get its checkbox disabled so it cannot be enabled. I instead just display a warning message so you can enable the module.

beanjammin’s picture

I suspect I'm missing something obvious, but without the dependency there's nothing to stop someone from enabling date_popup without jquiry_ui, which leads to a WSOD on admin/settings/date_popup and the following error "PHP Fatal error: Call to undefined function jquery_ui_get_version()".

karens’s picture

Status: Active » Fixed

I've added new dependencies before. If I just make it a dependency my issue queue will be full of people complaining that there is no way to enable the module. If I don't you may get errors. There is no way to win. I've chosen one of two bad solutions. It's a core bug that there is no clean way to do this.

beanjammin’s picture

Status: Fixed » Closed (won't fix)

Thanks for the explanation.

I did some quick searching in the issue queue, is this the core bug you are referring to?
http://drupal.org/node/655896

http://drupal.org/node/389126 sounds somewhat similar, but not module updating related.

donquixote’s picture

Fatal error: Call to undefined function jquery_ui_get_version() in /[..]/sites/all/modules/date/date_popup/date_popup.module on line 129
(added a date_popup element in a custom form)

I understand the argument about not adding a dependency.
But can we not at least wrap these calls in some if/else logic, to have a non-wsod fallback and error message?

gabor_h’s picture

Priority: Normal » Critical
Status: Closed (won't fix) » Active

I agree with donquixote, please wrap these calls in some if/else logic.

gabor_h’s picture

Priority: Critical » Normal
kenorb’s picture

The same problem:

[30-Jun-2011 19:54:48] PHP   4. node_add($type = 'avail-dates') /Users/kenorb/Sites/drupal6/includes/menu.inc:0
[30-Jun-2011 19:54:48] PHP   5. drupal_get_form($form_id = 'avail_dates_node_form', array ('uid' => '1', 'name' => 'kenorb', 'type' => 'avail_dates', 'language' => '')) /Users/kenorb/Sites/drupal6/modules/node/node.pages.inc:57
[30-Jun-2011 19:54:48] PHP   9. form_builder($form_id = 'avail_dates_node_form',... /Users/kenorb/Sites/drupal6/sites/all/modules/contrib/date/date_popup/date_popup.module:297

[30-Jun-2011 19:54:48] PHP Fatal error:  Call to undefined function jquery_ui_get_version() in /Users/kenorb/Sites/drupal6/sites/all/modules/contrib/date/date_popup/date_popup.module on line 129
kenorb’s picture

In Status I see following description:

The Date Popup module needs code added by the jQuery UI module. This is not yet a requirement, but soon will be, so you are encouraged to install that module as soon as possible. In the meantime, a version of the needed code is included here.

It says that's not yet a requirement.
I'm trying to install it anyway, but there is related bug, where I can't: #970974: The jQuery UI plugin is missing.

Crell’s picture

If you're enabling date_popup via Drush, you get no such message. Adding a line to the .info file is the correct solution. It's been warned about forever. Anyone who complains you can point out a core bug. :-) Is there an issue for it?

(You can enable it via drush if the UI borks on you.)

Crell’s picture

I just marked #937108: Date/JQuery update modules as a duplicate.

Crell’s picture

KarenS: Another option is to force-enable the dependent module in an update hook. The update hook can refuse to run itself if the required module is not available. That gives people a UI-only way out of the core checkbox bug.

karens’s picture

arlinsandbulte’s picture

Version: 6.x-2.6 » 6.x-2.x-dev
Status: Active » Postponed

I think d.o tests are failing due to the jquery_ui dependency not being in the .info.

So... just as an experiment, I am adding it to see if it fixes tests.
I may regret it later, but let's see what happens.

commit: http://drupalcode.org/project/date.git/commit/3515ed3

I'll follow up later...

alanpeart’s picture

Just want to add my voice to the chorus here. This dependency has caught me out several times (WSOD after updating date module on several sites), it's all very well for me to read the Apache log to figure out why I'm getting 500 errors but the intern I had hired to update Drupal sites on my behalf was pulling their hair out!

escoles’s picture

Just had to spend 20 minutes looking for the reason uc_discounts_alt (which depends on date) was failing, because the dependency between date and jquery_ui is not documented. Would have been simpler if it were.

RytoEX’s picture

Issue summary: View changes

If this was released in 6.x-2.10, shouldn't this be marked as "Closed (fixed)" instead of "Postponed"? It seems to have been included in 6.x-2.10. I'm just looking for confirmation that I'm not crazy and that changing the status is the right thing to do. If I don't hear from one of the maintainers within two weeks, I'll change it myself.

jiv_e’s picture

Issue summary: View changes
Status: Postponed » Closed (fixed)