Announcement

  •  » Beta testing
  •  » Thumbnail Generation Script failing under 14.0b3 & rc1

#1 2023-11-19 00:05:52

GJSchaller
Member
2022-05-26
16

Thumbnail Generation Script failing under 14.0b3 & rc1

Under Piwigo 13 and earlier, I had a script I could run that would go through every image in the gallery, "touching" it and triggering thumbnails.  The script was found online (I'd need to dig up the URL), there is a TXT version of it at:

https://www.aiskon.net/public/piwigo-thumb-generate.txt

Under the 14.0b3 and rc1, it fails with the following error:

Code:

root@piwigo:/ # /usr/local/www/html/piwigo/local/config/piwigo-thumb-generate.sh

--2023-11-18 17:56:31--  https://piwigotest.aiskon.net/ws.php?format=json&method=pwg.session.login
Resolving piwigotest.aiskon.net (piwigotest.aiskon.net)... 10.0.0.240, fd4b:c2c4:3b9a:49fb:2a0:98ff:fe65:1493
Connecting to piwigotest.aiskon.net (piwigotest.aiskon.net)|10.0.0.240|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 27 [text/plain]
Saving to: ‘ws.php?format=json&method=pwg.session.login.tmp’

ws.php?format=json& 100%[===================>]      27  --.-KB/s    in 0s

2023-11-18 17:56:31 (1.36 MB/s) - ‘ws.php?format=json&method=pwg.session.login.tmp’ saved [27/27]

Removing ws.php?format=json&method=pwg.session.login.tmp.
2023-11-18 17:56:31 URL:https://piwigotest.aiskon.net/ws.php?format=json&method=pwg.getMissingDerivatives [18061] -> "missing.json" [1]
while: Expression Syntax.

root@piwigo:/ #

Any idea what I need to change for this to work under 14.0?

Thank you!

Offline

 

#2 2023-11-19 00:07:09

GJSchaller
Member
2022-05-26
16

Re: Thumbnail Generation Script failing under 14.0b3 & rc1

Offline

 

#3 2023-11-19 13:55:20

erAck
Only trying to help
2015-09-06
2043

Re: Thumbnail Generation Script failing under 14.0b3 & rc1

Note the
while: Expression Syntax.
output line, that indicates a shell error with the script in one of the while loops. So run just the first two wget commands and inspect the missing.json file, and then what the sed command sequence produces that would be fed to the second while, whether it makes sense or not, and if a resulting line would deliver expected results with

wget -nv -O /dev/null $line

Btw, maybe $line should be quoted as "$line" to not get broken into shell patterns.

And btw, I would not run such as root.

Also, such scripts should start with

set -e

so they bail out on pipeline errors.


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

Offline

 

#4 2023-11-19 23:40:10

GJSchaller
Member
2022-05-26
16

Re: Thumbnail Generation Script failing under 14.0b3 & rc1

Thank you - made some modifications, ran it as www instead of root, and it seems to be working.  I'll let it run overnight and see how it behaves.

If it works as expected, I'll post an article on my personal blog with full details, and link it here.

Offline

 
  •  » Beta testing
  •  » Thumbnail Generation Script failing under 14.0b3 & rc1

Board footer

Powered by FluxBB

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