Closed (fixed)
Project:
Yahoo YUI
Version:
5.x-2.0-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
31 Oct 2007 at 19:11 UTC
Updated:
27 Jan 2008 at 10:51 UTC
I'm using YUI and on my 403 page I'm getting this error:
Fatal error: Call to undefined function: drupal_add_js() in /usr/www/users/rockvote/internal/sites/all/modules/yui/yui.module on line 33
I'm also using LoginToboggan, which shows a user login form when a 403 comes up, and anonymous users can't view content (they must login).
Any ideas?
Comments
Comment #1
ChrisKennedy commentedAfter looking at it real quick, I think the drupal_add_js in yui_init() should be moved to yui_menu().
Comment #2
zadmichr commentedHi,
I've the same problem when i enable the cache, an error occurs :
Fatal error: Call to undefined function: drupal_add_js() in.....sites/all/modules/yui/yui.module on line 33
This error occurs only when i use MSIE browser, it works fine on FireFox !!
Someone has solution ?
Thanks
Comment #3
zadmichr commentedHi,
I've the same problem when i enable the cache, an error occurs :
Fatal error: Call to undefined function: drupal_add_js() in.....sites/all/modules/yui/yui.module on line 33
This error occurs only when i use MSIE browser, it works fine on FireFox !!
Someone has solution ?
Thanks
Comment #4
Nijip commentedI'm getting the same problem. I love the yui menu... but i've had to disable because of the above problem...
Comment #5
bakyildiz commentedThe drupal_add_js was in yui_menu. But we have several yui packeges. Therefore we exported the common codes to yui module. What is the reason to move the code into yui_menu ?
Comment #6
bakyildiz commentedHi Everybody,
I have enable the cache but still works fine. To solve i need to reproduce the problem locally. Can anybody help me ?
Comment #7
bakyildiz commentedPlease try the new version 2.2 and if the same problem is still there please give detailde instructions to reproduce the problem.
Comment #8
jbowman commentedI"m able to reproduce this problem by
- Turning caching on to the normal mode
- going to my site as http://hostname
If I go to my site as http://hostname/index.php then it loads correctly
Comment #9
Stardog commentedI get this problem as well. I tried moving the line to yui menu() function, but then the menu does not work.
Comment #10
WilliamSiddall commentedI've got the same problem as reported by jbowman. A brand new Drupal 5.3 install with just yui and yui-editor installed. 1.x-dev and 2.2 both show the problem. IE and Firefox both show the problem.
Comment #11
Jorrit commentedSame problem here ....
Strack trace:
Fatal error: Call to undefined function drupal_add_js() in /var/www/www.travelhome.nl/drupal5/sites/all/modules/yui/yui.module on line 33
Call Stack
# Time Memory Function Location
1 0.0002 51524 {main}( ) ../index.php:0
2 0.0015 210300 drupal_bootstrap( ) ../index.php:13
3 0.0062 408144 _drupal_bootstrap( ) ../bootstrap.inc:862
4 0.0076 486836 _drupal_cache_init( ) ../bootstrap.inc:906
5 0.0088 556740 bootstrap_invoke_all( ) ../bootstrap.inc:947
6 0.0113 761888 module_invoke( ) ../bootstrap.inc:486
7 0.0113 762056 call_user_func_array ( ) ../module.inc:386
8 0.0114 762184 yui_init( ) ../module.inc:0
On Drupal 5.6 and using Firefox
As a work-around, add
require_once './includes/common.inc';inyui.module/yui_init()Comment #12
bakyildiz commentedThanks to jorrit.
I have applied your work-around as advised. But while i can't produse the problem so i am not sure that this issue is solved. Can any one test the 2.0-dev version. I want to remind that drupal has to build the package first. So be sure that the package last modify time is after this entry. Thanks.
Comment #13
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.