Steps to reproduce:
1. Enable modal forms for login forms.
2. Log in using the user whose password has expired. I have used the password policy module to set the password expiry rule.
3. Ideally the user should be redirected to account edit form (something like this - user/25/edit/account?destination=node/30).
4. But a popup window appear with code on edit form dumped in it. Please find screenshot attached.

This is probably because redirect after form submit is not getting handled properly.
One of the differences I noticed which might be a culprit is destination parameter. The destination parameter is used by modal forms and it is set to destination=modal_forms/ajax/login

CommentFileSizeAuthor
popup_after_submit.png31.52 KBpooja.sarvaiye

Comments

pooja.sarvaiye’s picture

Issue summary: View changes
Abubakar Shams’s picture

Facing same issue

pooja.sarvaiye’s picture

This is not an issue with modal forms. This is an integration problem between modal forms and password policy module.
In password policy module file, in function _password_policy_go_to_password_change_page, drupal_goto is used to redirect user to password change screen.

Removing drupal_goto call, fixes the issue. But this is will remove user redirection to profile edit page. This will require a patch to be created for password policy module.

amolnw2778’s picture

@pooja Instead removing, digging into drupal_goto will keep the redirection I guess.

pooja.sarvaiye’s picture

Created issue in password policy issue queue:
https://www.drupal.org/node/2583109

rteijeiro’s picture

firewaller’s picture

To follow up on this, I was experiencing this issue for both Password Policy's redirect and Profile Fields Force Filling's redirect.

The following solution in the related issue works for me: https://www.drupal.org/project/password_policy/issues/2583109#comment-10...

Currently, I have the hook_drupal_goto_alter() in a custom module, but I believe this would module would benefit by using it.