#1 2025-12-27 10:32:58

epifeny
Member
2024-12-05
52

Uncaught Smarty Unable to load file:include/selected_tags.inc.tpl

Hello,

When I want to view tags, I get an error. It doesn't work from the plain user view nor admin (ex. /admin.php?page=tags)

https://i.gyazo.com/d57cb55dd6206484845d00976f1e4570.png

I get the same error.

Code:

Fatal error: Uncaught --> Smarty: Unable to load 'file:include/selected_tags.inc.tpl' <-- thrown in /app/www/public/include/smarty/src/Template.php on line 159

Environment:

Code:

    You are running Piwigo latest version.

Environment

    Piwigo 16.1.0 Check for upgrade
    Installed on 4 December 2024, 1 year 3 weeks 2 days ago
    Operating system: Linux (container)
    PHP: 8.3.19 (Show info) [2025-12-27 09:28:09]
    MySQL: 11.4.8-MariaDB-log [2025-12-27 09:28:09]
    Graphics Library: External ImageMagick 7.1.1-41
    Cache size 133.43 Mo   calculated 4 seconds ago Refresh

Activated plugin list 4

    Admin Tools
    EditorPlus
    Language Switch
    LocalFiles Editor

Last edited by epifeny (2025-12-27 10:33:53)

Offline

 

#2 2025-12-27 10:58:13

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
14059

Re: Uncaught Smarty Unable to load file:include/selected_tags.inc.tpl

and what is your theme in gallery side?

Offline

 

#3 2025-12-27 11:41:20

epifeny
Member
2024-12-05
52

Re: Uncaught Smarty Unable to load file:include/selected_tags.inc.tpl

plg wrote:

and what is your theme in gallery side?

Currently it's modus, but changing it didn't resolve the issue.
I tried to change it to bootstrap_darkroom and stripped_responsive and I get the same error.
I also noticed some warnings in the profile.php page of the user
https://i.gyazo.com/872694edd6d478de539dd04a4d7b91a8.png

Offline

 

#4 2026-01-10 21:25:54

epifeny
Member
2024-12-05
52

Re: Uncaught Smarty Unable to load file:include/selected_tags.inc.tpl

Even with now having updated to Currently running version 16.2.0, I'm still unable to use tags and see errors when I try

Code:

Fatal error: Uncaught --> Smarty: Unable to load 'file:include/selected_tags.inc.tpl' <-- thrown in /app/www/public/include/smarty/src/Template.php on line 159

Offline

 

#5 2026-01-11 05:45:45

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

Re: Uncaught Smarty Unable to load file:include/selected_tags.inc.tpl

epifeny wrote:

Even with now having updated to Currently running version 16.2.0, I'm still unable to use tags and see errors when I try

Code:

Fatal error: Uncaught --> Smarty: Unable to load 'file:include/selected_tags.inc.tpl' <-- thrown in /app/www/public/include/smarty/src/Template.php on line 159

Hi :-)

Have you checked that the requested file is present?


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

 

#6 2026-01-21 18:40:57

epifeny
Member
2024-12-05
52

Re: Uncaught Smarty Unable to load file:include/selected_tags.inc.tpl

ddtddt wrote:

Hi :-)

Have you checked that the requested file is present?

Sorry for the late response

Code:

root@740519cd9d2e:/# find . -path ./proc -prune -o -type f -name 'selected_tags.inc.tpl*' -print
./config/www/themes/smartpocket/template/include/selected_tags.inc.tpl

Last edited by epifeny (2026-01-21 18:41:56)

Offline

 

#7 2026-01-21 19:01:23

epifeny
Member
2024-12-05
52

Re: Uncaught Smarty Unable to load file:include/selected_tags.inc.tpl

I used AI and this change to the file /app/www/public/include/selected_tags.inc.php, inside the piwigo container fixed the issue:

changed this:

Code:

$template->set_filename('selected_tags', 'include/selected_tags.inc.tpl');

to this:

Code:

$template->set_filename(
  'selected_tags',
  'themes/smartpocket/template/include/selected_tags.inc.tpl'
);

This was just a proof of concept, and I hope this will help you figure out what's wrong, to be able to fix it correctly, but exploring the albums from Tags simply works now with this fix.
https://i.gyazo.com/d65178a8f368d13fc9718b04f1e8183f.png

Offline

 

#8 2026-01-26 16:11:02

patman
Member
2016-01-24
19

Re: Uncaught Smarty Unable to load file:include/selected_tags.inc.tpl

I'm also hitting this, on piwigo 16.2.0

I only see it on mobile - I'm not sure how the theme gets set for that.

I tried the change epifeny posted but it didn't fix the problem for me.

With stack:

Code:

 Fatal error: Uncaught --> Smarty: Unable to load 'file:include/selected_tags.inc.tpl' 

