Announcement

#1 2021-09-23 06:34:56

ytca
Member
Canada
2021-09-23
4

Error with a simple child theme for Modus

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:

Code:

/*
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

 

#2 2021-09-24 19:10:49

ytca
Member
Canada
2021-09-23
4

Re: Error with a simple child theme for Modus

Is there anywhere else than the forum where we can get support with Piwigo? Any help would be very appreciated, thank you :-)

Offline

 

#3 2021-09-24 20:51:47

ddtddt
Piwigo Team
Quetigny - France
2007-07-27
7201

Re: Error with a simple child theme for Modus

Hi :-)

$themeconf = array(
  'name'  => 'mytheme',
  'parent' => 'modus',
);


You love Piwigo so don't hesitate to participate, learn more on the "Contribute to Piwigo" page. If you don't have much time for contribution, you can also help the project with a donation.

Offline

 

#4 2021-09-24 21:27:45

ytca
Member
Canada
2021-09-23
4

Re: Error with a simple child theme for Modus

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

 

#5 2021-09-24 23:53:43

erAck
Only trying to help
2015-09-06
1998

Re: Error with a simple child theme for Modus


Running Piwigo at https://erack.net/gallery/

Offline

 

#6 2021-09-25 00:26:02

ytca
Member
Canada
2021-09-23
4

Re: Error with a simple child theme for Modus

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

 

#7 2022-11-26 04:14:49

jarodthornton
Member
2022-11-26
2

Re: Error with a simple child theme for Modus

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

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact