The module depens on the References Dialog module but it is not enforced. When a nodequeue is saved the function nodequeue_reference_nodequeue_view_submit in the .module file at line 76 is called. This function calls references_dialog_in_dialog() which is a function of the Reference Dialog module. The save will fail with a fatal error.

Comments

beltofte’s picture

Assigned: Unassigned » beltofte
chetan-singhal’s picture

@beltofte
add dependencies in nodequeue_reference.info file
dependencies[] = references_dialog

beltofte’s picture

@chetan_singhal
Thats the solution here, because the module should work without a dependency on references_dialog module. I will fix the issue be adding some module_exist() checks where functions from references_dialog is called.

chetan-singhal’s picture

@beltofte
But I got fatel error
undefined function references_dialog_in_dialog()

beltofte’s picture

Yes, and I'm not saying that you do not. The solution is not adding the dependency in the info file, because the module is architected to work without the references_dialog module, but it has one or two places where it is not checking if the references_dialog module exists. As I wrote will I fix this.....

jibran’s picture

Version: 7.x-1.1 » 7.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new725 bytes

Here is the fix same as nodequeue_reference.module:35

caspervoogt’s picture

just wanted to say this patch worked for me.

damienmckenna’s picture

damienmckenna’s picture

Assigned: beltofte » Unassigned
StatusFileSize
new2.75 KB

This works, but might it also be useful to only enable the 'nodequeue-reference/dialog/redirect' path if the module's available in the first place.

beltofte’s picture

@DamienMcKenna: Thanks for helping out to get 1.2 release out.

One comment to the patch. Will it actually work when Drupal is rebuilding the menu items and caching them? I mean references_dialog_in_dialog() is checking if $_GET['render'] == 'references-dialog' and not if the references_dialog module exists. It would make sense to change the if in nodequeue_reference_menu() to module_exists('references_dialog'), right?

damienmckenna’s picture

StatusFileSize
new2.75 KB

Duh, sorry, was distracted when I did the patch. This adds the module_exists() call, as expected.

beltofte’s picture

Thanks. I will commit it and the other patches tomorrow morning at work.

damienmckenna’s picture

@beltofte: Excellent news! Thanks!

  • d68af50 committed on 7.x-1.x
    Issue #2129817 by DamienMcKenna, jibran, beltofte: Module depends on...
beltofte’s picture

Status: Needs review » Closed (fixed)

I have comitted the two patches. Thanks for helping out fixing the issue :-)