Hello/Hi/Greetings,
New user, new install on Ubuntu 18.04. When I go to create a new/first album, after clicking on "Create" I get the following error:
SyntaxError: JSON Parse error: Unrecognized token '<'
Piwigo version: latest version
PHP version: 7.2
MySQL version: 8.01
Piwigo URL: http://. Not exposed to web as of now.
Offline
Doesn't anyone have a suggestion for me?
Offline
you have a silent error, use the Dev console F12 to display the content of the JSOn call, in Network tab
Offline
I don't see a JSON call, but could it be related to the sql error where "rank", "status", and "name" needing to be put into back-tics? (reported at [Github] Piwigo issue #919)
The only error I do see is the sql error:
<pre><br />
<b>Warning</b>: [mysql error 1064] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'rank,global_rank,commentable,visible,status)
VALUES('Family','0','0','true','t' at line 2
INSERT INTO piwigo_categories
(name,rank,global_rank,commentable,visible,status)
VALUES('Family','0','0','true','true','public') in <b>/var/www/html/piwigo/include/dblayer/functions_mysqli.inc.php</b> on line <b>845</b><br />
</pre><pre><br />
<b>Warning</b>: [mysql error 1064] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ', global_rank
FROM piwigo_categories
ORDER BY id_uppercat,rank,name' at line 1
SELECT id, id_uppercat, uppercats, rank, global_rank
FROM piwigo_categories
ORDER BY id_uppercat,rank,name in <b>/var/www/html/piwigo/include/dblayer/functions_mysqli.inc.php</b> on line <b>845</b><br />
</pre><br />
<b>Fatal error</b>: Uncaught Error: Call to a member function fetch_assoc() on boolean in /var/www/html/piwigo/include/dblayer/functions_mysqli.inc.php:226
Stack trace:
#0 /var/www/html/piwigo/admin/include/functions.php(658): pwg_db_fetch_assoc(false)
#1 /var/www/html/piwigo/admin/include/functions.php(1516): update_global_rank()
#2 /var/www/html/piwigo/include/ws_functions/pwg.categories.php(574): create_virtual_category('Family', 0, Array)
#3 /var/www/html/piwigo/include/ws_core.inc.php(608): ws_categories_add(Array, Object(PwgServer))
#4 /var/www/html/piwigo/include/ws_protocols/rest_handler.php(56): PwgServer->invoke('pwg.categories....', Array)
#5 /var/www/html/piwigo/include/ws_core.inc.php(296): PwgRestRequestHandler->handleRequest(Object(PwgServer))
#6 /var/www/html/piwigo/ws.php(94): PwgServer->run()
#7 {main}
thrown in <b>/var/www/html/piwigo/include/dblayer/functions_mysqli.inc.php</b> on line <b>226</b><br />
Offline
it sounds like it's the "reserved word" issue indeed
Offline