Hi everyone,
I am very new to Piwigo and started to dig in the doc a bit last week. After playing a bit for the past few days uploading images and synchronizing my IPTC to the database, I am ready to start building my child theme with Modus as a parent theme..
I created a very simple child theme with the two required files as a start: themeconf.inc.php and theme.css.
I only have three lines of code in the themeconf.inc.php and nothing in the theme.css yet.
Here is the preview of my themeconf.inc.php:
/* Theme Name: mytheme Version: 1.0 Description: Modus Child Theme Author: ytca */ $themeconf = array( 'parent' => 'modus', );
Then I activated my theme in the administration. Now I keep having the following error message on the frontend:
Fatal error: Uncaught --> Smarty: Missing template name <-- thrown in /home/public_html/piwigo/include/smarty/libs/sysplugins/smarty_template_source.php on line 157
Any idea what I did wrong?
Thank you in advance.
Piwigo 11.5.0 Check for upgrade
Operating system: Linux
PHP: 7.3.30 (Show info) [2021-09-23 00:28:48]
MySQL: 5.7.35 [2021-09-22 21:28:48]
Graphics Library: GD bundled (2.1.0 compatible)
Last edited by ytca (2021-09-23 06:37:18)
Offline
Is there anywhere else than the forum where we can get support with Piwigo? Any help would be very appreciated, thank you :-)
Offline
Hi :-)
$themeconf = array(
'name' => 'mytheme',
'parent' => 'modus',
);
Offline
Thank you @ddtddt, I tried it but it doesn't work either...
And now I can't access the admin panel anymore. I tried to access admin.php?page=themes to switch back the theme to the main Modus but I keep landing on a white page with the error described earlier and a list of warnings:
Warning: filemtime(): stat failed for ./themes/mytheme/css/base.css.tpl in /home/public_html/piwigo/include/template.class.php on line 1879
Warning: filemtime(): stat failed for ./themes/mytheme/css/iconfontello.css.tpl in /home/public_html/piwigo/include/template.class.php on line 1879
Warning: filemtime(): stat failed for ./themes/mytheme/css/menuh.css.tpl in /home/public_html/piwigo/include/template.class.php on line 1879
Warning: filemtime(): stat failed for ./themes/mytheme/css/index.css.tpl in /home/public_html/piwigo/include/template.class.php on line 1879
Warning: filemtime(): stat failed for ./themes/mytheme/css/picture.css.tpl in /home/public_html/piwigo/include/template.class.php on line 1879
Warning: filemtime(): stat failed for ./themes/mytheme/css/tags.css in /home/public_html/piwigo/include/template.class.php on line 1879
Warning: filemtime(): stat failed for ./themes/mytheme/css/print.css in /home/public_html/piwigo/include/template.class.php on line 1879
Warning: filemtime(): stat failed for ./themes/mytheme/css/hf_base.css in /home/public_html/piwigo/include/template.class.php on line 1879
Fatal error: Uncaught --> Smarty: Missing template name <-- thrown in /home/public_html/piwigo/include/smarty/libs/sysplugins/smarty_template_source.php on line 157
Last edited by ytca (2021-09-24 21:28:50)
Offline
See [Forum, topic 29340] Modus: How to clone? and specifically [Forum, post 173570 by flop25 in topic 29340] Modus: How to clone?.
Offline
Thank you so much @erAck!
I ended up copying all those directories from the main modus theme in order to have my child theme running:
/css/
/js/
/skins/
/templates/
So my question now is why is it not updated in the main Piwigo documentation related to child themes? The only thing mentioned is
- create a new directory “themes/greenery”
- copy “themes/clear/themeconf.inc.php” into “themes/greenery”
- create an empty “themes/greenery/theme.css” file
A theme needs at least 2 files theme.css and themeconf.inc.php.
I had to copied multiple directories (css, js, tempates, etc...) from the parent theme, but if you follow the Piwigo documentation, they should load automatically without copying them over to the child theme, no?
All theme.css and themeconf.inc.php of all parent themes are loaded. Of course, parents are loaded first, and the current theme last.
The templates are loaded from the child theme, then from the parent themes.
I just want to start on a clean child theme to start building a gallery and make sure that I won't run into issues at the next modus update because of an updated JS file that I won't change in my child theme.
Anyway thank you, I will be able to move forward with Piwigo now :-)
Last edited by ytca (2021-09-25 00:26:25)
Offline
ytca wrote:
I just want to start on a clean child theme to start building a gallery and make sure that I won't run into issues at the next modus update because of an updated JS file that I won't change in my child theme.
Anyway thank you, I will be able to move forward with Piwigo now :-)
Likewise. I really appreciate you posting this. Too bad we can't figure out how out how to properly child theme modus.
Offline