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

Rename incorrectly cased files on updates or when fixing database #32006

Merged

Conversation

richard67
Copy link
Member

@richard67 richard67 commented Jan 11, 2021

Pull Request for Issues #23725 and #30736 .

Replaces Pull Request #30802 .

Summary of Changes

This pull request (PR) attempts to implement case sensitive file rename and rename some incorrectly cased files.

It is based on PR #30802 plus my corrections for OSX.

Thanks to @SharkyKZ for the original PR #30802.

Testing Instructions

Testers please report back which server operating system (Linux, Windows, OSX) you have used for your test. If you have several available, test with all of them.

Install Joomla! <= 3.9.23 => check the following files:

$files = array(
'libraries/src/Filesystem/Support/Stringcontroller.php' => 'libraries/src/Filesystem/Support/StringController.php',
'libraries/vendor/paragonie/sodium_compat/src/Core/Xsalsa20.php' => 'libraries/vendor/paragonie/sodium_compat/src/Core/XSalsa20.php',
'media/mod_languages/images/si_LK.gif' => 'media/mod_languages/images/si_lk.gif',
);

Use the update package built by drone for this PR for Update

Now check the file list again => files should in all three test cases have the correct name.

Actual result BEFORE applying this Pull Request

Incorrectly cased files present.

Expected result AFTER applying this Pull Request

No incorrectly files after update or database fix or new installation.

Documentation Changes Required

None.

@richard67
Copy link
Member Author

@bembelimen @chmst @softforge @wilsonge Please test.

@jsubri
Copy link
Contributor

jsubri commented Jan 11, 2021

I have tested this item ✅ successfully on 4d0ca0f

I restored a 3.9.23 site that was upgraded over the years. Upload & Update "Joomla_3.9.24-dev+pr.32006-Development-Update_Package.zip" via Joomla Update.
Before: Stringcontroller.php after: StringController.php
Before: Xsalsa20.php after: XSalsa20.php
Before: no si_LK.gif file (the file might have been forgoten in some 3.x upgrade packages), after: si_lk.gif is present

Windows 10, PHP 8.0


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32006.

@PhilETaylor

This comment was marked as abuse.

@richard67
Copy link
Member Author

The "Fix Database" button really needs to be renamed to "Fix everything" and possibly relocated somewhere else, as it now does a lot more than just apply any pending database schema changes which was its original aim.

Sure, but that's outside the scope of this PR.

@brianteeman
Copy link
Contributor

Using the "Fix database" button for this is fundamentally wrong.

Joomla 4 has already changed its name to Database: update structure to try to make it clearer that it only touches database structure changes and not any content changes.

Adding a fix files functionality to this button is a step backwards not forwards.

@richard67
Copy link
Member Author

richard67 commented Jan 12, 2021

Joomla 4 has already changed its name to Database: update structure to try to make it clearer that it only touches database structure changes and not any content changes.

And that was wrong because currently it still does other stuff, too.

Adding a fix files functionality to this button is a step backwards not forwards.

Yes, but it wasn't in the scope of the original PR #30802 either to fix that all.

@wilsonge
Copy link
Contributor

wilsonge commented Jan 24, 2021

I have tested this item ✅ successfully on 4d0ca0f

Works on OSX for me PHP 7.3


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32006.

@richard67
Copy link
Member Author

Would be nice to get a test on Linux, too.

@HLeithner
Copy link
Member

Tested on Linux works as expected.

@ghost
Copy link

ghost commented Jan 25, 2021

RTC?

@richard67
Copy link
Member Author

@Gostn Please stop to tell us maintainers and JBS members what we shall do. We know it by ourselves.

@richard67
Copy link
Member Author

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32006.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Jan 25, 2021
@richard67 richard67 added this to the Joomla! 3.9.25 milestone Jan 25, 2021
@ghost
Copy link

ghost commented Jan 25, 2021

Please stop your personal attacks. I was asking (!) for RTC cause sometimes it is forgotton.

@richard67
Copy link
Member Author

@Gostn If you see a personal attack (I don't see some) feel free to contact conflict resolution team and report a CoC violation.

@ghost
Copy link

ghost commented Jan 25, 2021

Please stop to tell us maintainers and JBS members what we shall do. We know it by ourselves.

Please stop to tell us volunteers what we shall do. We know it by ourselves.

@rdeutz rdeutz merged commit 648f2f8 into joomla:staging Jan 25, 2021
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Jan 25, 2021
@richard67 richard67 deleted the staging-sharkykz-fix-file-casing-mod-2 branch January 25, 2021 10:13
This was referenced Jan 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants