Apologies if you think this is in the wrong issue queue - please feel free to shove it elsewhere.

I'm using Node Relationships to create new nodes on a nodereference field. I'm also using UC Node Checkout to attach these new (referenced) nodes to products. Problem is, UC Node Checkout want to drupal_goto() new nodes to it's own product select form, before returning them to the node form. This seems to break Modal Frame API - the pop-up opens ok, but no content ever loads and you get the loading graphic forever.

Comments

greg.harvey’s picture

Title: Modal Frame API does not seem to handle drupal_goto(). » Modal Frame API does not seem to handle theming of a page in a pop-up if a drupal_goto() is involved.

Alright, so actually the bug report stands, but the behaviour is different (something else caused the non-loading thing). What actually happens is when the redirect occurs the theming is no longer properly handled. Noderelationships has it's own issues around this, but I think the theming on redirect belongs here?

Michsk’s picture

You might want to take a look at, http://drupal.org/node/802350#comment-4300718 it's for privatemsg, but might be the same with your issue.

greg.harvey’s picture

Hmm, that might help in some cases, but it won't help when a redirect is not because of a form submission (e.g. a drupal_goto() call) ... still, it gives me some ideas, so thank you for cross posting. =)

dsnopek’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)

Unfortunately, you're going to have to hook_form_alter() both forms and modify both for use with Modalframe. There's no way for Modalframe to automatically know that it needs to add it's Javascript and submit handler stuff on the 2nd form as well.

If what you actually want to happen is that the modal will close and redirect on the main page, you're going to have to convince UC Node Checkout to use $form_state['redirect'] rather than drupal_goto().