← Back to team overview

mahara-contributors team mailing list archive

[Bug 1998860] [NEW] Problems with deleting a page / person when page is on a watchlist

 

Public bug reported:

There are couple of issues around watchlists and queued items
 
To test - problem one:

1) Create a site and add some people to it
2) Create a group and add some people as members
3) As group creator add a page to the group and add a block to the page
4) Masquerade as another group member and view the page - add page to watchlist
5) As this group member edit the page and add a block
6) Then straight away delete the block and go to the group portfolios page and delete the page (do this quickly to beat cron)

You get an error:
ERROR:  update or delete on table "view" violates foreign key constraint "watcqueu_vie_fk" on table "watchlist_queue"

This is because when you edit a page that is being watched the
watchlist_queue table gets populated with changes and when you delete
the block the line isn't removed from the watchlist_queue just the block
ID (as it is still a valid view change - the block deletion) so when you
try and delete the page it's still referenced.

We need to remove the reference on page deletion


To test - problem two:

1-5) The same steps as above
6) Stop masquerading as other person and delete person

Person deletes successfully but they are still referenced in the
watchlist_queue table - we need to remove those references on person
deletion so we don't try and send a notification to a deleted person

** Affects: mahara
     Importance: High
         Status: New

** Affects: mahara/21.10
     Importance: High
         Status: New

** Affects: mahara/22.04
     Importance: High
         Status: New

** Affects: mahara/22.10
     Importance: High
         Status: New

** Affects: mahara/23.04
     Importance: High
         Status: New

** Also affects: mahara/21.10
   Importance: Undecided
       Status: New

** Also affects: mahara/23.04
   Importance: Undecided
       Status: New

** Also affects: mahara/22.04
   Importance: Undecided
       Status: New

** Also affects: mahara/22.10
   Importance: Undecided
       Status: New

** Changed in: mahara/23.04
   Importance: Undecided => High

** Changed in: mahara/22.10
   Importance: Undecided => High

** Changed in: mahara/22.04
   Importance: Undecided => High

** Changed in: mahara/21.10
   Importance: Undecided => High

** Changed in: mahara/23.04
    Milestone: None => 23.04.0

** Changed in: mahara/22.10
    Milestone: None => 22.10.1

** Changed in: mahara/22.04
    Milestone: None => 22.04.4

** Changed in: mahara/21.10
    Milestone: None => 21.10.6

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: mahara-contributors
https://bugs.launchpad.net/bugs/1998860

Title:
  Problems with deleting a page / person when page is on a watchlist

Status in Mahara:
  New
Status in Mahara 21.10 series:
  New
Status in Mahara 22.04 series:
  New
Status in Mahara 22.10 series:
  New
Status in Mahara 23.04 series:
  New

Bug description:
  There are couple of issues around watchlists and queued items
   
  To test - problem one:

  1) Create a site and add some people to it
  2) Create a group and add some people as members
  3) As group creator add a page to the group and add a block to the page
  4) Masquerade as another group member and view the page - add page to watchlist
  5) As this group member edit the page and add a block
  6) Then straight away delete the block and go to the group portfolios page and delete the page (do this quickly to beat cron)

  You get an error:
  ERROR:  update or delete on table "view" violates foreign key constraint "watcqueu_vie_fk" on table "watchlist_queue"

  This is because when you edit a page that is being watched the
  watchlist_queue table gets populated with changes and when you delete
  the block the line isn't removed from the watchlist_queue just the
  block ID (as it is still a valid view change - the block deletion) so
  when you try and delete the page it's still referenced.

  We need to remove the reference on page deletion

  
  To test - problem two:

  1-5) The same steps as above
  6) Stop masquerading as other person and delete person

  Person deletes successfully but they are still referenced in the
  watchlist_queue table - we need to remove those references on person
  deletion so we don't try and send a notification to a deleted person

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



Follow ups