Pages: 1 2
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)
I get the same error.
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:
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 EditorLast edited by epifeny (2025-12-27 10:33:53)
Offline
and what is your theme in gallery side?
Offline
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
Offline
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
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
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?
Offline
ddtddt wrote:
Hi :-)
Have you checked that the requested file is present?
Sorry for the late response
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
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:
$template->set_filename('selected_tags', 'include/selected_tags.inc.tpl');to this:
$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.
Offline
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:
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 162Offline
OK, this change worked for me:
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
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 159Hi :-)
Have you checked that the requested file is present?
Would you be able to check this issue out?
Offline
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 159Hi :-)
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.)
Offline
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
ddtddt can you help here?
Offline
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
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:
$template->set_filename('selected_tags', 'include/selected_tags.inc.tpl')with no fallback, so themes without that file fail.
I changed it to
$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
Pages: 1 2