I am getting the following error:

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /dev-tests/nc_commerce/select-delivery-location
StatusText: OK
ResponseText:
Please confirm your current location. | Commerce Cielo Test
@import url("http://localhost/dev-tests/modules/system/system.base.css?m5zkqf");
@import url("http://localhost/dev-tests/modules/system/system.menus.css?m5zkqf");
@import url("http://localhost/dev-tests/modules/system/system.messages.css?m5zkqf");
@import url("http://localhost/dev-tests/modules/system/system.theme.css?m5zkqf");
@import url("http://localhost/dev-tests/misc/ui/jquery.ui.core.css?m5zkqf");
@import url("http://localhost/dev-tests/misc/ui/jquery.ui.theme.css?m5zkqf");
@import url("http://localhost/dev-tests/modules/overlay/overlay-parent.css?m5zkqf");
@import url("http://localhost/dev-tests/modules/contextual/contextual.css?m5zkqf");
@import url("http://localhost/dev-tests/modules/comment/comment.css?m5zkqf");
@import url("http://localhost/dev-tests/modules/field/theme/field.css?m5zkqf");
@import url("http://localhost/dev-tests/modules/node/node.css?m5zkqf");
@import url("http://localhost/dev-tests/modules/search/search.css?m5zkqf");
@import url("http://localhost/dev-tests/modules/user/user.css?m5zkqf");
@import url("http://localhost/dev-tests/profiles/commerce_kickstart/modules/views/css/views.css?m5zkqf");
@import url("http://localhost/dev-tests/sites/cielo-commerce/modules/admin_menu/admin_menu.css?m5zkqf");
@import url("http://localhost/dev-tests/sites/cielo-commerce/modules/admin_menu/admin_menu.uid1.css?m5zkqf");

Comments

aliaric’s picture

Subscribe. Got same problem.
Maybe that soliution will help.

frjo’s picture

Status:Active» Closed (cannot reproduce)
kbrinner’s picture

Status:Closed (cannot reproduce)» Active

I tried the fix suggested in the Panels issue cited in #2 - I changed the max_execution_time to 180 in my php.ini. Restarted apache and cleared Drupal cache just to be on the safe side, and I am still seeing the same error.

This error is caused when I add ctools-use-modal and ctools-modal-modal-popup-medium in the Feedback settings at admin/appearance/feedback-simple to the CSS classes field - it now reads feedback_simple ctools-use-modal ctools-modal-modal-popup-medium

I also tried creating the fix cited at http://drupal.org/node/1299158 and am still seeing the same errors (not surprisingly).

With either fix I can see that the css classes are being applied to the feedback link:

<div id="feedback_simple">
<a style="top: 30%; height: 100px; width: 35px;" class="feedback_simple-right feedback_simple ctools-use-modal ctools-modal-modal-popup-small ctools-use-modal-processed" href="/feedback">
<img width="35" height="100" src="/sites/all/modules/contrib/feedback_simple/feedback_simple.gif" alt="Feedback">
</a>
vegantriathlete’s picture

I can confirm that I am also getting this error. I have followed the suggestion of increasing max_execution_time to 180 and have confirmed that the change is in place.

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /modal_forms/ajax/login
StatusText: OK
ResponseText:
Dashboard | Washington DC is going green! 
*/-->
*/-->
*/-->
*/-->

There is a lot more in the response text. It looks like it's loading the page contents -- importing the CSS files and returning the information on the page.

I am using an Omega sub-theme, but still get the error when I use Bartik.

Drupal 7.19
Modal Forms 7.x-1.2
Chaos tools 7.x-1.2

I am also using hook_user_login:

/**
* Implements hook_user_login
*/
function ggt_user_login(&$edit, $account) {
  if (!isset($_POST['form_id']) ||
      $_POST['form_id'] != 'user_pass_reset') {
    drupal_goto('ggt/quarterback/' . $account->uid);
  }
}

If I comment out the code, then the login works fine. So, maybe this is choking on the drupal_goto?

frjo’s picture

Category:bug» support
vegantriathlete’s picture

