Announcement

#1 2021-11-09 08:30:29

dev3
Member
2021-02-01
14

Upgrade to 12: gallery won't open... got error

I upgraded to 12 and some galleries  won't open... some will... takes error.  Here is one of them.

https://answer123.com/piwigopix/index.php?/category/6

Env:


Piwigo 12.0.0 Check for upgrade
Operating system: Linux
PHP: 7.4.3 (Show info) [2021-11-08 23:23:50]
MySQL: 8.0.27-0ubuntu0.20.04.1 [2021-11-08 23:23:50]
Graphics Library: GD 2.2.5
Piwigo URL: http://

Error:

Warning:  [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 'ASC' at line 7

SELECT DISTINCT(image_id)
  FROM piwigo_image_category
    INNER JOIN piwigo_images ON id = image_id
  WHERE
    category_id = 6
AND (category_id NOT IN (3,4,5))
   ORDER BY rank ASC
; in /var/www/html/answer123.com/public_html/piwigopix/include/dblayer/functions_mysqli.inc.php on line 847


Fatal error: Uncaught Error: Call to a member function fetch_assoc() on bool in /var/www/html/answer123.com/public_html/piwigopix/include/dblayer/functions_mysqli.inc.php:908 Stack trace: #0 /var/www/html/answer123.com/public_html/piwigopix/include/section_init.inc.php(317): query2array() #1 /var/www/html/answer123.com/public_html/piwigopix/index.php(12): include('/var/www/html/a...') #2 {main} thrown in /var/www/html/answer123.com/public_html/piwigopix/include/dblayer/functions_mysqli.inc.php on line 908


HELP!

Offline

 

#2 2021-11-09 11:33:57

erAck
Only trying to help
2015-09-06
2027

Re: Upgrade to 12: gallery won't open... got error

Seems to be caused by the unescaped rank in ORDER BY rank ASC where rank is a keyword since MySQL 8. You could try to change the sort order in the affected albums such that they are sorted by datetime or other.


Running Piwigo at https://erack.net/gallery/

Offline

 

#3 2021-11-09 15:17:10

dev3
Member
2021-02-01
14

Re: Upgrade to 12: gallery won't open... got error

YES! Simply changing from "manual" order to "default" order on the Album-Edit-Photo Sort Order worked.

I am so thankful to you for taking the time to help. After about two hours with this last night I was ready to drop Piwigo for Zenphoto or something else. I've run Piwigo for ten years... never a problem with it... until toady... and you SAVED the day for me.

One last item. Would you or someone be kind enough to explain this:

At top of the Sort screen it says "Manual.' I can drag and drop pix to change order.

At the bottom of the screen are three radio-buttons. What do each of them mean: Default, Manual, Automatic.

After I change to Default I can still drag and drop and it looks like it automatically change the radio button to "Manual"... which now works. I think that just changing the button from Manual to Default and saving settings somehow 'reset' the database so that it now works in Manual mode.

Maybe point me in the direction of where Default, Auto, and Manual might be explained. I see this but it does not seem to explain it very well:

Photos sort order tab
Enable change of photo order of the album.

Use the default photo sort order: The photos are ordered by it´s posted date, newer first. Default photo sort order is defined in the configuration file by two options: order_by_custom and order_by_inside_category_custom. More description is available checking the config_default.inc.php file or activating the local_files_editor plugin and displaying the reference file.

Manual order: When set to manual order, photos order can be changed by dragging and dropping anywhere.

Automatic order: Use some of pre defined orders for photos. There are many options to choose from, including date created, date posted, rating score*, visits*, and so on.

(*)Warning: Be sure to test these sort orders by yourself as they can give unexpected results.

Again, MANY THANKS for fixing this for me. .

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact