Edit+ Preview mode with Show Differences Enabled Timeout Problem


(Douglas (@finnatic at @waikato)) #1

Matrix Version: 5.4.5.1

We have a collection of pages with a rather complicate design / paint layout setup, where the Edit+ preview mode with Show Differences has started to error - displaying the spinning squiz logo but never eventuating a page before timeout occurs.

This is with the _edit#mode=preview&show_diff=1 url suffixes.

Anything in particular we should go looking for in trying to fix this ourselves?


(John gill) #2

How long does it take to render the page normally? If it’s approaching half the timeout limit (30s default?) then “showdiff” will probably timeout since it has to render both versions.


(Bart Banda) #3

Yea, how much HTML is there on the page for the server to run a diff over? Is there an example of this page online?

There’d definitely be a limit to how much HTML the diff tool can handle with a single web request, but you may also be able to bump the web memory limits to increase the timeout threshold a bit.


(Douglas (@finnatic at @waikato)) #4

/_performance suggests a total time of ~1-6s across a sample using an uncached address in some quick tests this morning

Any of our qualification pages (waikato.ac.nz/study/qualifications/) e.g. waikato.ac.nz/study/qualifications/bachelor-of-teaching/ - the error may be a few months old or a more recent change to the layout may be implicated.

Eventual error on the Edit+ preview with show differences on (show_diff=1) is:

“Warning
It appears the last GET or POST request to the server from EES may have timed out. This is usually caused by network communication issues. If you continue to see this message please contact your support desk to investigate.”


(Bart Banda) #5

Yea that looks like a HTML heavy page. The diff tool probably times out, or can;t run fast enough to be under the web memory threshold.


(Douglas (@finnatic at @waikato)) #6

Is there a way to check and confirm if it’s the former (time out) instead of the latter - I’ve increased the web memory on our clone test system with no change in behaviour but could increase it beyond 512…


(John gill) #7

You’ll have to check the Console & Network panel in your browser dev tools.

It’s definitely possible to see the Edit+ “timeout” message for reasons other than an actual timeout. There are cases[1] where a JavaScript error during submission will result in the timeout message after 30s even though there was no timeout (and no request at all).

[1] If you have a WYSIWYG bodycopy with content in it that prevents the WYSIWYG from being rendered and try to save the page in Edit+ you should see this.


#8

Have a look at the generated source on your page (http://www.waikato.ac.nz/study/qualifications/bachelor-of-teaching/) you have some serious issues including HTML tages converted to entities on lines 457 & 472 to 518. Looks like someone has copy & pasted an HTML snippet into WYSIWYG container.Same problem in your META description and qualification.Description content. You also got some extra td & tr closing tags (lines 700 & 701).

I had a load time 6+ seconds on that page, but the HTML errors themselves can have massive impact on it because the browser struggles to make sense on the markup. I wouldn’t be least surprised that when you correct those HTML errors on these pages, EE will be able to show you live preview.


(Douglas (@finnatic at @waikato)) #9

Thanks for that input Petri -

[quote=“piivonen, post:8, topic:10613”]
Have a look at the generated source on your page (http://www.waikato.ac.nz/study/qualifications/bachelor-of-teaching/) you have some serious issues including HTML tages converted to entities on lines 457 & 472 to 518.[/quote]

The latter was Matrix being overly helpful and escaping the html internally stored in an attribute. Having the pages validate 100% has been down our list of tasks.

We will try and resolve the issues we can and see if that assists.


(Douglas (@finnatic at @waikato)) #10

This problem is still occurring for us with some pages (and with only three minor validation warnings), and having to approve changes for one of the afflicted has me looking at this again.

I’ve resorted to having one chrome window logged in, and an incognito window not logged in. Both can access the page fine, the page generates fine for both versions (edited, original), and I can save their HTML out and do a diff (using kdiff) to see the differences.

But _nocache?SQ_ACTION=diff times out after six minutes.

Is there anything further I can do short of a squizmap or support request (which I could see leading to a squizmap…)?


(Bart Banda) #11

Could you possibly split the content up into separate containers and use https://matrix.squiz.net/manuals/designs/chapters/using-alternate-designs#Viewing-an-Asset-Without-a-Design-Applied to preview the page with only one or 2 containers in the page that have been changed?

For example:

www.example.com/path-to-asset/_nocache?SQ_ASSET_CONTENTS=123,234&SQACTION=diff

(Douglas (@finnatic at @waikato)) #12

[quote=“Bart, post:11, topic:10613”]
Could you possibly split the content up into separate containers and use https://matrix.squiz.net/manuals/designs/chapters/using-alternate-designs#Viewing-an-Asset-Without-a-Design-Applied to preview the page with only one or 2 containers in the page that have been changed[/quote]

The assets in questions are Folders asset with metadata to store content, with the metadata then output for display via a paint layout with multiple separate containers for each of the page sections. It’s not possible to split the content up on the asset itself.

Trying specific section ids from the paint layout with SQ_ASSET_CONTENTS doesn’t seem to change the display of the contents assets, which gives me the results of the paint layout being applied but sans the design around it?


(Bart Banda) #13

Yes, that’s what the SQ_ASSET_CONTENTS query does by itself. Unfortunately specifying specific content containers to print with the query only works for containers on the asset being viewed (the Standard Page for example), not the PL applied to it.

Can you somehow limit the amount of folders being viewed at any time on the page to perhaps get that to render?