← Back to team overview

mahara-contributors team mailing list archive

[Bug 1598648] Re: Can not delete the first comment in every page of view comments in pagination mode

 

This is the problem of processing submitted variable when click an image
input.

When the first delete image is clicked, the variable
'delete_comment_submit' is submitted. For following delete images, 2
variables 'delete_comment_submit_x' and 'delete_comment_submit_y' are
submitted.

Quick fix:
 at the line 93 of htdocs/view/view.php, add one more checking for 'delete_comment_submit'

 if (param_variable('delete_comment_submit_x', null)
    || param_variable('delete_comment_submit', null)) {
    pieform(ArtefactTypeComment::delete_comment_form(param_integer('comment')));
 }

Better fix:
 Use a hidden input.

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1598648

Title:
  Can not delete the first comment in every page of view comments in
  pagination mode

Status in Mahara:
  Confirmed

Bug description:
  Version: 15.04

  Steps to reproduce the issue:

  1. Create a page
  2. Add more than 10 comments on this page
  3. You will see 2 pages of the list
  4. Go to the last page, click delete button of the first comment

  Expected result
   You should see "Comment removed by ..." for the first comment.
  Actual result
   You still see the comment.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1598648/+subscriptions


References