Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
When comparing two revisions, my organization is having an issue where large pages show red for all content (in both revisions). After testing, we've determined it only happens on large pages. Has anyone else experienced this?
Thanks for any help!
Comment | File | Size | Author |
---|---|---|---|
#4 | diff-introduce-line-breaks-to-maximise-chances-of-accurate-diff-comparison-1828346-4.patch | 1.11 KB | Alan D. |
Comments
Comment #1
kscheirerCould you post steps to reproduce this bug? I'd be happy to try it out and see if we can get in a fix.
Comment #2
Alan D. CreditAttribution: Alan D. commentedI have noticed this on large HTML pages where WYSIWYG editor strips out the white space and new lines. I am guessing that enforcing a line break after a closing block group would probably resolve this.
Something like:
This is just to visualize the concept.
Comment #3
jc174 CreditAttribution: jc174 commentedI used the page below to test. Each numbered line with the character "a" represents 10 characters of code. The issue occurs around the 10,000 character mark, give or take. We are using WYSIWIG along with CKEditor.
http://researchadmin2.asu.edu/jtest2
Comment #4
Alan D. CreditAttribution: Alan D. commentedDoes CKEditor WYSIWIG settings have some sort of format HTML option? The raw output from that page represents just two lines of text.
For TinyMCE I get:
[*] Remove linebreaks
If enabled, the editor will remove most linebreaks from contents. Disabling this option could avoid conflicts with other input filters.
[ ] Apply source formatting
If enabled, the editor will re-format the HTML source code. Disabling this option could avoid conflicts with other input filters.
Unchecking "Remove linebreaks" will probably be enough (double check that you do not have the newline to br filter enabled)
If you still have issues, try checking "Apply source formatting".
For diff 3.x, the following patch introduces an unconditional additional filter that would also help. This was only for testing and fixed the diff on a 100 paragraph Lorem ipsum comparison. I will need to decide on how to integrate this, possibly as a configurable diff_comparison_compare callback or something...
Comment #5
jc174 CreditAttribution: jc174 commentedThanks Alan, I'll try that! As a temporary solution, I had changed the limits in DiffEngine.php from 10k to 100k.
Comment #6
jc174 CreditAttribution: jc174 commentedI looked into it and the "Remove linebreaks" option was unchecked, so that doesn't do it. Good idea though.
Comment #7
pgillis CreditAttribution: pgillis commentedI've tried changing DiffEngine.php limits and it didn't help for me in D6.
Comment #8
Alan D. CreditAttribution: Alan D. commentedDid anyone find a good solution for this?
Comment #9
prabha.venkatesan CreditAttribution: prabha.venkatesan commentedHi, I am facing the same issue for the diff module in Drupal 7, and i tried the solution given by alan-d, but unfortunately it doesn't help me. Does anyone get this fixed? Any help would be appreciated. Thanks in advance.