karma form nested inside comment edit form breaks HTML and preview/submit buttons in IE
klktrk - January 25, 2008 - 00:17
| Project: | Karma |
| Version: | 5.x-1.x-dev |
| Component: | User interface |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
When previewing an edited comment in IE, a user cannot click the Preview or Submit buttons. This is because the karma_comment function spits out the karma rating form even during edit operations. The result of this is that, contrary to good HTML, an HTML form is being nested *inside* another, like this:
<form action="/comment/edit/31759" method="post" id="comment-form">
.....
<form action="/comment/edit/31759" method="post" id="karma-rating-form-comment-31759" class="karma-rate-comment">
......
</form>
.....
</form>Not only that, but there are two >input type="submit"< tags in there too.
The attached patch file addresses this by checking for the 'edit' argument as arg(1), and if a comment is being edited/previewed, then it will not render the Karma form.
Users' can't rate their own posts anyway, so why even render it when a user is viewing/editing/previewing their own comment at all?
Hope this helps.
| Attachment | Size |
|---|---|
| karma_module_preview_bug.patch | 1019 bytes |

#1
Yep, this was an oversight. Fixed.
#2
Automatically closed -- issue fixed for two weeks with no activity.