Piwigo update failed :(

What type of hardware are you using: Old laptop or computer
What YunoHost version are you running: 12.0.7
What app is this about: Piwigo

Describe your issue

First of all, I was so happy to do a System Update today and to see that Piwigo is now back in the app store. Thank you so much to those who made this possible. I have been using Piwigo since I can’t remember and was sad to see it go from YNH, but yes it’s back… But…

I did the update but sadly it failed. ( from 14.3.0~ynh1 to 14.5.0~ynh1)

I have restored tot he previous last known YNH version.

See log

Many thanks

Dj

Share relevant logs or error messages

https://paste.yunohost.org/raw/yowulixawu

hello i’m so glad too
but my upgrade from 14.3.0~ynh1 to 14.5.0~ynh1 worked fine
although i did not use bookworm for the moment because piwigo
YunoHost 11.3.0.2 (stable)
is it why ?

You are so so lucky. Yes it could be that. I’m now bookworm.

I hope there will be a fix from the maintainer. I’d be so grateful.

Dj

This is the log of a the failed restore of the safety backup before upgrade, not the log of the failed upgrade itself.

The restore seems to fail because the database already exists … which could be symptomatic of the removal of the app that did not complete in a clean way … Could it be that it was manually interrupted with a Ctrl+C in the middle of the process or something ?

Anyway, if you want help with the upgrade you’ll have to share the failed upgrade log …

@Aleks Whoops… yes I see that now…

Here is the update log…

https://paste.yunohost.org/raw/ifokulijic

However, there has been a change. I tried again to update Piwigo today and this time it installed without any errors however when I tried to launch Piwigo the screen was all “mush”, with no theme, and no images.

See attached.

I have restored my previous working install.

Dj

Now that’s indeed an upgrade log, but that’s from ~1 hour ago, and that one suceeded, so i still don’t know why the original upgrade from yesterday failed …

@Aleks No neither do I…

Indeed it shows complete and successful, but it’s not. All the themes and images are stripped out and the site no longer works. I tried to remove all the plugins and all the themes to “default”, but there was no change.

No worries. I’m back to running the backed-up version again, the latest version from Piwigo (15.1.0). I know the possible risks, security etc, but it works…!

Many thanks.

Dj

PS. I have another place where I can try and install a fresh instance of Piwigo, my favourite photo app, and report back.

Dj

Hello,

Same things, so happy to see that Piwigo is back in the maintaned apps, upgraded today, and same result: YNH sees a succesfull upgrade but it brokes the rendering.

It seems to be due to an error in tha root path or something similar:

image

All href to images or CSS are wrong.

It seems to be related to that: Blaming piwigo_ynh/conf/config.inc.php at master · YunoHost-Apps/piwigo_ynh · GitHub

Léo

Can you try updating to the following patched version? This hopefully fixes faulty $data_dir usage.

sudo yunohost app upgrade piwigo -u https://github.com/YunoHost-Apps/piwigo_ynh/tree/orhtej2-patch-1 -F

Still not working since I have now <script type="text/javascript" src="/home/yunohost.app/piwigo/_data/combined/1gcrwat.js"></script>and not relative links…

Hello, I just tried to reinstall it and it changes nothing…

During the install I still have two errors:

Info: [##########++........] > Configuring LDAP plugin...
Info: [############+++++++.] > Reconfiguring Fail2Ban...
Info: The service fail2ban has correctly executed the action reload-or-restart.
Info: [####################] > Upgrade of piwigo completed
Success! piwigo upgraded
sh: 0: getcwd() failed: No such file or directory
sh: 0: getcwd() failed: No such file or directory
Success! Upgrade complete

The config.inc.php is filled as @orhtej2 patched

My source code contains absolute paths such as <link rel="stylesheet" type="text/css" href="/home/yunohost.app/piwigo/_data/combined/1gn04a5.css"> that is not reachable by my browser.

And, I tried to see if the files exists

# cat /home/yunohost.app/piwigo/_data/combined/1gn04a5.css
cat: /home/yunohost.app/piwigo/_data/combined/1gn04a5.css: No such file or directory

I tried to change path to relative in the config file without success. I have no idea about what to test. It is maybe because I upgraded piwigo before using piwigo’s admin panel?

Léo

After some thinking I retract my ‘fix’ as it’s not what was recommended in the admin guide.
I have no idea on how to fix the current problem other than retract the $data_dir usage for _data.

Piwigo was removed, I think when it hit v14? When it was removed I did the updates through Piwigo, ie in the app when an update was available, which has its risks I suppose regarding security, but I’m up to the current Piwigo version. The reintroduction of Piwigo in YNH is v14.

Maybe that’s where the problem is, If we have upgraded through Piwigo to v15, we are now basically going back as the Pieigo here is still v14, but yes the rendering is all shot through…

Pity…

Dj

Hi there,

I rolled back to master.

Then I noticed that I was able to click on the https://ynh.tld/piwigo/admin.php?page=intro&ato_template_combine_files=0 link once logged in, labelled as “Combine JS & CSS” and it saved my admin page that is now correctly rendered.

Then I upgraded to piwigo 15 from the admin panel (it repairs issues in tpl files)

I’m now installing back themes and plugins :wink:

Still an issue: all the image’s URL are wrong (they are still in the server’s folder but not founded by the gallery)

I’ll will write back here any news about that.

Hi there,

I finaly found a way to make it work again… Not clean but my dev skills are limited.

Step 1:

Step 2:

Step 3: Change links to data folders

/var/www/piwigo# rm -r upload/
/var/www/piwigo# ln -s /home/yunohost.app/piwigo/upload/ ./upload
/var/www/piwigo# chown -h piwigo:www-data upload
/var/www/piwigo# rm -r _data/
/var/www/piwigo# ln -s /home/yunohost.app/piwigo/_data/ ./_data
/var/www/piwigo# chown -h piwigo:www-data _data

and change the path to upload folder in config file

$conf['data_location'] = './_data/';
$conf['upload_dir'] = './upload';

It is now working (except I have to click the “Combine JS & CSS” button everyday to access the admin panel)

Léo