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

Update 1.8.2 -> 1.9.1: old file attachments missing #22

Open
chaotix- opened this issue Jun 21, 2023 · 2 comments
Open

Update 1.8.2 -> 1.9.1: old file attachments missing #22

chaotix- opened this issue Jun 21, 2023 · 2 comments

Comments

@chaotix-
Copy link

After updating to 1.9.1 my oldest file attachments where gone. The attachments itself are still there but there is no reference to the files anymore.

I checked the MySQL database and it seems it might be an older bug that just now causes problems. All the affected file attachments where older than 2017-09-24 and did not have the backref column set in utils_filestorage.

Looking at modules/Utils/Attachment/patches/20171024_use_generic_file_field.php shows the problem: Only attachments with backref set are converted in the patch.

The following SQL statement before redoing the update fixed the problem:

UPDATE utils_filestorage, utils_attachment_file SET backref = CONCAT('rb:utils_attachment/', attach_id) WHERE utils_attachment_file.id = SUBSTR(link,17) AND backref IS NULL;
@chaotix-
Copy link
Author

I just noticed that the files are there after the SQL statement, but file metadata is missing (who it was uploaded by and the number of downloads). The date of upload is still correct. Strange...

Repository owner deleted a comment from SuryaSg Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@chaotix- and others