I see, thank you for your detailed explanation.
Emily
]]>
It usually means to just enable it. So if the 'comment' artefact plugin type on Admin menu -> Extensions -> Plugin administration currently displays the 'Show' button, click it and it will turn to 'Hide', which means that the plugin is now enabled.
Thank you
Kristina
]]>I've encountered the same issue as you. May I know how to add the comments blocktype?
]]>It turns out that the 'comments' blocktype was not installed on the Extensions page. I have no idea why. It may have been disabled in error at some point. Anyway, reinstalling it solved the problem.
If there's a bug here it's that the error handling is a bit... disappointing... the export form even asks you if you want to include comments when comments are disabled ;-)
]]>I reproduced this on my dev server which is running 7.4.23.
Cheers
]]>I notice that if I go to the blocktype/lib.php file and in the get_theme_path() function (line 215) and I force it to do the 'else' part it returns the error that you see.
So I'm thinking the blocktype_artefactplugin($pluginname) part is not returning the correct value for some reason during export - like it thinks the artefact 'comment' blocktype 'comment' is not installed
Why that is happening on your system and not mine I'm not sure.
What version of PHP are you using on your server, maybe that is causing an issue?
I'm testing with PHP7.4.3
Cheers
Robert
]]>
Really appreciate your reply.
I have debugging n... but... I don't understand where you got that output from. I'm not seeing anything like that in logs or otherwise. Can you enlighten me?
This all started when we upgraded to 21.04. The code is 21.04.1 as downloaded from this site. Just to make sure, I installed a new version with fresh code on a dev box and copied the data over from the live site. Same (bad) result.
It's 100% "vanilla" Mahara. No changes or addons.
Debugging was as far as I got before my cry for help. I was getting very lost in the depths of the template system.,
]]>On exporting a page with a comment block while debugging on a successful export, this is what I get. Are yours the same?
--> $template = $this->templateFactory($type, $file); > type="blocktype", $file="comment:comment.tpl"
--> return new Dwoo_Template_Mahara("{$resourceName}:{$resourceId}", $cacheTime, $cacheId, $compileId, $this->template_dir);
> where $resourceName="blocktype", $resourceId="comment:comment.tpl", other variables=null
--> parent::__construct($file, null, null, null, $includePath); > $file="comment.tpl", $includePath=array(
1:".../mahara/htdocs/theme/raw/plugintype/artefact/comment/blocktype/comment/templates"
0:".../mahara/htdocs/local/theme/plugintype/artefact/comment/blocktype/comment/templates"
2:".../mahara/htdocs/artefact/comment/blocktype/comment/theme/raw/templates"
3:".../mahara/htdocs/artefact/comment/blocktype/comment/theme/raw"
) from Mahara\Dwoo_Template_Mahara->__construct (.../mahara/htdocs/lib/dwoo/mahara/Dwoo_Template_Mahara.php:90)
At this point, if you don't have $pluginpath = "artefact/comment/blocktype/comment";
and it's just an empty string, then your other paths are incorrect as the ones in yours log show:
".../plugin/skipping_ artefact_comment_folder/.../blocktype". Looks like the wrong paths are being passed into the $includePath argument.
Hope this can help you debug some more.
You could always check your files against the one in core.
Doris
]]>The place where comments.tpl exists does not seem directly related to a theme? Is this expected and definitely not a bug?
]]>Any ideas what might be going on or where I should focus further investigations?
]]>I posted about this before but now have more information. Export does not work at all on my site. It gets so far and then fails. The error in the logs is always...
[20-Aug-2021 14:44:45 Europe/London] [WAR] 65 (lib/errors.php:530) [Dwoo\Exception]: Template "comment.tpl" could not be found in any of your include path(s) at /var/www/html/mahara/htdocs/lib/dwoo/dwoo/Dwoo/Template/File.php:160
However, I definitely do have that file (or maybe I do)... (from htdocs directory)
$ find . -name comment.tpl
./theme/raw/plugintype/artefact/comment/blocktype/comment/templates/comment.tpl
So picking up on the 'include paths' bit, I had a dig into the Dwoo Template stuff to see what paths it is looking in. When the TemplateFile object is created the paths are passed in an array. I added a debugging line to write this data to the log. Immediate before the error message, the array passed looks like...
[20-Aug-2021 14:44:45 Europe/London] INCLUDE PATH Array
(
[0] => /var/www/html/mahara/htdocs/local/theme/plugintype/blocktype/comment/templates
[1] => /var/www/html/mahara/htdocs/theme/default/plugintype/blocktype/comment/templates
[2] => /var/www/html/mahara/htdocs/theme/raw/plugintype/blocktype/comment/templates
[3] => /var/www/html/mahara/htdocs/blocktype/comment/theme/default/templates
[4] => /var/www/html/mahara/htdocs/blocktype/comment/theme/default
[5] => /var/www/html/mahara/htdocs/blocktype/comment/theme/raw/templates
[6] => /var/www/html/mahara/htdocs/blocktype/comment/theme/raw
)
You will notice that there are no paths in that list that correspond to the actual location of the comment.tpl file.
Thoughts?
]]>