joomla-cms icon indicating copy to clipboard operation
joomla-cms copied to clipboard

[5.1] Fix content history diff error

Open C-Lodder opened this issue 1 year ago • 8 comments

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

  1. Ensure "Versions" is enabled
  2. Create an article with some dummy content and save it
  3. Add or remove some content to the same article as save it
  4. Compare the two versions of the article

Actual result BEFORE applying this Pull Request

Uncaught TypeError: window.Diff is undefined

before

Expected result AFTER applying this Pull Request

The diff is displayed, showing green/red blocks

after

Note

I'm aware the diff fails a11y standards for dark mode, but this should be fixed in a separate PR

C-Lodder avatar Feb 04 '24 11:02 C-Lodder

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.

Quy avatar Feb 04 '24 17:02 Quy

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.

alikon avatar Feb 04 '24 18:02 alikon

RTC


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

alikon avatar Feb 04 '24 18:02 alikon

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.

crimle avatar Feb 24 '24 13:02 crimle

"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."

Nuyonuyonoina avatar Feb 24 '24 14:02 Nuyonuyonoina

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 () at HTMLDocument.c (admin-compare-compare.min.js?907a40:4:554)


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

eddiekonczal avatar Feb 24 '24 16:02 eddiekonczal

@eddiekonczal FYII: PRs with NPM Resource Changed label cannot be tested with PatchTester.

Quy avatar Feb 24 '24 16:02 Quy

@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.

richard67 avatar Feb 25 '24 11:02 richard67

Thx

bembelimen avatar Feb 25 '24 22:02 bembelimen