[Piwigo] Photo gallery

thanks, sorry abour double posting the issue.

There is a submitted PR here, waiting for approval, but that you can try by:

yunohost app upgrade piwigo -u https://github.com/YunoHost-Apps/piwigo_ynh/tree/fix-upgrade

That would really help, as there seems nobody tried the testing release, leading to failures for numerous people…

1 Like

Hi @JimboJoe,

Thanks for the suggestion, very useful I did not know you could do such a tryout. Will do it and report back.

Upgrade with /tree/fix-upgrade fails.

Warning: parse error: Invalid numeric literal at line 2, column 9
Warning: [ERR] !!
Warning: piwigo’s script has encountered an error. Its execution was cancelled.
Warning: !!
Warning: Please find here an extract of the log before the crash:
Warning: [DEBUG]: DEBUG - +++ test -n ‘/ws.php?format=json’
Warning: [DEBUG]: DEBUG -’
Warning: [DEBUG]: DEBUG -’
Warning: [DEBUG]: DEBUG - +++ echo ‘/ws.php?format=json’
Warning: [DEBUG]: DEBUG - ++ local ‘local_page=/ws.php?format=json’
Warning: [DEBUG]: DEBUG - ++ local ‘full_path=/piwigo/ws.php?format=json’
Warning: [DEBUG]: DEBUG -’
Warning: [DEBUG]: DEBUG - ++ local ‘full_page_url=https://localhost/piwigo/ws.php?format=json
Warning: [DEBUG]: DEBUG - ++ local POST_data=
Warning: [DEBUG]: DEBUG - ++ local arg=
Warning: [DEBUG]: DEBUG - ++ for arg in “${@:2}”
Warning: [DEBUG]: DEBUG - ++ POST_data=‘method=pwg.session.getStatus&’
Warning: [DEBUG]: DEBUG -’
Warning: [DEBUG]: DEBUG - ++ POST_data=‘–data method=pwg.session.getStatus’
Warning: [DEBUG]: DEBUG - ++ sleep 2
Warning: [DEBUG]: DEBUG - ++ curl --silent --show-error -kL -H ‘Host: host.org’ --resolve host.org:443:127.0.0.1 --data method=pwg.session.getStatus ‘https://localhost/piwigo/ws.php?format=json’ --cookie-jar /tmp/ynh-piwigo-cookie.txt --cookie /tmp/ynh-piwigo-cookie.txt
Warning: [DEBUG]: DEBUG - + status=’
Warning: [DEBUG]: WARNING - parse error: Invalid numeric literal at line 2, column 9
Warning: [DEBUG]: DEBUG -
Warning: [DEBUG]: DEBUG - Table ‘'‘piwigo.piwigo_ldap_login_config’'’ doesn’'‘t exist
Warning: [DEBUG]: DEBUG - select 1 from piwigo_ldap_login_config LIMIT 1 in /var/www/piwigo/include/dblayer/functions_mysqli.inc.php
Warning: [DEBUG]: DEBUG -,“upload_file_types”:“jpg,jpeg,png,gif”,“upload_form_chunk_size”:500}}’
Warning: [DEBUG]: DEBUG - ++ jq --raw-output .result.pwg_token
Warning: [DEBUG]: DEBUG - + pwg_token=
Warning: [DEBUG]: DEBUG - + ynh_exit_properly
Warning: [ERR] Upgrade failed.

Hello,

I have the same error as @mr_smithers, that is I run:

sudo yunohost app upgrade piwigo -u https://github.com/YunoHost-Apps/piwigo_ynh/tree/fix-upgrade

and I get:

Warning: parse error: Invalid numeric literal at line 2, column 9
Warning: [ERR] !!
Warning:   piwigo's script has encountered an error. Its execution was cancelled.
Warning: !!

My full log is available at https://paste.yunohost.org/raw/olocagenij

Let me know if you need me to do further tests, I’d be happy to help!

:up: @JimboJoe, is there anything we can do to help here?

Hi again,

I had a look at the changes at https://github.com/YunoHost-Apps/piwigo_ynh/commit/2b81bf7731a80dca49b4d640b3496838cb94b917#diff-44cb16c778719320333118c04d509a7cR246 and the error.

