Forums | Mahara Community

Support /
Not sure if its a bug or intentional


Robert Scally's profile picture
Posts: 8

28 August 2019, 4:01

Hello,

In Mahara 19.04, when you visit /admin/site/views.php and edit the "Page template" and click 

"Share" button and set "Shared with" to "Public", then the Page template cannot seem to be

restored. Then when trying to create a page in a portfolio, the following error is thrown:

Mahara: Site Unavailable

Default page template not found.
 
And it is not possible to create any page anymore. Is there a way to restore the "Page template"?

 

Best Regards,

Robert

Robert Lyon's profile picture
Posts: 773

28 August 2019, 9:12

Hi Robert,

This is a bug - there is a bug report and a fix for this problem

https://bugs.launchpad.net/mahara/+bug/1824767

The fix only stop one from setting access on the site templates

To fix up database
------------------
Look in the 'view' table there should be four rows that have are for site templates:
SELECT * FROM view WHERE template = 2;

If there are less then we need to fix them up
Normally the four site templates are the ids 1 to 4

The page template is the one with the description that begins  "Set up the default layout for the pages ..."

We fix up the incorrect ones by setting the template to 2, eg
UPDATE view SET template = 2 WHERE id = 4;

Once we have the id for the template we need to fix up we need to check that it's access rules are correct by comparing its access rules against a site templates that are not broken, eg:
SELECT * FROM view_access WHERE view in(1,2,3,4);

They should all match (except for view and id columns) having one row with accesstype 'loggedin'

If there are other accesstype rows they should be deleted

Cheers

Robert

2 results