Forums | Mahara Community
Support
/
Create Page....Save (Crash!)
17 June 2016, 0:51
Hi Mahara
I'm having a problem on the mahara installation.
It occurs when I try to Create Page. | Menu/Portfolio/Pages/Create Page...all good till I save...
Then it's says...<server>'can't handle request'
I've put it to the webhost who dug out this error....
======REPLY FROM HOSTS...
When the blank page/500 error occurs, the following error message is outputted in the logs:
-----------------------------------
[16-Jun-2016 13:07:57 Europe/London] [WAR] 48 (lib/mahara.php:593) Unable to read language directory /home/mediaclu/portfoliodata/langpacks/fr.utf8/lang/
[16-Jun-2016 13:07:57 Europe/London] Call stack (most recent first):
[16-Jun-2016 13:07:57 Europe/London] * log_message("Unable to read language directory /home/mediaclu/p...", 8, true, true) at /home/mediaclu/public_html/portfolio/lib/errors.php:95
[16-Jun-2016 13:07:57 Europe/London] * log_warn("Unable to read language directory /home/mediaclu/p...") at /home/mediaclu/public_html/portfolio/lib/mahara.php:593
[16-Jun-2016 13:07:57 Europe/London] * get_languages() at /home/mediaclu/public_html/portfolio/lib/web.php:4380
[16-Jun-2016 13:07:57 Europe/London] * language_select_form() at /home/mediaclu/public_html/portfolio/lib/web.php:158
[16-Jun-2016 13:07:57 Europe/London] * smarty(array(size 10), array(size 2), array(size 1), array(size 1)) at /home/mediaclu/public_html/portfolio/view/blocks.php:206
[16-Jun-2016 13:07:57 Europe/London]
[16-Jun-2016 13:07:57 Europe/London] [WAR] 48 (lib/view.php:5985) Undefined variable: view
[16-Jun-2016 13:07:57 Europe/London] Call stack (most recent first):
[16-Jun-2016 13:07:57 Europe/London] * log_message("Undefined variable: view", 8, true, true, "/home/mediaclu/public_html/portfolio/lib/view.php", 5985) at /home/mediaclu/public_html/portfolio/lib/errors.php:489
[16-Jun-2016 13:07:57 Europe/London] * error(8, "Undefined variable: view", "/home/mediaclu/public_html/portfolio/lib/view.php", 5985, array(size 1)) at /home/mediaclu/public_html/portfolio/lib/view.php:5985
[16-Jun-2016 13:07:57 Europe/London] * View->is_themeable() at /home/mediaclu/public_html/portfolio/view/blocks.php:271
[16-Jun-2016 13:07:57 Europe/London]
[16-Jun-2016 13:07:57 Europe/London] PHP Fatal error: Call to a member function get() on null in /home/mediaclu/public_html/portfolio/lib/view.php on line 5985
-----------------------------------
Unfortunately from the provided PHP Fatal Error, it appears that the issue is not caused by the server environment but a development issue with the code of your website. We can advise you to contact a developer or the support team of Mahara to receive further assistance on the matter as development tasks are out of the scope of our expertise.
==================END REPLY FROM HOSTS.
I'm using Mahara Version
16.04.1
Can't seem to find anything about this on here as yet. And can't really find my way around the Bug Tracker but searched there too.
Any thoughts please, wizened ones of the mahara community??
Much thanks in advance.
Rob
17 June 2016, 8:47
Hi Rob,
This is an issue that has just been found, see the bug report:
https://bugs.launchpad.net/mahara/+bug/1591304
There is a fix for it, see patch:
https://reviews.mahara.org/#/c/6595/
Basically one needs to find this line of code in lib/view.php
return !$view->get('template') && !in_array($this->type, $unthemable_types);
And change it to
return !$this->get('template') && !in_array($this->type, $unthemable_types);
Cheers
Robert
01 July 2016, 9:45
Hi Robert
Much thanks for your solution, which worked.
(it also affected 'Edit this Page' btw)
Thanks for the option of the line of code to edit. Turned out to be much simpler to do in the end.
The git/patch thing proved too much for me to get my head around, leading me to download whole Megs of material, which I do not know how to integrate with the installation. So the simple code edit was (eventually) achieved.
Cheers again
Robert