← Back to team overview

mahara-contributors team mailing list archive

[Bug 1844748] Re: Deleting a private comment problem

 

**Gerrit/Patchset: https://reviews.mahara.org/mahara refs/changes/65/10365/2 
**Browser tested: Chrome
**Theme used: Default (Raw)

**DESCRIPTION/SUMMARY: 
An error is generated when a user deletes a private (i.e. NOT public) comment that they made on a page shared with a group.

**PRECONDITIONS:
1. Logged in user1 is a member of group1 that they have shared a page with.
2. User2 is also a member of group1.

**TEST STEPS:
Step 1: Logged in user1 views the group page that they shared.
Step 2: User1 makes a private comment on the page
Step 3: User1 deletes the page comment
Expected result: the page is refreshed and the comment is gone.
Actual result: as expected ✔ 

Step 4: User1 makes a public comment on the page
Step 5: User2 views the page then makes their own private comment then deletes it successfully as expected ✔ 

Step 6: User2 makes a public comment 
Step 7: User1 views the page then successfully deletes both public comments successfully as expected ✔

-- 
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/1844748

Title:
  Deleting a private comment problem

Status in Mahara:
  In Progress

Bug description:
  When you have the following set up:

  1) Have a group set up that you can submit pages to
  2) Create a page and submit it to that group
  3) View the page and leave a private comment on it
  4) Now delete the comment and refresh the page

  You see "Trying to get property of non-object" error similar to:
   
    Call stack (most recent first):
     * log_message("Trying to get property of non-object", 8, true, true, "/home/robertl/code/mahara-devel/mahara/htdocs/arte...", 803) at /home/robertl/code/mahara-devel/mahara/htdocs/lib/errors.php:521
     * error(8, "Trying to get property of non-object", "/home/robertl/code/mahara-devel/mahara/htdocs/arte...", 803, array(size 15)) at /home/robertl/code/mahara-devel/mahara/htdocs/artefact/comment/lib.php:803
     * ArtefactTypeComment::build_html(object(stdClass), false) at /home/robertl/code/mahara-devel/mahara/htdocs/artefact/comment/lib.php:553
     * ArtefactTypeComment::get_comments(object(stdClass)) at /home/robertl/code/mahara-devel/mahara/htdocs/view/view.php:288

  This is because we fetch $lastcomment and try to access it's 'id'
  value - but that is only for public comments

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


References