Crash when posting a public comment that no one will be notified about

Bug #1509129 reported by Aaron Wells
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Aaron Wells
15.10
Fix Released
High
Aaron Wells
16.04
Fix Released
High
Aaron Wells
16.10
Fix Released
High
Unassigned

Bug Description

The code that sends out comment notifications tries to merge two arrays, representing the users who need to be notified because they "own" the page, and the users who have the page on their watchlist. If there are no "owner" users for a page, then this code fails because that variable holds a boolean false instead of an array.

This only happens for public comments, because for private comments the watchlist is ignored, so there's no need to try to merge the arrays.

To replicate:

1. Create a group
2. In the group's settings set "Feedback notifications" to "None"
3. Create a page in the group
4. Leave a public comment on the page

Expected result: Your public comment should be posted on the page
Actual result: The AJAX "processing" message comes up but never finishes, and the comment doesn't post

Revision history for this message
Aaron Wells (u-aaronw) wrote :

This was a regression introduced during the code changes for threaded feedback (Bug 884023).

tags: added: feedback regression
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/5605

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/5605
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/baabb7e5ed7c7206c6de5d952bf0e4f630817690
Submitter: Aaron Wells (<email address hidden>)
Branch: master

commit baabb7e5ed7c7206c6de5d952bf0e4f630817690
Author: Aaron Wells <email address hidden>
Date: Fri Oct 23 12:33:40 2015 +1300

Sometimes $this->users is boolean false, not an array

Bug 1509129

Change-Id: I68e2731306ab231aa8f1421e12dc641184e5999b

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "15.10_STABLE" branch: https://reviews.mahara.org/5607

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/5607
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/ac50614876cd059ec55a6096e34efb220a57a551
Submitter: Aaron Wells (<email address hidden>)
Branch: 15.10_STABLE

commit ac50614876cd059ec55a6096e34efb220a57a551
Author: Aaron Wells <email address hidden>
Date: Fri Oct 23 12:33:40 2015 +1300

Sometimes $this->users is boolean false, not an array

Bug 1509129

Change-Id: I68e2731306ab231aa8f1421e12dc641184e5999b
(cherry picked from commit baabb7e5ed7c7206c6de5d952bf0e4f630817690)

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/5609

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "master" branch: https://reviews.mahara.org/6181

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "master" branch: https://reviews.mahara.org/6306

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/6306
Committed: https://git.mahara.org/mahara/mahara/commit/3f67778259b351b5986dbb426256756e73f2e935
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 3f67778259b351b5986dbb426256756e73f2e935
Author: Charlie <email address hidden>
Date: Tue Apr 5 09:30:20 2016 +1200

Bug 1509129: Behat test for notification of public comment

Change-Id: I2f6bea69724c660724bc7b44fd6f6530ee6c5d0c

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "15.10_STABLE" branch: https://reviews.mahara.org/6331

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "16.04_STABLE" branch: https://reviews.mahara.org/6356

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/6356
Committed: https://git.mahara.org/mahara/mahara/commit/da6ac6628b601d2c3bbeba777c3b9b046923d223
Submitter: Robert Lyon (<email address hidden>)
Branch: 16.04_STABLE

commit da6ac6628b601d2c3bbeba777c3b9b046923d223
Author: Charlie <email address hidden>
Date: Tue Apr 5 09:30:20 2016 +1200

Bug 1509129: Behat test for notification of public comment

Change-Id: I2f6bea69724c660724bc7b44fd6f6530ee6c5d0c
(cherry picked from commit 3f67778259b351b5986dbb426256756e73f2e935)

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/6331
Committed: https://git.mahara.org/mahara/mahara/commit/cec21df83dd5966585e4a64dc2cd891a486695a9
Submitter: Robert Lyon (<email address hidden>)
Branch: 15.10_STABLE

commit cec21df83dd5966585e4a64dc2cd891a486695a9
Author: Charlie <email address hidden>
Date: Tue Apr 5 09:30:20 2016 +1200

Bug 1509129: Behat test for notification of public comment

Change-Id: I2f6bea69724c660724bc7b44fd6f6530ee6c5d0c
(cherry picked from commit 3f67778259b351b5986dbb426256756e73f2e935)

Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.