Uncaught error when deleting themes via API #478

Closed
opened 2026-10-05 00:00:30 +02:00 by adam · 0 comments
Owner

When deleting themes via API [1] on a fresh 2.8.2 install, I get an fatal error:

Fatal error:  Uncaught Error: Call to undefined function deltree() in .../piwigo/admin/include/themes.class.php:246
Stack trace:
#0 .../piwigo/include/ws_functions/pwg.extensions.php(118): themes->perform_action('delete', 'clear')
#1 .../piwigo/include/ws_core.inc.php(608): ws_themes_performAction(Array, Object(PwgServer))
#2 .../piwigo/include/ws_protocols/rest_handler.php(56): PwgServer->invoke('pwg.themes.perf...', Array)
#3 .../piwigo/include/ws_core.inc.php(296): PwgRestRequestHandler->handleRequest(Object(PwgServer))
#4 .../piwigo/ws.php(94): PwgServer->run()
#5 {main}
  thrown in .../piwigo/admin/include/themes.class.php on line 246

Deleting the theme via Admin UI works.

1): http://PIWIGO/ws.php?format=json&method=pwg.themes.performAction&action=delete&theme=Sylvia&pwg_token=TOKEN

When deleting themes via API [1] on a fresh 2.8.2 install, I get an fatal error: ``` Fatal error: Uncaught Error: Call to undefined function deltree() in .../piwigo/admin/include/themes.class.php:246 Stack trace: #0 .../piwigo/include/ws_functions/pwg.extensions.php(118): themes-&gt;perform_action('delete', 'clear') #1 .../piwigo/include/ws_core.inc.php(608): ws_themes_performAction(Array, Object(PwgServer)) #2 .../piwigo/include/ws_protocols/rest_handler.php(56): PwgServer-&gt;invoke('pwg.themes.perf...', Array) #3 .../piwigo/include/ws_core.inc.php(296): PwgRestRequestHandler-&gt;handleRequest(Object(PwgServer)) #4 .../piwigo/ws.php(94): PwgServer-&gt;run() #5 {main} thrown in .../piwigo/admin/include/themes.class.php on line 246 ``` Deleting the theme via Admin UI works. 1): `http://PIWIGO/ws.php?format=json&method=pwg.themes.performAction&action=delete&theme=Sylvia&pwg_token=TOKEN` <!-- github-sync-id:169123520 -->
adam closed this issue 2026-10-05 00:00:30 +02:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#478