Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Just did the 6.16 core update and various module updates including Nodereference Explorer to latest DEV version and then the "browse" button wasn't working. The little ajax loading animation just kept spinning and the error caught by firefox was:
Error: Drupal.settings.cssInit is undefined
Source File: http://iccare.ca/sites/all/modules/nodereference_explorer/js/explorer.js?d
Line: 64
I installed an older version of Nodereference Explorer (nodereference_explorer 6.x-1.1-beta7) and its working again. Thats all the info I have unfortunately.
Love the module though!
cheers,
Lee
Comments
Comment #1
gnindl CreditAttribution: gnindl commentedProbably your issue is theme dependent. Which theme are you using, maybe a custom one? How and when do you include your JS scripts and CSS stylesheets in your node.tpl.php? Sharing your theme would make debugging possible.
Comment #2
gnindl CreditAttribution: gnindl commentedJust clearing the server side cache after updating should fix the problem
Comment #3
vuzzbox CreditAttribution: vuzzbox commentedI'm getting the same error. I am using the latest version of the RootCandy theme for the admin side. I have tried clearing the server side cache (assuming that by this you mean clear the cache in the admin/config/performance ) but still get the same error.
For reference here's all the javascript that's loaded by the theme:
Comment #4
vuzzbox CreditAttribution: vuzzbox commentedI've changed the status and version on this. I've been working all day to resolve the same problem:
Drupal.settings.cssInit is undefined
[Break on this error] if (!Drupal.settings.cssInit[bas...(link).attr('href') + ']').length) {
I've searched the source code for my entire site looking for an instance where this method is defined, but the only place where I come up with a reference to cssInit is in the nodereference explorer module and only on the line where its called. It doesn't seem to be defined in anywhere else in the site.
As the with the original poster on this message, if I go back to nodereference_explorer 6.x-1.1-beta7, it works (although i did have to rename a file called nodereference_explorer_plugin_cck_nodereference.inc0000644 to nodereference_explorer_plugin_cck_nodereference.inc in order for it to work - that might just be a source control thing I don't understand, though)
- Ed
Comment #5
gnindl CreditAttribution: gnindl commentedThe source code from #3 seems fine, as the array Drupal.settings.nodereference_explorer.cssInit is set with the initial page load, i. e.:
So somehow, this JavaScript is not correctly initialized/read. I could reproduce this error when I upgraded from 1.1-beta7 to 1.1-rc1, as the previous version doesn't provide this array. As I said after clearing the server-side cache, i. e. use admin menu http://localhost/drupal/?q=admin_menu/flush-cache, it works again.
Otherwise it might related
* to your client, i. e. browser (which one are you using?). Try clearing the client cache.
* to your theme or configuration. This module needs certain JS settings to include CSS files.
Hint: When you comment the method nodereference_explorer_preprocess_page in nodereference_explorer.module you get the same effect (error). Maybee this method is not called properly?
Comment #6
presleyd CreditAttribution: presleyd commentedI get this error when using the module jQuery Update (http://drupal.org/project/jquery_update) which isn't terribly surprising but it would be nice if the two could work together.
Comment #7
inforeto CreditAttribution: inforeto commentedGetting this error on both 6.x-1.1-rc3 and 6.x-1.x-dev of may 5th.
Clearing both drupal cache and the browser's cache didn't work.
So far tested on firefox 3.5 and chrome.
6.x-1.1-beta7 did not show the error but isn't a solution since that version has other issues.
Comment #8
mattiasj CreditAttribution: mattiasj commentedI experience the same behaviour using 6.x-1.1-rc3 and 6.x-1.x-dev of may 5th using Zen as my base theme. My install is pretty clean so there shouldnt be much conflicts. I'm currently trying this out with Modal frame, jQuery UI and jQuery update - all latest versions.
Comment #9
mani.atico CreditAttribution: mani.atico commentedAs noted by #6 jquery_update uses a similar approach to nodereference explore in order to override the 'scripts' variable, leaving the settings declared by la later out. I managed to correct this by adding two extra lines to nodereference_explorer_preprocess_page (a clener code is possible but i'm in a rush):
But now I'm getting another js error (I'm using the link reference):
Checked the 'value' variable and it's undefined. I don't know if the error is related or if it should be in a different issue.
Comment #10
gnindl CreditAttribution: gnindl commentedCommitted #9 to the repository and it is included in 1.1-rc4. Please test it thoroughly with jquery_update as there are conflicts with the $variables['script'].
Comment #11
gnindl CreditAttribution: gnindl commentedPatch from #8 has been thoroughly tested and will therefore be included in the next release.
Comment #13
xpersonas CreditAttribution: xpersonas commentedI'm getting this error with RC5. I'm not sure I understand if this is possible to patch or not. This module is so close to being what i need perfectly. I'm so disappointed that I'm getting this error now.
Comment #14
yogeshchaugule8 CreditAttribution: yogeshchaugule8 commentedWas having the same problem mention by #9
To solve this problem I have added condition before adding blur event in nodereference_explorer_plugin_content_nodereference.js.