Page 1 of 1

[solved] xajax.js

Posted: Fri Nov 28, 2008 1:05 pm
by macko
***this is to do with apache and restrictions placed by the host

a mod_security related error. adding:


  SecFilterEngine Off
  SecFilterScanPOST Off


to .htaccess file solved it until host relaxes security ***

I get the following pop up javascript error when using  >content>>pages in the admin section

Error: the xajax Javascript file could not be included. Perhaps the URL is incorrect?
URL: ../lib/xajax/xajax_js/xajax.js

I've checked the file and uploaded it again.

Server info is:

Apache version   1.3.41 (Unix)
PHP version   5.2.5
MySQL version   4.1.22-standard

thanks

Re: xajax.js

Posted: Fri Nov 28, 2008 1:22 pm
by Dee
If you check the source of that page in your browser it contains a line like this:
Open that URL and make sure it opens the Javascript file (by making sure the file is in the correct location lib/xajax/xajax_js, permissions are set correctly, etc.).

Regards,
D

Re: xajax.js

Posted: Fri Nov 28, 2008 2:06 pm
by macko
thanks for the response

I checked the source of the page and the script path is




the xajax.js file is present when i follow through the path to it.  When i search for the file in a browser i get the error :

"An appropriate representation of the requested resource /lib/xajax/xajax_js/xajax.js could not be found on this server."

the lib directory is in the public_html or root level. 
Do I need to add the full website path to this somehow?  ie: http://www.mywebsite.com/lib/xajax....etc
I presume that the ../ searches for the file from root level.  I have a feeling this is some kind of path problem as I have the same error when trying to view the image manager.

Any help greatly appreciated

Re: xajax.js

Posted: Fri Nov 28, 2008 2:26 pm
by Dee
You're using CMS Made Simple-1.4.1?

Strange it doesn't show the absolute URL on your system. I think the URL is created directly from the url settings in config.php - make sure the the config['root_url'] is correct:

Code: Select all

$config['root_url'] = 'http://www.mywebsite.com';
Regards,
D

Re: xajax.js

Posted: Fri Nov 28, 2008 3:40 pm
by macko
hi,

yes its 1.4.1
the root url of the site is correct in the config file.

thanks

Re: xajax.js

Posted: Fri Nov 28, 2008 4:02 pm
by Dee
As far as I can see the code is generated in admin/listcontent.php and uses config['root_url'] indeed... line 46:

Code: Select all

$headtext = $xajax->getJavascript($config['root_url'] . '/lib/xajax')."\n";
The only things I can imagine causing this is modified core files or files that didn't get properly overwritten during an upgrade.

Regards,
D

Re: xajax.js

Posted: Fri Nov 28, 2008 4:15 pm
by macko
Hi again Dee,

this is a first time install and the error appeared straight away ie before i'd even looked at any files. The admin section works ok, I just get the annoying popup (which I suppose I could disable) and also my image manager won't appear.  I suspect the 2 are related.

Under system information I have -

PHP Open Basedir (open_basedir):

/home/mywebcont/:/usr/lib/php:/usr/local/lib/php:/tmp Caution
Open basedir restrictions are in effect. You may have difficulty with some addon functionality with this restriction

Do you know if this might be causing problems?

Again many thanks for taking time to respond.

Re: [solved] xajax.js

Posted: Sun Jan 09, 2011 4:59 am
by replytomk3
This has started to appear for me on 1and1. Adding those lines to .htaccess crashes the website. If someone else has the same issue, please share the solution.

UPDATE:
Modifying permissions and adding those lines to .htaccess do not work.

Clearing both browser and cmsms cache took care of the problem.