Tried using this module and found it hard to customize given that the examples don't work. The dialog opens but the menu callback is empty. For the user dialog it returns a 200 if not logged in and a 403 if logged in. So it's obviously looking in the right place. I have tried this on a couple different setups. When/if I get time I will do my best to help fix it. In the meantime this seems like a very critical issue.

Comments

howto’s picture

StatusFileSize
new63.94 KB

I get the same problem

"An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /drupal7/dialog/ajax/example
StatusText: OK
ResponseText: "

Please see the image attached.

zkday’s picture

StatusFileSize
new1.04 KB

this is patch. :)

zkday’s picture

Status: Active » Needs review

change status.

moonray’s picture

Status: Needs review » Needs work

The approach taken here is correct, but the execution could use some cleanup. Also the patch is in a strange format.

13rac1’s picture

Status: Needs work » Needs review
StatusFileSize
new483 bytes

This is was really frustrating me until I looked up the docs for ajax_render(). Haha!

Standard git patch attached.

moonray’s picture

Status: Needs review » Needs work

You might want to send ajax_footer() as well, right after print ajax_render($commands) and then exit.

I've run into some strange things when trying to return just ajax_render().
This is what I wound up using in a submit function:

  drupal_add_http_header('Content-Type', 'application/json; charset=utf-8');
  print ajax_render($commands);
  ajax_footer();
  exit;

Dialog should probably provide a helper function that does this, since we can't use ajax_deliver().

zkday’s picture

Status: Needs work » Needs review
StatusFileSize
new506 bytes

Sorry, this file #2 is execution could use some cleanup.
this is patch for this.

moonray’s picture

StatusFileSize
new660 bytes

OK, I finally figured out the 'proper' way to do it.

smk-ka’s picture

Status: Needs review » Reviewed & tested by the community

#8 is working fine and *really* helps understanding the module better ;)

palmaross’s picture

StatusFileSize
new69.82 KB
new67.9 KB

Same here

Dialog example doesn't work
Skinr can't use Dialog Api

I tested it on my working D7 site - doesn't work

For neat testing I installed Drupal 7.4 and only one contrib-module: Dialog (and its submodules)

See attached dialog1.jpg for error message.

Patch #8 doesn't work for me (any patch on this page doesn't work).

Then I installed Skinr, it issues this error: see dialog2.jpg

I sure that my server (hosting) is OK, because I have on it my website with Drupal 6.22 and these modules - Dialog and Skinr. And both working fine with AJAX.

You can live see this issue with Dialog and with Skinr on my testing site: http://drupal2.rumapping.ru/dialog/example#
with this login for administrator:
user: palmaross
password: 75818506

jamesbenison’s picture

Is this module being maintained?

Anyways, I was toying with this thing a couple nights ago and fixed a couple things. Felt guilty 'cause I didn't post it and 'assumed' that others had already figured it out for themselves. In case somebody needs the help:

The dialog simple example works after applying the patch in #8 above. However, the dialog user module still doesn't display the forms.

In the dialog_user.module at around line 55:
Replace this line:

ajax_render($output);

With this line:

ajax_deliver(array('#type' => 'ajax', '#commands' => $output));

That fixes the login and register callbacks.

To fix the lost password callback, at around line 52, add this line:

module_load_include('inc', 'user', 'user.pages');

Just after this line:

dialog_display(TRUE);

Anyone know what's going on with the maintenance status here? Yes, patches would be better.

zroger’s picture

Status: Reviewed & tested by the community » Fixed

Committed patch from #8. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

jamesbenison’s picture

Would you like me to roll the other changes into a patch, or do you have it covered?

Thank you for taking care of this.