Postponed
Project:
Diff
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Sep 2023 at 02:35 UTC
Updated:
2 Sep 2024 at 08:55 UTC
Jump to comment: Most recent
An error has started popping up more and more on our project where old revisions containing \r\n line endings are resulting in errors when compared with new revisions that only contain \n
The error is Uncaught PHP Exception InvalidArgumentException: "Invalid $mode 3 specified" and results in a 503.
I've only seen this happen with really old revisions, now \r seems to get auto stripped from WYSIWYG content.
?
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
mstrelan commentedThis is introduced since DiffEngine is deprecated and replaced with sebastianbergmann/diff. Specifically the issue is that
\Drupal\Component\Diff\DiffOpOutputBuilder::hunkOpdoes not handle\SebastianBergmann\Diff\Differ::DIFF_LINE_END_WARNING.Comment #4
mstrelan commentedOpened #3389715: Diffs with different line endings leads to Invalid $mode 3 specified. Postponing on that issue in case there's further work to be done here.
Comment #5
micahw156Confirming the patch for #3389715 resolved my use case for diff module errors.
Comment #6
stolzenhain commentedThanks for this issue and the linking of #3389715 – patch works fine.