Hi thanks for the module.
Im using auto modal to display the comment forms as popups.
This works when the comment form is set to be displayed on a seperate page, under comment settings on admin/conent/node-type. I created a view, added add new comment field, have a link to the nodes comment form, when the links clicked the modal opens up the comment form, post your comment click submit, form closes.
But, i needed the comment form to be on the same page as the node, so changed comment settings, edited the add new comment link, so now the hole node shows up in the modal box, but only the comment form is visable, now when a user posts the comment, the page refreshes in the modal popup but doesnt close.
I need to keep the comment form as part of the node not on a seperate page, do you know how I can get the window to close when the comments been sent?
Thanks for any suggestions.
Comment | File | Size | Author |
---|---|---|---|
#5 | automodal-921732.patch | 558 bytes | mstef |
Comments
Comment #1
Oleksa-1 CreditAttribution: Oleksa-1 commentedconcider a Dialog API module it does exactly what you need
Comment #2
mstef CreditAttribution: mstef commentedI have comments on a separate page with a button that opens the comment form in a modal - and I can't get that to close either. Seems like something is causing automodal_close_form_submit() to not be called - despite it being in the form's #submit..
Any ideas????
Comment #3
mstef CreditAttribution: mstef commentedI found the problem..I just don't know how to fix it, or why it's happening, or what's causing it..etc
Replies to comments work fine - the modal closes
Replies to nodes do not work fine - the modal stays open and reloads itself..
The difference is, the reply to comments form has an #action that includes ?automodal=true&automodalClose=true (but how is that getting there?).
The reply to node form's #action is without queries...
????
Comment #4
mstef CreditAttribution: mstef commentedLooks like the problem is in comment_form()
..
Comment #5
mstef CreditAttribution: mstef commentedPatch
Comment #6
capellicI have applied the patch in #5 and it's a life saver!
Comment #7
hefox CreditAttribution: hefox commentedSo the bug is basically if #action is set to a different page than the current page, modalframe breaks. This may fix the comment bug, but won't fix the general bug.
Comment #8
dsnopek@hefox is right - this doesn't solve the general problem and feels a little hacky. I've changed the
hook_automodal_close_args_alter()
hook to allow you to abort the close. So, if you implement that hook in another module and simply include this code there:That should help anyone solve any of the edge cases without having to hack the automodal code.
However, the general issue still needs to be resolved! So, I'm going to rename this issue for that.