Stack trace: 
#0 /home/patman/piwigo/photos/include/smarty/src/Template.php(677): Smarty\Template->render()
#1 /home/patman/piwigo/photos/include/smarty/src/Template.php(608): Smarty\Template->_execute()
#2 /home/patman/piwigo/photos/include/smarty/src/Smarty.php(2121): Smarty\Template->fetch()
#3 /home/patman/piwigo/photos/include/template.class.php(515): Smarty\Smarty->fetch()
#4 /home/patman/piwigo/photos/include/template.class.php(438): Template->parse()
#5 /home/patman/piwigo/photos/include/selected_tags.inc.php(41): Template->assign_var_from_handle()
#6 /home/patman/piwigo/photos/index.php(232): include_once('...')
#7 {main} <-- thrown in /home/patman/piwigo/photos/include/smarty/src/Template.php on line 162

Offline

 

#9 2026-01-26 16:23:07

patman
Member
2016-01-24
19

Re: Uncaught Smarty Unable to load file:include/selected_tags.inc.tpl

OK, this change worked for me:

Code:

diff --git a/include/selected_tags.inc.php b/include/selected_tags.inc.php
index f3fb6dbcd..aeb83ad24 100644
--- a/include/selected_tags.inc.php
+++ b/include/selected_tags.inc.php
@@ -37,6 +37,10 @@ $template->assign(
   )
 );
 
-$template->set_filename('selected_tags', 'include/selected_tags.inc.tpl');
+if (file_exists(PHPWG_ROOT_PATH . 'themes/' . $user['theme'] . '/template/include/selected_tags.inc.tpl')) {
+  $template->set_filename('selected_tags', 'include/selected_tags.inc.tpl');
+} else {
+  $template->set_filename('selected_tags', realpath(PHPWG_ROOT_PATH . 'themes/default/template/include/selected_tags.inc.tpl'));
+}
 $template->assign_var_from_handle('SELECTED_TAGS_TEMPLATE', 'selected_tags');

Offline

 

#10 2026-02-01 21:12:49

epifeny
Member
2024-12-05
52

Re: Uncaught Smarty Unable to load file:include/selected_tags.inc.tpl

ddtddt wrote:

epifeny wrote:

Even with now having updated to Currently running version 16.2.0, I'm still unable to use tags and see errors when I try

Code:

Fatal error: Uncaught --> Smarty: Unable to load 'file:include/selected_tags.inc.tpl' <-- thrown in /app/www/public/include/smarty/src/Template.php on line 159

Hi :-)

Have you checked that the requested file is present?

Would you be able to check this issue out?

Offline

 

#11 2026-02-02 06:18:52

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

Re: Uncaught Smarty Unable to load file:include/selected_tags.inc.tpl

Hi,

epifeny wrote:

ddtddt wrote:

epifeny wrote:

Even with now having updated to Currently running version 16.2.0, I'm still unable to use tags and see errors when I try

Code:

Fatal error: Uncaught --> Smarty: Unable to load 'file:include/selected_tags.inc.tpl' <-- thrown in /app/www/public/include/smarty/src/Template.php on line 159

Hi :-)

Have you checked that the requested file is present?

Would you be able to check this issue out?

Use FTP to check whether the file is present (I don't have access to it.)


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

 

#12 2026-02-02 13:20:20

epifeny
Member
2024-12-05
52

Re: Uncaught Smarty Unable to load file:include/selected_tags.inc.tpl

ddtddt wrote:

Hi,
Use FTP to check whether the file is present (I don't have access to it.)

I provided the details for that above. Please see my previous detailed responses.

Here and the one after it
https://piwigo.org/forum/viewtopic.php? … 33#p194133

Last edited by epifeny (2026-02-02 13:21:16)

Offline

 

#13 2026-02-11 22:23:51

epifeny
Member
2024-12-05
52

Re: Uncaught Smarty Unable to load file:include/selected_tags.inc.tpl

ddtddt can you help here?

Offline

 

#14 2026-02-17 13:47:11

hannah
Piwigo Team
2019-04-24
87

Re: Uncaught Smarty Unable to load file:include/selected_tags.inc.tpl

A fix was made 2 months ago too add the missing tpl file to smartpocket. This was published with the version 16.1.0.1 of the theme.

I am unable to reproduce the problem on my end, can anyone provide more details ?

Is your version of smartPocket up to date?

Offline

 

#15 2026-02-20 23:34:33

epifeny
Member
2024-12-05
52

Re: Uncaught Smarty Unable to load file:include/selected_tags.inc.tpl

hannah wrote:

A fix was made 2 months ago too add the missing tpl file to smartpocket. This was published with the version 16.1.0.1 of the theme.

I am unable to reproduce the problem on my end, can anyone provide more details ?

Is your version of smartPocket up to date?

Yes, smartPocket is up to date. From themes/smartpocket/themeconf.inc.php: Version: 16.2.0.

The file exists at themes/smartpocket/template/include/selected_tags.inc.tpl (starts with <span id="selected-tags-container">).

The problem is in core: include/selected_tags.inc.php has:

Code:

$template->set_filename('selected_tags', 'include/selected_tags.inc.tpl')

with no fallback, so themes without that file fail.

I changed it to

Code:

$template->set_filename('selected_tags', 'themes/smartpocket/template/include/selected_tags.inc.tpl')

and tags work again.

The proper fix should be in core with a fallback to the default theme.

Offline

 

Board footer

Powered by FluxBB