•  » Beta testing
  •  » 16.0.0RC2 Community plugin error and how I fixed it

#1 2025-11-12 13:19:58

moberley
Member
2025-11-10
90

16.0.0RC2 Community plugin error and how I fixed it

I found an error with the community plugin on my 16.0.0RC2 server when accessing the web upload page.

Code:

Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "file:template/add_photos.tpl" on line 22 "var rootUrl = "{get_absolute_root_url()}";" unknown modifier 'get_absolute_root_url' <-- thrown in /var/www/html/piwigo/plugins/community/template/add_photos.tpl on line 22

I was able to fix this by assigning a variable to the template in /plugins/community/add_photos.php file.

Code:

$template->assign(
  array(
    'ABSOLUTE_ROOT_URL' => get_absolute_root_url()
  )
);

And replacing line 22 in the add_photos.tpl template.

Code:

var rootUrl = "{$ABSOLUTE_ROOT_URL}";

After doing that I was able to successfully use the upload page, and the photo showed up on the pending page for validation which I was also able to do.

Offline

 

#2 2025-11-12 15:30:17

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

Re: 16.0.0RC2 Community plugin error and how I fixed it

Offline

 

#3 2025-11-12 19:12:45

moberley
Member
2025-11-10
90

Re: 16.0.0RC2 Community plugin error and how I fixed it

With the latest 16.a update to the community plugin I had to also make the `var rootUrl = "{$ABSOLUTE_ROOT_URL}";` change to the bootstrap_darkroom theme template/add_photos.tpl also.

Offline

 

#4 2025-11-13 12:33:29

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

Re: 16.0.0RC2 Community plugin error and how I fixed it

Yes, that was in my commit list :-) New revision 15.e for [extension by hannah] Bootstrap Darkroom

Offline

 
  •  » Beta testing
  •  » 16.0.0RC2 Community plugin error and how I fixed it

Board footer

Powered by FluxBB