Cannot edit a page with a navigation block pointing at a deleted collection

Bug #813204 reported by Richard Mansfield
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Richard Mansfield

Bug Description

If you include a navigation block on a page, then delete the collection which the block refers to, you can no longer view or edit the page.

http://mahara.org/interaction/forum/topic.php?id=3866

We should just display an empty block rather than throwing the error described in that post.

Changed in mahara:
assignee: nobody → Richard Mansfield (richard-mansfield)
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Richard Mansfield (richard-mansfield) wrote :

Argh, I accidentally pushed this patch straight to refs/heads/master, so it didn't go through gerrit and missed out on being reviewed:

https://gitorious.org/mahara/mahara/commit/e29f0a133e2e7c27ccce021d87e3b9d40d1e5778

If anyone gets a chance, please have a look at it.

It'd also be a good idea to do the right thing and delete navigation blocks when their collection is deleted. It's probably an expensive operation though; the collection id is stored in a serialised blob, so perhaps a cron cleanup is the way to go.

Changed in mahara:
status: Confirmed → Fix Committed
milestone: none → 1.5.0
Revision history for this message
Hugh Davenport (hugh-davenport) wrote : Cannot edit a page with a navigation block pointing at a deleted collection

Code looks fine, will verify later today if I get the chance

On 20/07/11 10:59, Richard Mansfield wrote:
> Argh, I accidentally pushed this patch straight to refs/heads/master, so
> it didn't go through gerrit and missed out on being reviewed:
>
> https://gitorious.org/mahara/mahara/commit/e29f0a133e2e7c27ccce021d87e3b9d40d1e5778
>
> If anyone gets a chance, please have a look at it.
>
> It'd also be a good idea to do the right thing and delete navigation
> blocks when their collection is deleted. It's probably an expensive
> operation though; the collection id is stored in a serialised blob, so
> perhaps a cron cleanup is the way to go.
>
> ** Changed in: mahara
> Status: Confirmed => Fix Committed
>
> ** Changed in: mahara
> Milestone: None => 1.5.0
>

Changed in mahara:
milestone: 1.5.0 → 1.4.1
status: Fix Committed → In Progress
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/563
Committed: http://gitorious.org/mahara/mahara/commit/d90ebec234b17b7185d696c3ff42f5037b8e3513
Submitter: Hugh Davenport (<email address hidden>)
Branch: master

commit d90ebec234b17b7185d696c3ff42f5037b8e3513
Author: Richard Mansfield <email address hidden>
Date: Fri Aug 5 11:42:18 2011 +1200

    Delete navigation blocks with their collections (bug #801844, bug #813204)

    When a collection is deleted, also delete all the navigation blocks
    in the collection's views which point at the deleted collection.

    Change-Id: I0aa1f51d2ee92434278b8fb0ad2700f8c9a63a61
    Signed-off-by: Richard Mansfield <email address hidden>

Changed in mahara:
status: In Progress → Fix Committed
milestone: 1.4.1 → 1.5.0
Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/523
Committed: http://gitorious.org/mahara/mahara/commit/f6686fbefe3746dff849bacb48d8d0125ab47e60
Submitter: Francois Marier (<email address hidden>)
Branch: 1.4_STABLE

commit f6686fbefe3746dff849bacb48d8d0125ab47e60
Author: Richard Mansfield <email address hidden>
Date: Wed Jul 20 10:39:03 2011 +1200

    Allow editing of pages with misconfigured navigation block (bug #813204)

    When rendering pages, only ArtefactNotFound exceptions are caught, but
    navigation blocks can throw CollectionNotFound instead. This change
    catches all NotFound exceptions thrown when rendering block content and
    block titles.

    Change-Id: Ia52f2a8184e607dcb9868893a4acd6094d0dc35b
    Signed-off-by: Richard Mansfield <email address hidden>
    (cherry picked from commit e29f0a133e2e7c27ccce021d87e3b9d40d1e5778)

Changed in mahara:
milestone: 1.5.0 → 1.4.1
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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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