Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New albums become unpublished + data loss #1396

Closed
kuz-z-zma opened this issue Nov 28, 2023 · 21 comments
Closed

New albums become unpublished + data loss #1396

kuz-z-zma opened this issue Nov 28, 2023 · 21 comments

Comments

@kuz-z-zma
Copy link

Latest version of Zenphoto 1.6.1b (downloaded source today)

Issue comes when uploading new folder via ftp or creating it via web interface:

  • All edits to folder get lost upon closing of edit screen despite applying changes.
  • This include: album name, sorting options, thumbs, tags, description.
  • Multiple saves don't help, changes will be saved and displayed in the window (with notification of applied changes shown), but after closing of the window album will revert to default name, unpublished state and will loose all mentioned changes.

Notable differences from previous behaviour:

  • album name is listed as parent-folder/folder (was folder only previously)
  • during editing process no breadcrumbs are shown to parent folders in the edit screen

Error log shows:
[Tue Nov 28 04:41:54.037900 2023] [fcgid:warn] [pid 28139:tid 140188843194112] [client 178.252.127.227:53450] mod_fcgid: stderr: PHP Warning: Cannot modify header information - headers already sent by (output started at /folder structure/zp-core/admin-functions.php:5104) in /folder structure/zp-core/admin-functions.php on line 107, referer: https://www.photo.private-universe.net/
[Tue Nov 28 04:41:54.037995 2023] [fcgid:warn] [pid 28139:tid 140188843194112] [client 178.252.127.227:53450] mod_fcgid: stderr: PHP Warning: Cannot modify header information - headers already sent by (output started at /folder structure/zp-core/admin-functions.php:5104) in /folder structure/zp-core/admin-functions.php on line 108, referer: https://www.photo.private-universe.net/
[Tue Nov 28 04:41:54.038010 2023] [fcgid:warn] [pid 28139:tid 140188843194112] [client 178.252.127.227:53450] mod_fcgid: stderr: PHP Warning: Cannot modify header information - headers already sent by (output started at /folder structure/zp-core/admin-functions.php:5104) in /folder structure/zp-core/admin-functions.php on line 109, referer: https://www.photo.private-universe.net/
[Tue Nov 28 04:41:54.038023 2023] [fcgid:warn] [pid 28139:tid 140188843194112] [client 178.252.127.227:53450] mod_fcgid: stderr: PHP Warning: Cannot modify header information - headers already sent by (output started at /folder structure/zp-core/admin-functions.php:5104) in /folder structure/zp-core/admin-functions.php on line 114, referer: https://www.photo.private-universe.net/
[Tue Nov 28 04:41:54.038036 2023] [fcgid:warn] [pid 28139:tid 140188843194112] [client 178.252.127.227:53450] mod_fcgid: stderr: PHP Warning: Cannot modify header information - headers already sent by (output started at /folder structure/zp-core/admin-functions.php:5104) in /folder structure/zp-core/admin-functions.php on line 115, referer: https://www.photo.private-universe.net/
[Tue Nov 28 04:41:54.038049 2023] [fcgid:warn] [pid 28139:tid 140188843194112] [client 178.252.127.227:53450] mod_fcgid: stderr: PHP Warning: Cannot modify header information - headers already sent by (output started at /folder structure/zp-core/admin-functions.php:5104) in /folder structure/zp-core/admin-functions.php on line 116, referer: https://www.photo.private-universe.net/
[Tue Nov 28 04:41:54.038062 2023] [fcgid:warn] [pid 28139:tid 140188843194112] [client 178.252.127.227:53450] mod_fcgid: stderr: PHP Warning: Cannot modify header information - headers already sent by (output started at /folder structure/zp-core/admin-functions.php:5104) in /folder structure/zp-core/admin-functions.php on line 117, referer: https://www.photo.private-universe.net/

What helps to resolve this issue: refreshing database via link in the Overview.
After that folders retain changes and breadcrumbs show up in the editing screen.

@acrylian
Copy link
Member

Actually there has been no change to handling albums I am aware of. Be sure your file/folder permissions are correct, the line number indicates that there was a problem with that.

@kuz-z-zma
Copy link
Author

kuz-z-zma commented Nov 28, 2023

