I think that there is a bug in the overlay-child.js.

When i try to load a custom form in an overlay window, i do not specify an action in the form. So, in the Drupal.overlayChild.behaviors.parseForms function when I am trying to retrieve the action of my custom form var action = $(this).attr('action');, I retrieve an udefined value, that is normal. The problem is at the following if statement:

if (action == undefined || (action.indexOf('http') != 0 && action.indexOf('https') != 0)) {
  action += (action.indexOf('?') > -1 ? '&' : '?') + 'render=overlay';
  $(this).attr('action', action);
}

It is true that the action is undefined so we are in the if. Then, at the first line inside the if statement ( action += (action.indexOf('?') > -1 ? '&' : '?') + 'render=overlay'; ) we have a javascript error.

Why do we check if the action is undefined and if is undefined, then we are trying to get the indexOf?

Isn' t it normal that we have a javascript error, or do I miss something?

Comments

svabael’s picture

Issue summary: View changes

code tag added in a piece of code

Version: 7.22 » 7.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.