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!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kscheirer’s picture

Could you post steps to reproduce this bug? I'd be happy to try it out and see if we can get in a fix.

Alan D.’s picture

I 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:

  $block = '(?:table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|p|h[1-6]|hr)';
$string = preg_replace('!(</' . $block . '>)!', "$1\n", $string);

This is just to visualize the concept.

jc174’s picture

I 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

Alan D.’s picture

Version: 6.x-2.3 » 7.x-3.x-dev
Status: Active » Needs work
FileSize
1.11 KB

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

jc174’s picture

Thanks Alan, I'll try that! As a temporary solution, I had changed the limits in DiffEngine.php from 10k to 100k.

jc174’s picture

I looked into it and the "Remove linebreaks" option was unchecked, so that doesn't do it. Good idea though.

pgillis’s picture

I've tried changing DiffEngine.php limits and it didn't help for me in D6.

Alan D.’s picture

Did anyone find a good solution for this?

prabha.venkatesan’s picture

Issue summary: View changes

Hi, 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.