2020-03-22 20:58:35,736: DEBUG - ++ curl --silent --show-error -kL -H 'Host: cryostase.eu' --resolve cryostase.eu:443:127.0.0.1 --data method=pwg.session.getStatus 'https://localhost/piwigo/ws.php?format=json' --cookie-jar /tmp/ynh-piwigo-cookie.txt --cookie /tmp/ynh-piwigo-cookie.txt
2020-03-22 20:58:36,139: DEBUG - + status='
2020-03-22 20:58:36,141: DEBUG - <pre><br />
2020-03-22 20:58:36,142: DEBUG - <b>Warning</b>:  [mysql error 1146] Table '\''piwigo.piwigo_ldap_login_config'\'' doesn'\''t exist
2020-03-22 20:58:36,142: DEBUG - select 1 from `piwigo_ldap_login_config` LIMIT 1 in <b>/var/www/piwigo/include/dblayer/functions_mysqli.inc.php</b> on line <b>856</b><br />
2020-03-22 20:58:36,143: DEBUG - </pre>{"stat":"ok","result":{"username":"vincent","status":"webmaster","theme":"modus","**********":"en_UK","pwg_token":"XXXXXXX","charset":"utf-8","current_datetime":"2020-03-22 20:58:36","**********":"2.10.1","available_sizes":["square","thumb","2small","xsmall","small","medium","large","xlarge","xxlarge"],"upload_file_types":"jpg,jpeg,png,gif","upload_form_chunk_size":500}}'
2020-03-22 20:58:36,144: DEBUG - ++ jq --raw-output .result.pwg_token
2020-03-22 20:58:36,246: DEBUG - + pwg_token=
2020-03-22 20:58:36,247: WARNING - parse error: Invalid numeric literal at line 2, column 9

It looks to me the problem is that the mysql errors in the rendered page prevent jq from parsing the output correctly. That is, whereas the output should be pure JSON, it also contains the warning about the piwigo.piwigo_ldap_login_config not existing within the HTML <pre> tags and this is confusing jq. At this point, I am not too sure about how to make it so that the warning is not present in the generated HTML …

Edit: the issue actually only occurs for me when going from 2.10.1~ynh1 to 2.10.1~ynh2. A potential workaround is thus to uninstall and reinstall the app, in which case no migration is done and the updated app works fine (I did not have significant user data as this is a new server so no problem to restore existing pictures/galleries for me)

Hello, can you please have a new try?

yunohost app upgrade piwigo -u https://github.com/YunoHost-Apps/piwigo_ynh/tree/fix-upgrade
2 Likes

hello, upgrade complete !

Warning: /!\ Packagers! This app is still using the skipped/protected/unprotected_uris/regex settings which are now obsolete and deprecated…

1 Like

Thank you JimboJoe,
Your fix it’s a thunder! Piwigo updated easily…Good job!

1 Like

Thanks ! This fix the upgrade :slight_smile:

Thanks much for the quick fix and your reactivity!

Update works but gives the error @mrmars is mentioning …

Thanks for you enthusiasm! :wink:
This is just a deprecation that will have to be addressed in the future (no urgency yet).

New testing release :tada:

sudo yunohost app install https://github.com/YunoHost-Apps/piwigo_ynh/tree/testing --debug
or
sudo yunohost app upgrade piwigo -u https://github.com/YunoHost-Apps/piwigo_ynh/tree/testing --debug

New stable release :tada:

Hello,
I have been using piwigo on YunoHost for a while now, thanks a lot for the great work !

I’m having issues upgrading from 12.3.0~ynh1 to any 13.x version since last year, everytime I try it, I get this kind of error :

WARNING - parse error: Invalid numeric literal at line 1, column 10

I’ve tried upgrading with the testing branch, but gets me the same error. Any hint ?

full log here

thanks a lot for any help !

1 Like

Same (or, at least, closely similar) problem here (log).

Yunohost installed on an old machine at home, no special design.

yunohost:
repo: stable
version: 11.0.11
yunohost-admin:
repo: stable
version: 11.0.11
moulinette:
repo: stable
version: 11.0.9
ssowat:
repo: stable
version: 11.0.11.1

tried today again, same errors :
“parse error: invalid numeric literal at line 1, column 10
error : upgrade failed
E: unable to locate package piwigo-ynh-deps”

full log, here

Thanks a lot for the help.

HI everyone !

still no clue from packagers ?
is there something I can do to try and help ? the versions keep coming up, and I am still stuck at 12.3.0 :frowning:

Any hint ?