Why do you consider this a support request? When logging in without the modal things work just fine. It seems like the modal is running into an issue when a drupal_goto is being used. This seems like a bug in the module to me. Using a drupal_goto in a hook_user_login is not such an unusual thing. I have not yet had time to investigate further.

Please understand that I'm not trying to be snippy here. I want to do this the right way. Interestingly, there is a post on the Planet (http://yaremchuk.ru/blog/we-should-not-use-drupalgoto-function-our-modul...) that may relate to this. It says NOT to use a drupal_goto in our module hooks.

When I look at the D7 code for Login Destination to see how they are accomplishing the redirect, I see that their comments say (sic)

// We redirect by using the drupal_goto_alter hook. If we simply
// call drupal_goto() it may break compability with other modules. If we set
// the $_GET['destination'] variable we will loose the possibility to redirect
// to an external URL.

So, am I creating the problem by using drupal_goto? Would the modal work if I use hook_drupal_goto_alter?

frjo’s picture

I think this is a good explanation about when (or rather when not) to use drupal_goto.

http://federicojm.com/en/blog/drupalgoto-evil

vegantriathlete’s picture

So, I guess I *am* asking for support here.

In my use case, I do need to have a way to redirect a user to the appropriate place after they log in. In particular, I want them to go to that quarterback function I have above so that it can decide where to send them from there.

Is the answer that I need to use hook_drupal_goto_alter?

Edit: as it turns out, in my case I can "trick" it by setting the $_GET['destination'] value. While Login Destination was worried about being able to redirect to external URLs, I don't have to worry about that.

jcmartinez’s picture

You may want to try updating JQuery.

I had a similar issue and was about to post my error code. I installed jQuery Update and it solved the problem for me.

Set jQuery Update to the version of jQuery 1.7 instead of 1.5 that comes with Drupal 7.

Sorry I double posted this at http://drupal.org/node/1909022#comment-7327694 because both issues seems to be similar.

Hope this helps.

BParticle’s picture

I have tried to update jquery, and I'm not using Panels, and I'm not redirecting users after login, but still experiencing this behaviour. Funny thing is it only happens with certain roles. As administrator I didn't experience it, until normal registered users started using the website and sending me the error messages. It's a shame, but I'll turn this feature off for now.

giufog’s picture

Stesso problema

poja’s picture

user/[uid]/contact is where I get this error. The modal loads fine on a webform link or on a general contact link; I only get it when trying to open a modal on a specific user's contact form. Examples:

Works:
modal_forms/nojs/webform/51
modal_forms/nojs/contact

Returns HTTP 200 error:
user/131/modal_forms/nojs/contact

I thought it might be because I am using an URL alias on user paths, but I can reproduce the error on another site that doesn't use aliases. I've tried enabling/disabling jquery update, changing the versions of jquery, etc., all with the same result.

thoughmas’s picture

I was getting the same error on a custom link.

All I did was setup a content pattern path for web form nodes and then make sure to use that URL when I called the form.

On URL Aliases page: /admin/config/search/path/patterns

Set Pattern for all Webform paths to : /modal_forms/nojs/webform/[node:nid]

In my custom link:
<a class="ctools-use-modal ctools-modal-modal-popup-medium" href="http://localhost/[mylocalsite]/modal_forms/nojs/webform/39">Click for modal</a>

DocDJ-forum’s picture

I am getting this error during a clean install of Kickstart. The error occurs during the step for installing the Demo Store. If I click on "go to error page", I get immediately sent to "import content". From there, the errors multiply like rabbits. Clicking on "go to error page", re-loading the page showing the error or using the browser "go back" function all cause recurrences of more and more AJAX errors.

I have increased my execution time to 330. Didn't help.

This is EXTREMELY FRUSTRATING for a new user just trying to get Kickstart installed. If anything begged for a proper fix by the creators of a project, this is it!

DocDJ-forum’s picture

Additinal info. The go-back caused a "hang" inthe browser. I waited 5 minutes, only had a blank page. Opened a different browser tab and tried /index.php and got the Kickstart banner page, which had no content other than the CK logo with "contact", "about" links that led to uncompleted pages.

Any tips would be greatly appreciated.

