Developer forum

Forum » Swift » Swift 2 - Poster - Visual Editor breaks when disabling second button

Swift 2 - Poster - Visual Editor breaks when disabling second button

Rene Poulsen
Rene Poulsen
Reply

Hi,

Anyone experiencing this behaviour? I've just installed a a Swift 2 locally for testing purposes. In the poster the visual editor breaks (se attached video) when disabling second button. I can go to list view and enable the button again - and the VE works again.

In the console I get this error:

Navigator.ts:52  GET https://localhost:57507/Default.aspx?ID=6869&visualedit=true net::ERR_CONTENT_DECODING_FAILED 200 (OK)

I haven't changed anything in any templates, so it's not an error on my side ;-)


Replies

 
Rene Poulsen
Rene Poulsen
Reply

Same thing actually happens when enabling / disabling other fields in other paragraphs as well. Is this a known issue?

We're considering building a site on the Swift 2, but if the VE breaks like this in a lot of scenarios I just dont think we're there yet.

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Rene

I cannot reproduce this issue - I can do what you do using an installation out of the cloud.

That error — ERR_CONTENT_DECODING_FAILED 200 (OK) — is usually a sign that the browser received a compressed response (gzip, deflate, etc.) but the content wasn’t actually compressed, or vice versa. In other words, the headers and the actual data don’t match.

Since this is happening in Visual Editor mode in your local Swift 2 setup, here are the most likely culprits:

IIS / Kestrel compression mismatch

If your local environment (Kestrel or IIS Express) is configured to use compression, and the Visual Editor request (Default.aspx?visualedit=true) somehow double-compresses or misreports compression, Chrome will throw that decoding error.
Fix:
Try disabling response compression in appsettings.json or IIS for localhost to test:

"ResponseCompression": { "EnableForHttps": false } 

Or temporarily disable it from IIS Express settings.

Middleware interference

If there’s a reverse proxy (like IIS Express → .NET app) and both layers try to apply gzip compression, you get the mismatch. Sometimes UseResponseCompression() in .NET combined with IIS compression causes this.

 
Rene Poulsen
Rene Poulsen
Reply

Ok. Maybe it's just locally then. But I can't seem to get it to work. Added the responsecompression part to the appsettings.development.json - didn't help.

I also tried creating a applicationhost.config in .vs/config/ disabling compression. Didn't help either. Would be nice to be able do work on a solution locally, but if it's only locally it's not that critical.

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hou should be able to - we can. Sounds like some odd locally, and it looks like double compression of some sort.

In your dw settings, web & http, try disabling compression.

 

You must be logged in to post in the forum