grep -in reference_dialog -d recurse *
references_dialog.api.php:112:function hook_reference_dialogue_form_alter(&$entity_form, &$form_state) {
references_dialog.dialog_widgets.inc:15: 'dialog_form' => 'node_reference_dialog_form',
references_dialog.module:565: 'path' => drupal_get_path('module', 'reference_dialog') . '/views',
references_dialog.module.orig:565: 'path' => drupal_get_path('module', 'reference_dialog') . '/views',

CommentFileSizeAuthor
#1 2375741-fixing_typo-1.patch458 bytesmarcelovani
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

marcelovani’s picture

FileSize
458 bytes

Fixing a typo that is causing the following error
WD system: The following module is missing from the file system: reference_dialog. [error]

marcelovani’s picture

Version: 7.x-1.0-beta1 » 7.x-1.x-dev
Status: Active » Needs review
marcelovani’s picture

I applied the patch agains the dev version.

I have fixed only the references_dialog.module, which was causing the error.

I didn't want to fix this 'dialog_form' => 'node_reference_dialog_form' because I don't know what it is for, that function doesn't even exist.

references_dialog.module.orig is not part of this module.

weri’s picture

Priority: Normal » Critical
Status: Needs review » Reviewed & tested by the community

It's really important, that this typo is fixed, because this triggers unnecessary calls to drupal_system_listing() which could be a performance problem. I think this is a critical bug.

I reviewed and tested the patch. I hope it will be committed soon.

WorldFallz’s picture

.orig file is probably left over from a failed patch attempt. And searching for 'reference_dialog' and making the change yields:

<?php
diff --git a/references_dialog.dialog_widgets.inc b/references_dialog.dialog_widgets.inc
index 02efc48..7d29e93 100644
--- a/references_dialog.dialog_widgets.inc
+++ b/references_dialog.dialog_widgets.inc
@@ -12,7 +12,7 @@ function references_dialog_references_dialog_widgets() {
   return array(
     'node_reference_autocomplete' => array(
       'element_type' => 'textfield',
-      'dialog_form' => 'node_reference_dialog_form',
+      'dialog_form' => 'node_references_dialog_form',
       'entity_type' => 'node',
       'format' => '$label [nid: $entity_id]',
       'views_query' => 'references_dialog_node_reference_views_query',
@@ -73,7 +73,7 @@ function references_dialog_references_dialog_widgets() {
     ),
     'references_dialog_term_reference' => array(
       'element_type' => 'textfield',
-      'dialog_form' => 'term_reference_dialog_form',
+      'dialog_form' => 'term_references_dialog_form',
       'entity_type' => 'taxonomy_term',
       'format' => '$label',
       'views_query' => 'references_dialog_term_reference_views_query',
diff --git a/references_dialog.module b/references_dialog.module
index 6dd1025..9612a04 100644
--- a/references_dialog.module
+++ b/references_dialog.module
@@ -548,7 +548,7 @@ function references_dialog_close_on_submit() {
 function references_dialog_views_api() {
   return array(
     'api' => 3,
-    'path' => drupal_get_path('module', 'reference_dialog') . '/views',
+    'path' => drupal_get_path('module', 'references_dialog') . '/views',
   );
 }
?>

imo the first 2 mods are not correct. 'node_reference_dialog_form' should probably be 'node_reference_references_dialog_form' and likewise 'term_reference_dialog_form' should be 'term_reference_references_dialog_form'. However, as marcelovani pointed out, these functions don't actually exist anywhere. I think simply removing those lines is probably all that's needed, but I'm going to do more research and testing first.

In the meantime, I'm committing the critical hunk.

WorldFallz’s picture

Status: Reviewed & tested by the community » Active

Setting back to active while I investigate the other 2 'misspellings'.

arosboro’s picture

The views api hook was causing a performance issue for me, renaming to references_dialog fixed this.

Alka Kumari’s picture

Whats the update for the 'node_reference_dialog_form' should be 'node_reference_references_dialog_form' and 'term_reference_dialog_form' should be 'term_reference_references_dialog_form'? Or does these lines need removing?

nicolasg’s picture

I can confirm that in the latest downloadable branch the mispelling exists in the function

function references_dialog_views_api() {
  return array(
    'api' => 3,
    'path' => drupal_get_path('module', 'reference_dialog') . '/views',
  );
}

This causes approximatly an added 200msec delay on page rendering as it causes drupal_get_filename() to do a fuzzy search for the "reference_dialog" which doesnt exist.

Correct:

function references_dialog_views_api() {
  return array(
    'api' => 3,
    'path' => drupal_get_path('module', 'references_dialog') . '/views',
  );
}
IRuslan’s picture

Status: Active » Reviewed & tested by the community

It's very annoying and old issue, i suggest to push at least fix for references_dialog_views_api() forward.

bburg’s picture

I just uncovered this issue profiling a site with horrendous performance. Please push a release!

WorldFallz’s picture

Status: Reviewed & tested by the community » Needs work

I'm diving back into this module along with a new maintainer (thanks to dgtlmoon for volunteering!), and contrary to #10, the critical misspelling has been fixed in 7.x-1.x for some time now.

I just double checked and both the git repo and the downloadable dev snapshot no longer have the misspelling as stated in #10.

The first two hunks from #5 (the values of the 'dialog_form' key in the arrays) are still there, but I can't see if they make a difference or if fixing them will break BC and I haven't had a chance to test it thoroughly yet.

Setting back to 'needs work' while I figure out the effect of fixing the other 2 instances.

junaidpv’s picture

Because of the typo, #1 fix that, we were having a nasty bug issuing following fatal error, while we are having views_rules module enabled.

Fatal error: Call to a member function get_option() on null in sites/all/modules/ctools/views_content/views_content.module on line 192

This typo was causing to have a watchdog log message reporting about non-existing item. Consequently views module to have incomplete cache of its plugins.

I found this typo after debugging 2-3 days! and was about to submit the patch. Found it is already here and applied in code.

SocialNicheGuru’s picture

So does the patch work for you?

junaidpv’s picture

Yes, it did.

Jan-E’s picture

The patch in #1 is really needed, now that Drupal 7.50 triggers this warning by default:
https://www.drupal.org/node/2487215

WorldFallz’s picture

fonant’s picture

I can confirm that patch in #1 is needed, and works, to fix warnings from Drupal 7.50 about the "reference_dialog" module being missing from the filesystem.

Jan-E’s picture

@18: maybe it is there in git trunk. But it is not there in the latest (beta) release.

3magnus’s picture

Hi, @WorldFallz. How about publishing a beta2 version so this issue can move forward instead of keep repeating itself through new users? (specially now, after Drupal 7.50 release)
Are there new features or incompatibilities in 1.x-dev?
Cheers.

WorldFallz’s picture

@3magnus excellent suggestion! Beta2 release, complete with release notes describing the changes since beta1, should be available on the project page shortly.

mpotter’s picture

Status: Needs work » Fixed

Since it seems like this is fixed in Beta2, I'm going to close this issue as Fixed so I don't keep seeing the status on this and thinking that I need to apply this patch anymore. If there are remaining spelling issues, please open a new issue since the patch in #1 was already committed.

Status: Fixed » Closed (fixed)

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