pwg.categories.add - SQL error returned to client with piwigo 11.0.3 - private folder in non-root folder #1170

Open
opened 2026-10-05 00:34:19 +02:00 by adam · 0 comments
Owner

I'm not clear what has started causing it, just creating and deleting categories all day in this folder I think.
I've tested using the /tools/ws.htm file and I fill in each field with the following values.
name: <doesn't matter>
parent: <valid parent album id>
comment: <doesn't matter>
visible: false
status: private
commentable: false

It appears that you can opt to either create a new PRIVATE folder under the root, OR a PUBLIC folder under any other folder.
Is this expected behaviour? If so, a response to explain would be helpful. In any case, dumping the sql to the client isn't ideal.
The other field values are irrelevant for getting this error. When I say irrelevant, I mean that it doesn't matter if you send them or not. What is important is sending either status:private AND parent: valid parent album id>

Warning:  [mysql error 1064] You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1401)
    AND status = 'private'' at line 3

SELECT id
  FROM piwigo_categories
  WHERE id IN (,1401)
    AND status = 'private'
; in /config/www/Piwigo-11.3.0/include/dblayer/functions_mysqli.inc.php on line 864
I'm not clear what has started causing it, just creating and deleting categories all day in this folder I think. I've tested using the /tools/ws.htm file and I fill in each field with the following values. name: ```<doesn't matter>``` parent: ```<valid parent album id>``` comment: ```<doesn't matter>``` visible:``` false``` status: ```private``` commentable: ```false``` It appears that you can opt to either create a new PRIVATE folder under the root, OR a PUBLIC folder under any other folder. Is this expected behaviour? If so, a response to explain would be helpful. In any case, dumping the sql to the client isn't ideal. The other field values are irrelevant for getting this error. When I say irrelevant, I mean that it doesn't matter if you send them or not. What is important is sending either status:private AND parent: ```valid parent album id>``` ``` Warning: [mysql error 1064] You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1401) AND status = 'private'' at line 3 SELECT id FROM piwigo_categories WHERE id IN (,1401) AND status = 'private' ; in /config/www/Piwigo-11.3.0/include/dblayer/functions_mysqli.inc.php on line 864 ``` <!-- github-sync-id:816734520 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#1170