Permissions are fine, I can write and execute, there were no changes there.

Another layer:
If Albums are set to be Unpublished by default. - they will loose published status and info.
If they set to be Published by default - they stay published even if you unpublish them, and loose all changes to info.

@acrylian
Copy link
Member

Sorry, I was in the wrong line indeed looking quickly inbetween, not related to permissions itself.

I just created a new album via the "New Album" button on the album list. Nothing unexpecteed happened, changed title was applied and kept. Did you create the album via the uploader?

@kuz-z-zma
Copy link
Author

Did you create the album via the uploader?

Usually, I upload folders via ftp.
During testing - I tried also to create empty album via web-interface, had the same issues.

Updating database after creation of albums allows to save info/status for those new albums.
But editing of older albums has no issues.

@acrylian
Copy link
Member

I can't test via FTP itself but creating a (empty) folder directly on my local install also does not show any unexepected behaviour. I can change for example the title without any problem.

It can happen that the album list throws an error if db and filesystem are out of sync especially if you deleted albums via FTP, Then a database refresh is needed to clean up. But that's something different.

@kuz-z-zma
Copy link
Author

Try making changes and then return to album list and fin album again, because at first glance it saves everything and shows notification that it was don, and then when you go to albums and locate this folder again - it's back to original state.

I can give you access to my demo site for testing.

@acrylian
Copy link
Member

Try making changes and then return to album list and fin album again, because at first glance it saves everything and shows notification that it was don, and then when you go to albums and locate this folder again - it's back to original state.

Sorry, I cannot reproduce this. I did change the title which was the folder name and the publish status. Both were as I set them…

Is this a toplevel album or a sub album?

@kuz-z-zma
Copy link
Author

Is this a toplevel album or a sub album?

My issues are with different levels of sub albums.
I tried creating top-level album now - and it applies changes with no issue.

@acrylian
Copy link
Member

My issues are with different levels of sub albums.
I tried creating top-level album now - and it applies changes with no issue.

Okay, I had not tried any subalbum. But nevertheless there were no changes in this area… What was changed is inheritance behaviour of sub items (albums, images etc). Previously that was not properly done. If a parent album is unpublished its subalbums technically are as well, even if they itself are published. Is that perhaps what you are seeing?

@acrylian
Copy link
Member

This didn't work properly and also wasn't always indicated on the backend. There are now individual icons for that:
Bildschirmfoto 2023-11-28 um 15 54 02

@acrylian
Copy link
Member

Nevertheless I will try to reproduce issues with sub albums later.

@kuz-z-zma
Copy link
Author

If a parent album is unpublished its subalbums technically are as well, even if they itself are published. Is that perhaps what you are seeing?

No, my parent folders were already published in all cases.

@acrylian
Copy link
Member

Seems we sadly can reproduce this. We'll look into it as soon as we can.

@kuz-z-zma
Copy link
Author

At least there is a solution to tide us over: create folders, upload files - and refresh database

@acrylian acrylian added the bug label Dec 1, 2023
@kuz-z-zma
Copy link
Author

I've tried to go back to version I've downloaded on 25/11 - no issues with saving data for the new albums, so changes introduced between 25/11 and 28/11 are the probable cause for this bug

@acrylian
Copy link
Member

I have sadly not been able to investigate this further time wise but hope to do soon. Between 25. annd the 28 there have been no changes in this areas. On 21.11. we had a fix for broken webpath constant definitions in some ocasions. Perhaps this interferes here. unexpectedly… I will hopefully soon know more.

@kuz-z-zma
Copy link
Author

Tested further, data for top level albums is saved in 25/11 version, but data for subalbums is not saved as in later versions sadly.

@acrylian
Copy link
Member

I did investigate and although I have not fixed it yet I think I know where the issue happens. Then it would indeed be an unwanted side effect on a (side) change related to all the inheritance fixes. More tomorrow.

acrylian added a commit that referenced this issue Dec 15, 2023
@acrylian acrylian added the Fixed label Dec 15, 2023
@acrylian
Copy link
Member

Fix is up. please confirm.

@kuz-z-zma
Copy link
Author

Yes, data for subalbums is saved now!

@acrylian
Copy link
Member

Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants