Forums | Mahara Community

Support /
Can edit page, can't view page


05 November 2025, 0:01

I created a video for this problem: https://hz.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=d00a8322-5664-429c-b972-b38b00b43ea8

Basically we can edit a page but we can't view it. There seem to be a reference to an artifact that's no longer on the page. But how can we find it, and why the error? It's weird that you can edit a page that you can't view.

Robert Lyon's profile picture
Posts: 797

05 November 2025, 8:37

Hi Richard,

That does seem a strange error - I've not been able to replicate but I suspect it could be to do with artefacts associated with skins or comments that would appear on display version but not on edit version.

One thing you can try is to apply this:

diff --git a/htdocs/lib/errors.php b/htdocs/lib/errors.php
index ed1825a78f..fec3688ece 100644
--- a/htdocs/lib/errors.php
+++ b/htdocs/lib/errors.php
@@ -1018,6 +1018,7 @@ class EmailDisabledException extends EmailException {
  */
 class ArtefactNotFoundException extends NotFoundException {
     public function strings() {
+        log_debug('Error thrown in file line ' . $this->getFile() . ':' . $this->getLine());
         return array_merge(parent::strings(),
             array('message' => get_string('artefactnotfoundexception', 'error')),
             array('title' => get_string('notfound', 'error')));

So that when the artefact not found exception is thrown it can show in the error log what file / line number the error was thrown from and then let me know what part of Mahara threw the error to help diagnose the problem's origin.

Cheers

Robert

2 results