Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to load theme if user theme has been uninstalled #1061

Closed
samwilson opened this issue Aug 14, 2019 · 2 comments

Comments

@samwilson
Copy link
Contributor

commented Aug 14, 2019

If a user has a theme set which is subsequently removed from the filesystem (i.e. still is the active theme in the user's preferences), the default theme fails to load and the following warning is issued:

( ! )  Warning: include(/themeconf.inc.php): failed to open stream: No such  file or directory in .../piwigo/include/template.class.php on  line 1141
--
1 | 0.0001 | 402880 | {main}(  ) | .../index.php:0
2 | 0.0002 | 403696 | include_once( '.../piwigo/include/common.inc.php' ) | .../index.php:11
3 | 0.0112 | 773840 | Template->__construct(  ) | .../common.inc.php:218
4 | 0.0119 | 793256 | Template->set_theme(  ) | .../template.class.php:128
5 | 0.0119 | 793824 | Template->load_themeconf(  ) | .../template.class.php:169

This is with current master (63bbba8).

samwilson added a commit to samwilson/Piwigo that referenced this issue Aug 14, 2019

Use default theme if loaded one is not found
When loading a user's theme, make sure it's installed. Also, when
determining the default theme, account for the situation in which
zero themes are installed (and use 'default' then).

Refs Piwigo#1061

plegall added a commit that referenced this issue Aug 14, 2019

Use default theme if loaded one is not found
When loading a user's theme, make sure it's installed. Also, when
determining the default theme, account for the situation in which
zero themes are installed (and use 'default' then).

Refs #1061

@plegall plegall self-assigned this Aug 14, 2019

@plegall plegall added this to the 2.10.0RC1 milestone Aug 14, 2019

@plegall

This comment has been minimized.

Copy link
Member

commented Aug 14, 2019

Nicely done, thank you @samwilson

@plegall plegall closed this Aug 14, 2019

@samwilson

This comment has been minimized.

Copy link
Contributor Author

commented Aug 14, 2019

No worries, thanks for the quick merge! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.