joomla-cms
joomla-cms copied to clipboard
[5.1] Fix content history diff error
Summary of Changes
This PR fixes a JS error when trying to view the "diff" between content versions, due the dependency not being called.
Testing Instructions
- Ensure "Versions" is enabled
- Create an article with some dummy content and save it
- Add or remove some content to the same article as save it
- Compare the two versions of the article
Actual result BEFORE applying this Pull Request
Uncaught TypeError: window.Diff is undefined
Expected result AFTER applying this Pull Request
The diff is displayed, showing green/red blocks
Note
I'm aware the diff fails a11y standards for dark mode, but this should be fixed in a separate PR
I have tested this item :white_check_mark: successfully on 9025a911eec6beea38f69ddd2724f65b15ed47f2
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42755.
I have tested this item :white_check_mark: successfully on 9025a911eec6beea38f69ddd2724f65b15ed47f2
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42755.
RTC
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42755.
I have tested this item :red_circle: unsuccessfully on 1eb9c687968ffba8d73d3dfb2439b96ce46168a6
Pressing [Apply Patch] results in error message:
«There are no files to patch from this pull request. This may mean that the files in the pull request are not present in your installation.»
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42755.
"Apply patch" button doesn't work. Error message is "There are no files to patch from this pull request. This may mean that the files in the pull request are not present in your installation."
I have tested this item :red_circle: unsuccessfully on 1eb9c687968ffba8d73d3dfb2439b96ce46168a6
Cannot apply patch.
Also, actual error is:
Uncaught TypeError: Cannot read properties of undefined (reading 'diffWords')
at l (admin-compare-compare.min.js?907a40:4:169)
at admin-compare-compare.min.js?907a40:4:566
at Array.forEach (
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42755.
@eddiekonczal FYII: PRs with NPM Resource Changed label cannot be tested with PatchTester.
@crimle @Nuyonuyonoina @eddiekonczal I will reset the negative test results as they are not caused by this PR. The PR modifies an NPM dependency, which can be seen by the label "NPM Resource Changed". Such PRs can't be tested with Patchtester, they require either a development environment with composer and NPM, or they need to be applied by using the packages created by drone, which can be found in the "Downloads" section of the integration checks at the bottom of the PR.
Thx