soflyy / oxygen-bugs-and-features

Bug Reports & Feature Requests for Oxygen
https://oxygenbuilder.com/
314 stars 29 forks source link

[2.1] Adding any Wordpress widget then opening a stylesheet causes the editor to crash #83

Closed benhohner closed 3 years ago

benhohner commented 5 years ago

Describe the bug Adding any WordPress Widget to the builder then opening a Stylesheet from the Manage -> Stylesheets menu causes the stylesheet to not render properly (CodeMirror throws the following error)

angular.js?ver=1.4.2:11500 TypeError: window.CodeMirror.fromTextArea is not a function
    at newCodemirrorEditor (http://kind-vicuna.w6.wpsandbox.pro/wp-content/plugins/oxygen/component-framework/vendor/ui-codemirror/ui-codemirror.js?ver=5.0.3:71:38)
    at postLink (http://kind-vicuna.w6.wpsandbox.pro/wp-content/plugins/oxygen/component-framework/vendor/ui-codemirror/ui-codemirror.js?ver=5.0.3:38:22)
    at invokeLinkFn (http://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.js?ver=1.4.2:8141:9)
    at nodeLinkFn (http://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.js?ver=1.4.2:7653:11)
    at compositeLinkFn (http://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.js?ver=1.4.2:7009:13)
    at compositeLinkFn (http://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.js?ver=1.4.2:7012:13)
    at compositeLinkFn (http://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.js?ver=1.4.2:7012:13)
    at publicLinkFn (http://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.js?ver=1.4.2:6888:30)
    at boundTranscludeFn (http://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.js?ver=1.4.2:7027:16)
    at controllersBoundTransclude (http://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.js?ver=1.4.2:7680:18) <textarea ui-codemirror="{
      lineNumbers: true,
      newlineAndIndent: false,
      mode: 'css',
      type: 'stylesheet',
      onLoad : codemirrorLoaded
    }" ng-model="iframeScope.stylesheetToEdit['css']" class="ng-pristine ng-untouched ng-valid">
(anonymous) @ angular.js?ver=1.4.2:11500
(anonymous) @ angular.js?ver=1.4.2:8479
invokeLinkFn @ angular.js?ver=1.4.2:8143
nodeLinkFn @ angular.js?ver=1.4.2:7653
compositeLinkFn @ angular.js?ver=1.4.2:7009
compositeLinkFn @ angular.js?ver=1.4.2:7012
compositeLinkFn @ angular.js?ver=1.4.2:7012
publicLinkFn @ angular.js?ver=1.4.2:6888
boundTranscludeFn @ angular.js?ver=1.4.2:7027
controllersBoundTransclude @ angular.js?ver=1.4.2:7680
ngIfWatchAction @ angular.js?ver=1.4.2:23335
$digest @ angular.js?ver=1.4.2:14133
$apply @ angular.js?ver=1.4.2:14395
(anonymous) @ angular.js?ver=1.4.2:22827
dispatch @ jquery.js?ver=1.12.4:3
r.handle @ jquery.js?ver=1.12.4:3

Have you tried all the steps at https://oxygenbuilder.com/documentation/troubleshooting/troubleshooting-guide/? Yes

Are you able to replicate the issue on a Sandbox install at https://oxygenbuilder.com/try? Login: http://kind-vicuna.w6.wpsandbox.pro?upass=e5a5C4WnA4Ys http://kind-vicuna.w6.wpsandbox.pro/?page_id=9&ct_builder=true&ct_inner=true (note after page reload CSS editor works temporarily, but if you click onto any wordpress widget, it breaks again)

To Reproduce

  1. Go to the builder for any page
  2. Create a Stylesheet in Manage -> Stylesheets
  3. put some content in it
  4. Add any WordPress Widget
  5. Click into the WordPress Widget
  6. Go Back to the Stylesheet
  7. Error will be thrown in the console and the CSS will not display with the proper editor.

Expected behavior The Stylesheet CSS editor should load as normal

What actually happens An error is thrown in the console and the editor doesn't display properly.

Screenshots Editor not working 2019-02-15 19_35_19-nvidia geforce overlay

Desktop (please complete the following information):

twistedpixel commented 4 years ago

This is still present and is also happening in the custom CSS tab of elements.

KittenCodes commented 3 years ago

Fixed in v3.8 Beta 1.