← Back to team overview

mahara-contributors team mailing list archive

[Bug 1236661] Re: Site statistics: Pages - Page not found error when a page's group has been deleted

 

Hm, okay, I see that it was in 1.5 that we added the code that deletes
all the group's Views when the group is deleted. So I am able to
replicate this issue by this process:

1. Install Mahara 1.4
2. Create a group.
3. Create a Page in that group
4. Run the cron job to make sure stats are gathered
5. Delete the group
6. Upgrade to Mahara 1.8
7. Visit the "Most Popular Pages" report.

So it would appear that the orphaned group pages from the group deleted
in 1.4, are hanging around causing problems in 1.8. Probably the best
way to fix this would be with a one-time fix script in
lib/db/upgrade.php, which identifies and deletes the pages that should
have been deleted. We'll have to be careful to check for any side
effects on this though -- specifically, might people still be using
those Pages via direct links to them? (I haven't actually checked to see
whether that's possible or not. ;) )

Cheers,
Aaron

** Summary changed:

- Site statistics: Pages - Page not found error when a page's group has been deleted
+ Site statistics: Pages - Page not found error when a page's group has been deleted in 1.4, followed by an upgrade to 1.8

** Changed in: mahara/1.8
   Importance: High => Low

** Changed in: mahara/1.8
    Milestone: None => 1.8.1

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

Title:
  Site statistics: Pages - Page not found error when a page's group has
  been deleted in 1.4, followed by an upgrade to 1.8

Status in Mahara ePortfolio:
  Incomplete
Status in Mahara 1.8 series:
  Incomplete

Bug description:
  If a group has been deleted, the Admin Home/Site Statistics/Pages tab
  (Most Popular Pages) comes up with the error:

  Page not found

  You tried to access a page that does not exist.

  Page with id 0 not found.


  The View construct is trying to load the deleted group but as it is
  deleted, it automatically throws an exception ViewNotFoundException.

  Called in function htdocs/lib/view.php::get_extra_view_info() line
  4124 ($view = new View(0, $v);

  It should check if the group has been deleted and cater for that
  situation.

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


References