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

[Image save] Change files in filesystem before store to DB #343

Merged

Conversation

Elfangor93
Copy link
Member

@Elfangor93 Elfangor93 commented Jan 14, 2025

This PR applies one possible solution to solve the issue reported in #341.

All changes in the file and folders are processed before the item gets stored to the database. If an error appears while changing things in the filesystem, the item will not be stored and the save process is cancelled.

How to test this PR

Create, Edit, Delete, Move, Rename Images and Categories.
Everything should work as before.
Optional: Check that Database and Folderstructure are consistent.

If a file system problem occurs when moving or renaming a category, the file system may be inconsistent with the database. A proper error message should help fixing the filesystem if needed.
@Elfangor93 Elfangor93 added needs testing This issue or pull request needs further testing GUI testing Tests can be perfomed using the GUI labels Jan 16, 2025
@MrMusic
Copy link
Member

MrMusic commented Jan 18, 2025

I noticed the following problem during testing: Moving images to another category is not possible if no original image file is available.

  1. switching off creating 'original' images in the JG configuration
  2. uploading images
  3. attempts to move an image to another category
  4. error message: “Save failed with the following error: ”
  5. But detail image and thumbnail have been moved to the other folder

The filemanager has not taken into account when an imagetype was deactivated in the configs.
@MrMusic
Copy link
Member

MrMusic commented Jan 20, 2025

Unable to change an image alias.
If you try to change the alias of a saved image, the following error message appears:
Save failed with the following error:
For categories, the alias can be changed without any problems.

@Elfangor93
Copy link
Member Author

Unable to change an image alias.

I can not reproduce this issue. Changing the alias is perfectly possible.

@MrMusic
Copy link
Member

MrMusic commented Jan 21, 2025

I can not reproduce this issue. Changing the alias is perfectly possible.

It depends on what is set in the JoomGallery configuration for use 'Original filename'.

  1. Set 'Original filename' to Yes in the JG configuration
  2. Uploading images
  3. Attempts to change an image alias
    Error message: "Save failed with the following error: "
    ->New alias cannot be saved

@Elfangor93
Copy link
Member Author

Unable to change an image alias.

@MrMusic Is fixed now.

@MrMusic
Copy link
Member

MrMusic commented Jan 25, 2025

@MrMusic Is fixed now.

Thanks.

I have tested this PR ✅ successfully.
Thank you very much!

@Elfangor93 Elfangor93 merged commit 48fdd83 into JoomGalleryfriends:main Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI testing Tests can be perfomed using the GUI needs testing This issue or pull request needs further testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants