Reputation: 5396
I have very strange errors in my logs on my website. The site is based on Zend Framework and I frequently has this or similar errors:
2011-10-16T03:02:57+02:00 ERR (3): Error requesting: /js/min/,e).html(d).prependTo(f);if(c.isFunction(b.beforeclose)&&!c.isFunction(b.beforeClose))b.beforeClose=b.beforeclose;f.find( from ip: 24.132.216.36
Invalid controller specified (js)
#0 /application/include/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#1 /application/include/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
#2 /application/Bootstrap.php(271): Zend_Application_Bootstrap_Bootstrap->run()
#3 /application/include/Zend/Application.php(366): Bootstrap->run()
#4 /public/index.php(11): Zend_Application->run()
#5 {main}
Now I know that there is no controller /js at all. What is funny that in the request is the part of the jQuery UI script. I have no information about what browser did those requests and from which site. The script in the jQueryUI is part from minified file jQuery UI Dialog 1.8.16 but sometimes the errors are which diffrent parts of the minified script.
I tried to get to the source of jQuery UI Dialog 1.8.16 and i found that this is the code from the script:
uiDialogTitle = $('<span></span>')
.addClass('ui-dialog-title')
.attr('id', titleId)
.html(title)
.prependTo(uiDialogTitlebar);
//handling of deprecated beforeclose (vs beforeClose) option
//Ticket #4669 http://dev.jqueryui.com/ticket/4669
//TODO: remove in 1.9pre
if ($.isFunction(options.beforeclose) && !$.isFunction(options.beforeClose)) {
options.beforeClose = options.beforeclose;
}
uiDialogTitlebar.find("*").add(uiDialogTitlebar).disableSelection();
Those errors are always show only with the jQueryUI minified scripts. I have also many other scripts but only jQueryUI source sometimes appear in the get request. Does anybody have similar errors and can help?
Upvotes: 0
Views: 674
Reputation: 555
I had same problem and htacces changes helped me but later I found that really reason was that js file was empty. after addins some code in js file problem solved and there was not needed to change htaccess at all
Upvotes: 0
Reputation: 41
It sounds to me like the request for your js code is being rewritten through your Zend Framework bootstrap? In your .htaccess file you may want to add an entry to not specific url patterns to the Zend Framework application. Here's generally what I do:
RewriteEngine on
RewriteRule ^images.*$ - [L]
RewriteRule ^img.*$ - [L]
RewriteRule ^js.*$ - [L]
RewriteRule !\.(js|ico|gif|jpg|png|css|pdf|doc|xls|csv|txt)$ index.php
Upvotes: 1