sachatrauwaen / OpenContent

Structured Content editing for DNN (Dotnetnuke)
46 stars 25 forks source link

Features Break If DNN's Client Resource Management Is Turned On #146

Closed skrantzman closed 3 years ago

skrantzman commented 3 years ago

Issue description

Certain OpenContent features break if Enable Composite Files, Minify CSS, and Minify JS are turned on in DNN's Client Resource Management. When Minify JS is enabled features of the Edit Template Files popup break. Code is no longer color coded, line numbers disappears and the Variables, Snippets, and Helpers shortcuts no longer work. When Composite Files and Minify JS are both enabled, the OC stylesheet template rules are not applied to the module.

Steps to reproduce the issue

  1. launch a clean install or existing version of DNN 9.8 or 9.8.1 (not sure about previous versions of DNN as I only tested with these two.)
  2. Install OC version 4.5.0
  3. Add an OC module to a page and configure it for a template (I was using a BS Accordion template, but any should do.)
  4. Go to Edit Template Files to launch the template editor popup. Everything should work correctly.
  5. In DNN go to Settings > Server > Server Settings > Performance, and enable Composite Files, Minify CSS, and Minify JS.
  6. Go back to the OC module and relaunch the template editor popup.
  7. Color coding, line number and the Variables, Snippets, and Helpers shortcuts no longer work as expected.
  8. Switch the selected file in the template editor to stylesheet.
  9. Add some CSS rules e.g. change the background-color of the accordion title. and save changes.
  10. View the module and you see the CSS rules from the stylesheet are not applied.
  11. Back in the Performance window, disable Composite Files, Minify CSS, and Minify JS, save changes and then click on Increment Version.
  12. The OC module now works correctly as expected.

What's the expected result?

I expect the OC module to work the same way after turning on DNN's Client Recourse Management features, as it does before turning them on.

What's the actual result?

Different OC features break based on which features in DNN's Client Recourse Management are turned on.

Additional details / screenshot

Before Turning On DNN's Client Recourse Management features.

After Turning On DNN's Client Recourse Management features.

cklenk commented 3 years ago

We get random issues too on dnn 9.8.1 using open content 4.5. We will randomly get alpacaEngine is not defined and we can't edit the content. We have dnn CRM turned on too. But it will start to work again after awhile. image image

sachatrauwaen commented 3 years ago

I have made a lot of test in the past. It works some times and later not more. I have made some changes in opencontent to auto increment clientdependecy version number when css or js files are edited from OC edit templates files. This make it better. But sometimes i have also issues. It is a dnn related issue.

cklenk commented 2 years ago

Have you noticed issues with 4.7 running on dnn 9.10.2?

sachatrauwaen commented 2 years ago

@cklenk About what exactelly ? DNN's Client Resource Management ?

cklenk commented 2 years ago

@sachatrauwaen yes correct. Does it seem to be improved to you? I tested OC 4.7 on 9.10.2 and it seems to be working when Client Resource Management is turned on. I can edit content and I have pop-ups turned on in DNN too.

sachatrauwaen commented 2 years ago

This issue is not releated to opencontent. So, maybe there are improvenets in latest DNN version.