Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When attempting to log in via block attached in ajax mode destination goes to domain.com/menu_attach_block/ajax/user|login and white screen. Is there a way to fix this?
Comments
Comment #1
Cameron Tod CreditAttribution: Cameron Tod commentedOK, I have managed to reproduce this. I am just jumping on a plane now, but will try to think through the cleanest way to fix this for all forms.
The root cause is that the form action refers to menu_attach_block/ajax - so we need to strip that.
Comment #2
flamez-b CreditAttribution: flamez-b commentedThank you for your quick reply. It would be great if this module could be more flexible regarding pulling blocks in ajax mode as we know that html-code of pages would be much smarter without unnecessary amount of lines (especially generated by forms) that produce no actions (until users wishes them to).
Waiting for new updates!
Comment #3
Cameron Tod CreditAttribution: Cameron Tod commentedOK, I have tried refactoring this to use the Drupal AJAX API instead of a jQuery-initiated AJAX response. Unfortunately, the form still does not redirect correctly after submit.
This is a tricky one, but I'll keep plugging away.
Comment #4
Cameron Tod CreditAttribution: Cameron Tod commentedComment #5
flamez-b CreditAttribution: flamez-b commentedIt’s been a year since the last reply and no updates. Are there any plans for a new release with bug fixes?
Comment #6
Cameron Tod CreditAttribution: Cameron Tod commentedI took quite a long time over this back when I was working on it and it is tricky. I will bring in some more patches, do a new release, then try this again.
Comment #7
Cameron Tod CreditAttribution: Cameron Tod commentedI've added a warning on the module page in the meantime: https://www.drupal.org/project/menu_attach_block#ajax-form-submit