User tests: Successful: Unsuccessful:
Pull Request for Issue #35427 .
This pull request (PR) fixes an SQL error which happens when you have made some template overrides and now a 3rd party extension or core update makes changes on the overridden files so the override checker finds that change, and then you have another update which again changes the same files but no others files and you haven't made any new overrides in the mean time so all the detected override changes just need to be updated in database and no new one has to be inserted in addition.
Thanks to @stAn47 who suggested the fix.
In addition, this PR adds a ParameterType::INTEGER
parameter to the 2nd bind call. This could be tested by code review, or test this PR with MySQLi and MySQL (PDO) and PostgreSQL (PDO). The 2 ID columns of the same table are bound with ParameterType::INTEGER
here https://github.com/joomla/joomla-cms/blob/4.0-dev/plugins/installer/override/override.php#L303-L304 , and the status is given as integer, too.
Have a clean, current 4.0-dev or latest 4.0 nightly or 4.0.4 installation which does not have com_weblinks installed.
Switch error reporting to maximum in global configuration.
Download the Weblinks 4.0.0 RC1 package from here https://github.com/joomla-extensions/weblinks/releases/download/4.0.0-rc1/pkg-weblinks-4.0.0-rc1.zip and install that package.
Create a template override for the "category" folder of com_weblinks.
Download the special Weblinks 4.0.0 RC2 package which I have created for testing this PR from here https://test5.richard-fath.de/pkg-weblinks-4.0.0-rc2_test.zip and update to that package by uploading and installing it with the extensions installer.
Now check for extension updates and update to the (regular, i.e. unmodified) Weblinks 4.0.0 package.
If you can't use the online update you can download the package from here https://github.com/joomla-extensions/weblinks/releases/download/4.0.0/pkg-weblinks-4.0.0.zip and update to that package in the same way as in the previous step.
Result: See section "Actual result BEFORE applying this Pull Request" below.
Uninstall the weblinks package and the weblinks editor button.
Hint: You might see some yellow warning messages about errors e.g. with table not existing, but you can safely ignore that.
Delete all override files and folders so there is no "com_weblinks" folder anymore in the template's "html" folder..
Make sure that no override changes are shown anymore. If necessary, delete all records in table #__template_overrides
in database.
Apply the patch from this PR.
Repeat steps 3 to 7.
Result: No SQL error, see section "Expected result AFTER applying this Pull Request" below.
Verify that your override file still contains your change from step 5.
Verify that the comparison also shows the change in the original file from RC1 to the final package.
No SQL error. Override checker works as it should.
None.
Status | New | ⇒ | Pending |
Category | ⇒ | Front End Plugins |
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-11-02 15:47:38 |
Closed_By | ⇒ | bembelimen | |
Labels |
Added:
?
?
|
Thx
Thanks all
Thank you y'all, and thanks Richard for describing how to reproduce this as this must had been a few hours to get it done.
I have tested this item✅ successfully on fe98aec
Patch works! I bet writing the testing instructions was more work then fixing the bug! Great work!
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35923.