Forums | Mahara Community

Support /
Artefact-Chooser not loading

03 November 2015, 8:18


since last week, I use 15.10. Editing a view, some blocks do not load. Console:

XHR Loaded (blocks.json.php - 200 OK - 286.2300000015239ms - 675B)

Error loading JSON

Using the link above I get this error:

Parse error: syntax error, unexpected '(' in /home/imthurn/maharadata/dwoo/compile/default/home/imthurn/www/mahara/theme/raw/templates/form/artefactchooser.tpl.d17.php on line 39

I cannot load blog-blocktypes, notes, etc.

Does anybody knows something about that?


XXXX I'm not allowed to post the link :-)



Robert Lyon's profile picture
Posts: 764

03 November 2015, 9:19

Hi Gabriel

Can I get you to try deleting the file


as it is a compiled file it will recreate itself if missing and hopefully will re-compile correctly..

If that doesn't work can you copy and paste the line 39 of that file here so that I can see what it is trying to do



Aaron Wells's profile picture
Posts: 896

03 November 2015, 10:56

Hm, we should really add a "purge caches" admin tool to Mahara to help with these kinds of issues.

A post by Aaron Wells was deleted

03 November 2015, 11:14

Thank you for helping me.

I deleted it. (Do I understand right? The whole dwoo folder is compiled fresh, when I delete it?

The same mistake.

Here the line. I'm sorry, I don't see the bug.

<?php if (empty((is_string($tmp=$this->scope["artefacts"]) ? htmlspecialchars($tmp, ENT_QUOTES, $this->charset) : $tmp))) {

It's 23.13 in Switzerland. I might go to sleep soon. :-)

Good night, Gabriel

Robert Lyon's profile picture
Posts: 764

06 November 2015, 10:01

Hi Gabriel,

I am not able to replicate the problem, are you still having problem with this?

If you are, can you try a possible fix I wrote for this ->

and let me now if it makes any difference.





Aaron Wells's profile picture
Posts: 896

06 November 2015, 10:39

Hi Gabriel,

Are you using PHP 5.4 or earlier? I think the cause of the problem here is that PHP 5.4 and earlier don't support passing an expression to the empty() function.

(Since Mahara aims to support PHP 5.3 and up, this can be considered a bug in Mahara core.)

If this is the case, then Robert's patch should fix the problem for you.



06 November 2015, 11:31

Good Evening

I'm still having the Problem. I build a test environment with a fresh install. Same Problem.

I will test the patch this weekend. In the Moment I don't know the php-Version. But I can change the Version. I will tell you what happend with different php versions and also with the patch.

Thank you again for helping me.

CHeers Gabriel

07 November 2015, 10:39

Good Evening

I just changed the two lines as mentioned. It works now on my test environment. PHP Version 5.4.45.

In my second test I used the original files. And turned on PHP Version 5.6.13. Everything works fine.

Thank you for helping me.

I wish everybody a nice weekend.

Cheers Gabriel


9 results