DocDJ-forum’s picture

Continuing the saga.
I looked ion my mysql DB .err file and saw this:
Server hostname (bind-address): '*'; port: 3306
2014-06-04 06:02:35 2996 [Note] IPv6 is available.
2014-06-04 06:02:35 2996 [Note] - '::' resolves to '::';
2014-06-04 06:02:35 2996 [Note] Server socket created on IP: '::'.

ANy idea where that comes from and how to fix it? I was installing on "localhost". Firewall allows public access. port 3306 is open and directed to my PC (Win7 pro x64).

DocDJ-forum’s picture

Deleted the database. Restarted the install. decided against Demo SIte. AJAX errors again during "install additional functionality". Clicked on "go to error page" process continued and got errors in "import content". Click again on "go to error page" and got sent to "Drupal is already installed - empty the database to restart".

I don't know anything about AJAX and I am a novice at PHP and MySql. I was led to believe (from all the comments on the internet) that Kickstart was the way to go for an easy install of Commerce. I DO have PHP, PHPMyAdmin and MySql working properly.

Is there any possibility that AJAX is trying to get a my site (localhost) and not finding it? Where should I look for any error messages?

Regards,
DJ

susoson’s picture

Confirming, the recommendation in comment #12 worked for me. Just changed the alias manually and now working as expected.

vegantriathlete’s picture

@DocDJ-form: Disclaimer - I have not used Commerce Kickstart so I don't know if it makes use of this module. I think you are posting your question in the wrong place. It seems you are having an issue with Commerce Kickstart. If you need support you should search / post in its issue queue.

carlos@ukelele.la’s picture

I can confirm #13 URL Alias solves the problem, been having this problem on certain pages but was impossible to pinpoint the source. URL Alias implementation solved the modal launch in any type of page (template, simple view, complex view, etc).

Thank you thoughmas for the clever "patch"

vulfox’s picture

I'm getting this with login link:
<a href= /user/login ...
in a block

I get it in Safari but not Chrome

jomarocas’s picture

dont working with a custom url
with module link i create a custom link with "modal_forms/nojs/eform/submit/name-form"
and create
<a class="ctools-use-modal ctools-modal-modal-popup-small ctools-use-modal-processed" href="/modal_forms/nojs/eform/submit/name-form">Share</a>

and dont working error ajax, please a patch?

kyleheney’s picture

I can't get this working without getting the Ajax HTTP 200 error. It seems like it's been noted in several different issues on here, but I don't know what the actual solution is.

All I want is my login form to be in a modal form. I have tried enabling it from the module's config page, but I receive the Ajax error popup after inputting login credentials.

I also tried disabling the Login form at the module's config page, and just creating a block with a link to the modal form popup, but I get the same error.

thoughmas’s picture

I forget how I got around the issue, but sometimes the solution varies. If you want me to take a look at your site, please email me at thomas@open-think.com. Do you have a dev site? If we fix it we can post the solution here.

kyleheney’s picture

We do have a dev site, but it's essentially a copy of our actual site, so I'd rather not give access to an unknown user (no offense).

kyleheney’s picture

I get the same error when I tried the Ajax Register module (seems like a very similar module for getting the login form to popup).

The path in the error message when using Modal Forms is: /modal_forms/ajax/login?destination=home

The path in the error message when using Ajax Register is: /ajax_register/login/ajax

kyleheney’s picture

For anyone having similar issues, I highly recommend the module "Drop Down Login". It is purely for the Login form, but works great.

https://www.drupal.org/project/drop_down_login

millionleaves’s picture

I just encountered a version of this error when trying to enable a modal webform on a site I'm building.

It worked fine when I was logged in and on the home page, but not when I was on any other page OR when I wasn't logged in.

There were two causes which were easy to fix:

  1. The webform was unpublished, and generated this error for anonymous users.
  2. I used the manual link examples from the module page. The examples supplied are for the login modal form. However, for a webform, the link breaks if you're not on the home page unless you start the URL to the form with /modal instead of just modal. Obvious in hindsight, but not necessarily the first thing that springs to mind when confronted with the error described in this issue.

Hopefully this helps someone.