Forums | Mahara Community

Support /
Problem creating new Portfolio Page


Steen Pedersen's profile picture
Posts: 5

14 December 2017, 7:04 PM

Hi

We have a Mahara installation version 17.10 (downloaded form mahara.org). When we try to create a new portfolio page we get the following error:

Site unavailable
Default page template not found.

I have checked the log files and the error.log has this entry:

2017/12/13 10:05:47 [error] 1771#1771: *426806 FastCGI sent in stderr: "PHP message: [WAR] 60 (view/editlayout.php:47) Default page template not found.
PHP message: Call stack (most recent first):
PHP message: * log_message(string(size 32), integer, true, true, string(size 47), integer, array(size 0)) at /var/www/html/mahara/htdocs/lib/errors.php:648
PHP message: * MaharaException->handle_exception() at /var/www/html/mahara/htdocs/lib/errors.php:547
PHP message: * exception(object(ConfigSanityException)) at Unknown:0


The line 47 in editlayout.php:
throw new ConfigSanityException(get_string('viewtemplatenotfound', 'error'));

We have the following configured:

Operating system: Debian version 9.2
Webserver: Nginx version 1.10.3
SQL server: MariaDB version 10.1.26
PHP version: 7.0.19-1 with FastCGI

Mahara version 17.10

It is a standard installation without any additional plugins besides the danish language pack.

Have You seen this error before?

Best Regards
Steen Pedersen

Robert Lyon's profile picture
Posts: 405

14 December 2017, 8:53 PM

Hi Steen

The error you got, (view/editlayout.php:47) Default page template not found, sounds like the default template for a page is missing.

You can check if it exists by going to Administration -> Configure site -> Pages and collections (eg admin/site/views.php) you should see the 4 site templates and one should be the 'page template'

You can also find this via the database by searching on:

SELECT * FROM view WHERE type = 'portfolio' AND template = 2;

If for some reason this is missing then that would be the cause of the problems.

Cheers

Robert

Steen Pedersen's profile picture
Posts: 5

14 December 2017, 9:37 PM

Hi Robert

Thank you for your answer.

I have checked our configuration and the Page template is missing. This is a new installation (2 weeks old) so it is a good question why this is missing. Is there a way I can install this template manually?

 

Best Regards

Steen Pedersen

 

 

Robert Lyon's profile picture
Posts: 405

15 December 2017, 9:05 AM

Hi Steen,

Hmm, it's not possible to delete those templates from the admin interface (one can only edit them)

The point in the install where the site templates are added is in the last  core_install_lastcoredata_defaults() function.

I'm wondering if your install failed near the end and so allowed a mostly functional site but not fully installed.

Are you able to set up a new database and do another install to that by editing your config.php file and point to the new database. also in the config.php file add the line $cfg->productionmode = false; so that any errors can show to screen during the install process.

Also if you are trying to install to a database using utf8mb4 you might need this patch as well https://reviews.mahara.org/#/c/8160/23

Cheers

Robert

 

Steen Pedersen's profile picture
Posts: 5

15 December 2017, 7:01 PM

Hi Robert

Thanks for your help. I will do another install and apply the patch.

Best Regards

Steen Pedersen

 

 

 

 

 

Steen Pedersen's profile picture
Posts: 5

18 December 2017, 8:30 PM

Hi Robert

How do I apply the to the Mahara installation? Can I use the patch command like this?

 

patch < 5c8a16c5.diff

 

Best Regards

Steen Pedersen

 

 

 

Robert Lyon's profile picture
Posts: 405

19 December 2017, 7:43 AM

Hi Steen

 

If you are controlling the install of Mhara via git then you can run this command in your mahara directory

git fetch https://reviews.mahara.org/mahara refs/changes/60/8160/4 && git cherry-pick FETCH_HEAD

 

If you installed via zipped files then you should be able to do fetch the diff zip file

https://reviews.mahara.org/changes/8160/revisions/5c8a16c517ace72b0d7587bb4b4b938fea998dcc/patch?zip

and open the file and see the changes that were made - as there are only 4 changes you could make the changes manually to your site by editing the relevant files listed in the diff file.

In this case it is changing all the lines indicated with a minus to all the lines indicated with a +

Hope that helps

Cheers

Robert

 

Steen Pedersen's profile picture
Posts: 5

19 December 2017, 7:31 PM

Hi Robert

Thank you for your help.

I have installed Mahara via zip-files, so I will insert the changes manually, 

Best Regards

Steen Pedersen

 

 

8 results