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

Studio doesn't ingest correctly a rename from lowercase to uppercase done directly in Git #6691

Closed
4 of 5 tasks
avasquez614 opened this issue Apr 17, 2024 · 3 comments
Closed
4 of 5 tasks

Comments

@avasquez614
Copy link
Member

avasquez614 commented Apr 17, 2024

Duplicates

  • I have searched the existing issues

Latest version

  • The issue is in the develop branch
  • The issue is in the latest released 4.1.x
  • The issue is in the latest released 4.0.x
  • The issue is in the latest released 3.1.x

Describe the issue

If you rename an asset indirectly in the Git repo from an all lowercase to all uppercase, Studio doesn't correctly ingest the change and removes the original asset but doesn't add the new asset.

CI: 4959

Steps to reproduce

Steps:

  1. Create a site based in Editorial
  2. Update the Project Policy to not transform all filenames to lowercase
  3. Upload an image in all lowercase under /static-asset/images (e.g. mountains.jpg).
  4. Using the CLI, rename the image to all uppercase (e.g. mv mountains.jpg to MOUNTAINS.jpg)
  5. Commit the change

If you go to the sidebar, you'll see that the image dissapeared from the sidebar.

Relevant log output

No response

Screenshots and/or videos

No response

@jmendeza
Copy link
Member

A rename is read from git as a CREATE and a DELETE in a different path. So Studio creates an item in MOUNTAINS and deletes the one in mountains.
Problem is that by default, MariaDB is case-insensitive. So both (upper case and lower case) version of the name are the same path for the database.

The opposite (upper case to lower case) seems to work because of getting the operations in reverse order (delete then create).
One possible solution would be to process all deletes first.

@jmendeza
Copy link
Member

Updated so delete operations are ingested first when sync'ing from repo

@Euquimides
Copy link

Hi! Update and rechecked this issue. Fix verified for Crafter v4.1.5 and v4.2.0. Thank you! Closing this ticket.

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

No branches or pull requests

4 participants