No Code Attached Yet bug
avatar Scrabble96
Scrabble96
14 Apr 2023

Steps to reproduce the issue

Firstly, it's great to see that there are now line numbers for both original and override files, but copy-and-paste doesn't work as expected.

Expected result

Copy text from more than one line in the original to copy back into the override will copy just the code from the original file.

Actual result

Highlight several lines and it copies the lines in both the original AND the override file and pastes both. See example from /html/com_users/registration/default.php override. The top part has been pasted and I have re-highlighted the copied text:

image

The only way to avoid this is to copy and paste one line at a time, which is a pain if there is a block of, say, eight lines.

System information (as much as possible)

Additional comments

avatar Scrabble96 Scrabble96 - open - 14 Apr 2023
avatar joomla-cms-bot joomla-cms-bot - change - 14 Apr 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 14 Apr 2023
avatar richard67 richard67 - change - 14 Apr 2023
Labels Added: bug
avatar richard67 richard67 - labeled - 14 Apr 2023
avatar brianteeman
brianteeman - comment - 16 Apr 2023

I can replicate this when there are multiple changed lines.

@jfcherng is this a known issue or did I miss a config setting?

avatar jfcherng
jfcherng - comment - 16 Apr 2023

If this is believed to be an issue of php-diff, can we simplify this to

$old = ???
$new = ???
$differOptions = ???
$rendererOptions = ???

Screenshot of actual result

...

Expected result

...

Since I don't use Joomla! and obviously I won't install/configure it for testing this.

avatar richard67 richard67 - change - 16 Apr 2023
Status New Confirmed
avatar jfcherng
jfcherng - comment - 16 Apr 2023

Oh wait. This is not related to "diff" itself. But more like a CSS or layout issue?

avatar brianteeman
brianteeman - comment - 16 Apr 2023

Just checked the upstream demo and its the same as here. Basically with the current code the side by side view will always work this way as the markup is horizontal and not vertical (see screenshot for a better explanation)

image

@Scrabble96 if you go to to the template manager options you can change from side by side to inline for the display of the php-diff. Thats all I can suggest for now

avatar Scrabble96
Scrabble96 - comment - 18 Apr 2023

@Scrabble96 if you go to to the template manager options you can change from side by side to inline for the display of the php-diff. Thats all I can suggest for now

Thanks. That works perfectly and makes much more sense - to me, at least. Perhaps that should be the default layout?

avatar brianteeman
brianteeman - comment - 18 Apr 2023

For everyone that prefers an inline diff there will be others that prefer side by side

avatar brianteeman
brianteeman - comment - 21 Jan 2024

Nothing to do here

avatar Quy Quy - change - 18 Feb 2024
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2024-02-18 18:50:11
Closed_By Quy
avatar Quy Quy - close - 18 Feb 2024

Add a Comment

Login with GitHub to post a comment