2

I have installed the Drupal 7.17 security update, and I am having some issues with my site.

If I comment out the $base_url ='www.xxx.com'; line in the setting.php file, the AJAX calls work; when I uncomment that line, the AJAX calls fail.

What could be the reason behind this? how can I get my base_url working again?

1

Make sure you didn't already include a base URL in your ajax link. For my development site, http://localhost/project1/ajaxlink, the following will work perfectly when no base URL has been set.

$.ajax({url: 'project1/ajaxlink', ...

In case a base URL has been set, the AJAX call is equivalent to the following, which will not work.

$.ajax({url: 'project1/project1/ajaxlink', ...
|improve this answer|||||
  • '#ajax' => array( 'callback'=>'contact_form_alters_submit_callback'), i used default path in ajax system/ajax. my ajax are working correctly on localhost, but it will not woring on live server, if i bypass the folder name of my website on live server using $base_url. – sarfraz Nov 29 '12 at 11:06
  • @sarfraz did you checked the error showing in console? – Serjas Nov 29 '12 at 11:24
  • thanks sir, your reply, solved my problem adding rewrite rule in htaccess file. – sarfraz Nov 30 '12 at 10:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.