Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tinyMCE WYSIWYG editor not showing, JS error #8228

Open
anishpixel opened this issue Jun 29, 2018 · 53 comments
Open

tinyMCE WYSIWYG editor not showing, JS error #8228

anishpixel opened this issue Jun 29, 2018 · 53 comments

Comments

@anishpixel
Copy link

@anishpixel anishpixel commented Jun 29, 2018

Silverstripe version 4.1.0

Basically just installed SS 4.1 on my local server, everything works fine but the WYSIYWG editor is not showing, and there are a load of errors in the console which I have attached.

screen shot 2018-06-26 at 10 21 23

It is referring to tinyMce and vendor.js with webpack.

I'm using webpack to develop my site but don't think anything it is effecting the CMS.

Has anyone experienced this or know the fix?

@obj63mc

This comment has been minimized.

Copy link
Contributor

@obj63mc obj63mc commented Jun 29, 2018

I am getting this issue as well, logged it here, silverstripe/silverstripe-cms#2177

If you reload a page that has a HTMLEditorField on it, the WYSIWYG seems to load fine then but if you move off to any other section of the CMS and back again you get the same error.

@anishpixel

This comment has been minimized.

Copy link
Author

@anishpixel anishpixel commented Jun 29, 2018

Any possible fixes?

@dhensby

This comment has been minimized.

Copy link
Member

@dhensby dhensby commented Jun 29, 2018

closing as duplicate of silverstripe/silverstripe-cms#2177

@kinglozzer

This comment has been minimized.

Copy link
Member

@kinglozzer kinglozzer commented Aug 9, 2018

Re-opening for people experiencing this issue without S3 installed. If we don’t receive any updates after a little while, let’s close again

@kinglozzer kinglozzer reopened this Aug 9, 2018
@andrewnick

This comment has been minimized.

Copy link

@andrewnick andrewnick commented Aug 9, 2018

I'm also experiencing this issue after an upgrade to SS4 and no silverstripe-S3.

The following is installed.

asyncphp/doorman 3.0.0
composer/ca-bundle 1.1.2
composer/installers v1.5.0
composer/semver 1.4.2
composer/xdebug-handler 1.1.0
cwp/cwp 2.1.0
cwp/cwp-core 2.1.0
cwp/cwp-pdfexport 1.0.1
cwp/cwp-recipe-cms 2.1.0
cwp/cwp-recipe-core 2.1.0
cwp/cwp-recipe-search 2.1.0
cwp/cwp-search 1.0.0
dnadesign/silverstripe-elemental 2.1.0
doctrine/annotations v1.6.0  
doctrine/instantiator 1.1.0  
doctrine/lexer v1.0.1  
embed/embed v3.3.5  
friendsofphp/php-cs-fixer v2.12.2  
gdmedia/ss-auto-git-ignore 1.0.2  
guzzlehttp/psr7 1.4.2  
heyday/silverstripe-menumanager 3.0.3  
intervention/image 2.4.2  
jeremeamia/SuperClosure 2.4.0  
league/csv 8.2.3  
league/flysystem 1.0.45  
m1/env 2.1.2  
marcj/topsort 1.1.0  
monolog/monolog 1.23.0  
myclabs/deep-copy 1.8.1  
nikic/php-parser v3.1.5  
paragonie/random_compat v2.0.17  
php-cs-fixer/diff v1.3.0  
phpdocumentor/reflection-common 1.0.1  
phpdocumentor/reflection-docblock 4.3.0  
phpdocumentor/type-resolver 0.4.0  
phpspec/prophecy 1.8.0
phpunit/php-code-coverage 4.0.8
phpunit/php-file-iterator 1.4.5
phpunit/php-text-template 1.2.1
phpunit/php-timer 1.0.9
phpunit/php-token-stream 2.0.2
phpunit/phpunit 5.7.27
phpunit/phpunit-mock-objects 3.4.4
psr/cache 1.0.1
psr/container 1.0.0
psr/http-message 1.0.1
psr/log 1.0.2
psr/simple-cache 1.0.1
ptcinc/solr-php-client v1.0.0
sebastian/code-unit-reverse-lookup 1.0.
sebastian/comparator 1.2.
sebastian/diff 1.4.
sebastian/environment 2.0.
sebastian/exporter 2.0.
sebastian/global-state 1.1.
sebastian/object-enumerator 2.0.
sebastian/recursion-context 2.0.
sebastian/resource-operations 1.0.
sebastian/version 2.0.
sheadawson/silverstripe-linkable 2.0.
sheadawson/silverstripe-zenvalidator dev-master bcc5eda
silverstripe/admin 1.2.0
silverstripe/asset-admin 1.2.0
silverstripe/assets 1.2.0
silverstripe/auditor 2.1.3
silverstripe/campaign-admin 1.2.0
silverstripe/cms 4.2.0
silverstripe/config 1.0.5
silverstripe/contentreview 4.1.
silverstripe/environmentcheck 2.0.0
silverstripe/errorpage 1.2.0
silverstripe/framework 4.2.0
silverstripe/fulltextsearch 3.3.1
silverstripe/fulltextsearch-localsolr dev-master f2a799e
silverstripe/googlesitemaps 2.1.2
silverstripe/graphql 2.0.0
silverstripe/html5 2.0.1
silverstripe/hybridsessions 2.0.0
silverstripe/mimevalidator 2.0.0
silverstripe/recipe-cms 4.2.0
silverstripe/recipe-collaboration 1.1.0
silverstripe/recipe-core 4.2.0
silverstripe/recipe-form-building 1.1.0
silverstripe/recipe-plugin 1.3.0
silverstripe/redirectedurls 2.0.0
silverstripe/reports 4.2.0
silverstripe/segment-field 2.2.1
silverstripe/sharedraftcontent 2.1.0
silverstripe/siteconfig 4.2.0
silverstripe/spamprotection 3.0.0
silverstripe/taxonomy 2.0.1
silverstripe/userforms 5.2.0
silverstripe/vendor-plugin 1.3.3
silverstripe/versioned 1.2.0
swiftmailer/swiftmailer v5.4.12
symbiote/silverstripe-advancedworkflow 5.0.8
symbiote/silverstripe-gridfieldextensions 3.2.0
symbiote/silverstripe-queuedjobs 4.2.3
symfony/cache v3.4.14
symfony/config v3.4.14
symfony/console v4.1.3
symfony/event-dispatcher v4.1.3
symfony/filesystem v4.1.3
symfony/finder v3.4.14
symfony/options-resolver v4.1.3
symfony/polyfill-apcu v1.9.0
symfony/polyfill-ctype v1.9.0
symfony/polyfill-mbstring v1.9.0
symfony/polyfill-php56 v1.9.0
symfony/polyfill-php70 v1.9.0
symfony/polyfill-php72 v1.9.0
symfony/polyfill-util v1.9.0
symfony/process v3.4.14
symfony/stopwatch v4.1.3
symfony/translation v2.8.44
symfony/yaml v3.4.14
tractorcow/classproxy 0.1.2
tractorcow/silverstripe-proxy-db 0.1.0
unclecheese/display-logic 2.0.1
undefinedoffset/silverstripe-nocaptcha 2.0.0
webmozart/assert 1.3.0
webonyx/graphql-php v0.8.0
@anishpixel

This comment has been minimized.

Copy link
Author

@anishpixel anishpixel commented Aug 14, 2018

Still getting this issue, this is the SS versions im using:

composer/ca-bundle                        1.1.1              Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.
composer/installers                       v1.5.0             A multi-framework Composer library installer
doctrine/instantiator                     1.0.5              A small, lightweight utility to instantiate objects in PHP without invoking their constructors
embed/embed                               v3.3.1             PHP library to retrieve page info using oembed, opengraph, etc
google/recaptcha                          1.1.3              Client library for reCAPTCHA, a free service that protect websites from spam and abuse.
guzzlehttp/psr7                           1.4.2              PSR-7 message implementation that also provides common utility methods
heyday/silverstripe-responsive-images     2.0.0              Configure and send a series of image size options to the client without loading any resources until a media query can be executed.
intervention/image                        2.4.1              Image handling and manipulation library with support for Laravel integration
league/flysystem                          1.0.44             Filesystem abstraction: Many filesystems, one API.
m1/env                                    2.1.0              Env is a lightweight library bringing .env file parser compatibility to PHP. In short - it enables you to read .env files with PHP.
marcj/topsort                             1.1.0              High-Performance TopSort/Dependency resolving algorithm
monolog/monolog                           1.23.0             Sends your logs to files, sockets, inboxes, databases and various web services
myclabs/deep-copy                         1.7.0              Create deep copies (clones) of your objects
nikic/php-parser                          v3.1.5             A PHP parser written in PHP
paragonie/random_compat                   v2.0.12            PHP 5.x polyfill for random_bytes() and random_int() from PHP 7
phpdocumentor/reflection-common           1.0.1              Common reflection classes used by phpdocumentor to reflect the code structure
phpdocumentor/reflection-docblock         3.3.2              With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.
phpdocumentor/type-resolver               0.4.0             
phpspec/prophecy                          1.7.6              Highly opinionated mocking framework for PHP 5.3+
phpunit/php-code-coverage                 4.0.8              Library that provides collection, processing, and rendering functionality for PHP code coverage information.
phpunit/php-file-iterator                 1.4.5              FilterIterator implementation that filters files based on a list of suffixes.
phpunit/php-text-template                 1.2.1              Simple template engine.
phpunit/php-timer                         1.0.9              Utility class for timing
phpunit/php-token-stream                  1.4.12             Wrapper around PHP's tokenizer extension.
phpunit/phpunit                           5.7.27             The PHP Unit Testing framework.
phpunit/phpunit-mock-objects              3.4.4              Mock Object library for PHPUnit
psr/cache                                 1.0.1              Common interface for caching libraries
psr/container                             1.0.0              Common Container Interface (PHP FIG PSR-11)
psr/http-message                          1.0.1              Common interface for HTTP messages
psr/log                                   1.0.2              Common interface for logging libraries
psr/simple-cache                          1.0.1              Common interfaces for simple caching
sebastian/code-unit-reverse-lookup        1.0.1              Looks up which function or method a line of code belongs to
sebastian/comparator                      1.2.4              Provides the functionality to compare PHP values for equality
sebastian/diff                            1.4.3              Diff implementation
sebastian/environment                     2.0.0              Provides functionality to handle HHVM/PHP environments
sebastian/exporter                        2.0.0              Provides the functionality to export PHP variables for visualization
sebastian/global-state                    1.1.1              Snapshotting of global state
sebastian/object-enumerator               2.0.1              Traverses array structures and object graphs to enumerate all referenced objects
sebastian/recursion-context               2.0.0              Provides functionality to recursively process PHP variables
sebastian/resource-operations             1.0.0              Provides a list of PHP built-in functions that operate on resources
sebastian/version                         2.0.1              Library that helps with managing the version number of Git-hosted PHP projects
silverstripe-themes/simple                dev-master 4d546a4 The SilverStripe simple theme (default SilverStripe 3 theme)
silverstripe/admin                        1.1.0              SilverStripe admin interface
silverstripe/asset-admin                  1.1.0              Asset management for the SilverStripe CMS
silverstripe/assets                       1.1.0              SilverStripe Assets component
silverstripe/campaign-admin               1.1.0              SilverStripe campaign admin interface
silverstripe/cms                          4.1.0              The SilverStripe Content Management System
silverstripe/config                       1.0.4              SilverStripe configuration based on YAML and class statics
silverstripe/errorpage                    1.1.0              ErrorPage component for SilverStripe CMS
silverstripe/framework                    4.1.0              The SilverStripe framework
silverstripe/graphql                      1.1.0              GraphQL server for SilverStripe models and other data
silverstripe/recipe-cms                   1.1.0              SilverStripe recipe for fully featured page and asset content editing
silverstripe/recipe-core                  1.1.0              SilverStripe framework-only core recipe
silverstripe/recipe-plugin                1.2.0              Helper plugin to install SilverStripe recipes
silverstripe/redirectedurls               dev-master 042ece4 Provides a system for users to configure arbitrary redirections in the CMS
silverstripe/reports                      4.1.0              Reports module for SilverStripe CMS
silverstripe/siteconfig                   4.1.0              Site wide settings administration.
silverstripe/vendor-plugin                1.3.3              Allows vendor modules to expose directories to the webroot
silverstripe/versioned                    1.1.0              SilverStripe Versioned component
swiftmailer/swiftmailer                   v5.4.9             Swiftmailer, free feature-rich PHP mailer
symbiote/silverstripe-gridfieldextensions 3.1.1              A collection of useful grid field components
symfony/cache                             v3.4.8             Symfony Cache component with PSR-6, PSR-16, and tags
symfony/config                            v3.4.8             Symfony Config Component
symfony/filesystem                        v3.4.8             Symfony Filesystem Component
symfony/finder                            v3.4.8             Symfony Finder Component
symfony/polyfill-apcu                     v1.7.0             Symfony polyfill backporting apcu_* functions to lower PHP versions
symfony/polyfill-mbstring                 v1.7.0             Symfony polyfill for the Mbstring extension
symfony/translation                       v2.8.39            Symfony Translation Component
symfony/yaml                              v3.4.8             Symfony Yaml Component
undefinedoffset/sortablegridfield         2.0.4              Adds drag and drop functionality to SilverStripe 4.x's GridField
webmozart/assert                          1.3.0              Assertions to validate method input/output with nice error messages.
webonyx/graphql-php                       v0.8.0             A PHP port of GraphQL reference implementation
@maxime-rainville

This comment has been minimized.

Copy link
Contributor

@maxime-rainville maxime-rainville commented Aug 24, 2018

@anishpixel @andrewnick

I've dug into this a bit. SilverStripe will generate a tinyMCE config file under assets. The name of the file will very but it will usually look something like this assets/_tinymce/tinymce-cms-02427fcd4f.js.

If the file is not being generated properly, you're likely to see that error. Can you check if the file is being generate in your assets folder and can you check in your browser network monitor to see if the file is being fetched.

Make sure to double check that your webserver's got write access to that folder.

@maxime-rainville

This comment has been minimized.

Copy link
Contributor

@maxime-rainville maxime-rainville commented Aug 24, 2018

@chillu I'm setting the impact as high on this one because it's affecting multiple users in the WYSIWIG with vanilla configuration.

The S3 issue mentioned above is probably related as the TinyMCE config is not being written to the S3 bucket. The fix might be something like being more explicit when the TinyMCE config can not be written, rather than let the WYSIWYG silently fail.

@anishpixel

This comment has been minimized.

Copy link
Author

@anishpixel anishpixel commented Aug 24, 2018

@maxime-rainville I seem to have solved the issue, not sure what the exact reasoning for it was but I was running 4.0 and posted the issue on the silverstripe forum of someone who had the same issue.

Basically just updated from 4.0 to 4.2 and the WYSIWYG started appearing again

@robbieaverill

This comment has been minimized.

Copy link
Member

@robbieaverill robbieaverill commented Aug 24, 2018

Great, I’ll close this then. If anyone experiences this again in 4.2 we can reopen it

@eehondas

This comment has been minimized.

Copy link

@eehondas eehondas commented Aug 29, 2018

Hi Guys,
this is my configuration. I'm on 4.2.1 and it is still happening consistently for me

asyncphp/doorman                          3.0.0             Child process management
axllent/silverstripe-cms-tweaks           2.0.11            Several CMS usability improvements
axllent/silverstripe-form-fields          1.2.5             Custom forms & fields for the SilverStripe framework & CMS
composer/ca-bundle                        1.1.2             Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.
composer/installers                       v1.5.0            A multi-framework Composer library installer
dnadesign/silverstripe-elemental          3.0.x-dev a643f4d Elemental pagetype and collection of Elements
doctrine/instantiator                     1.0.5             A small, lightweight utility to instantiate objects in PHP without invoking their constructors
embed/embed                               v3.3.5            PHP library to retrieve page info using oembed, opengraph, etc
guzzlehttp/guzzle                         6.3.3             Guzzle is a PHP HTTP client library
guzzlehttp/promises                       v1.3.1            Guzzle promises library
guzzlehttp/psr7                           1.4.2             PSR-7 message implementation that also provides common utility methods
heyday/silverstripe-colorpalette          2.0.3             A color palette picker for SilverStripe CMS
intervention/image                        2.4.2             Image handling and manipulation library with support for Laravel integration
jeremeamia/SuperClosure                   2.4.0             Serialize Closure objects, including their context and binding
jonom/focuspoint                          3.0.0             Smarter automatic image cropping for SilverStripe
jonom/silverstripe-text-target-length     2.0.2             Set character length recommendations on SilverStripe text form fields
league/csv                                8.2.3             Csv data manipulation made easy in PHP
league/flysystem                          1.0.46            Filesystem abstraction: Many filesystems, one API.
m1/env                                    2.1.2             Env is a lightweight library bringing .env file parser compatibility to PHP. In short - it enables you to read .env files with PHP.
marcj/topsort                             1.1.0             High-Performance TopSort/Dependency resolving algorithm
monolog/monolog                           1.23.0            Sends your logs to files, sockets, inboxes, databases and various web services
myclabs/deep-copy                         1.7.0             Create deep copies (clones) of your objects
nikic/php-parser                          v3.1.5            A PHP parser written in PHP
paragonie/random_compat                   v2.0.17           PHP 5.x polyfill for random_bytes() and random_int() from PHP 7
phpdocumentor/reflection-common           1.0.1             Common reflection classes used by phpdocumentor to reflect the code structure
phpdocumentor/reflection-docblock         3.3.2             With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.
phpdocumentor/type-resolver               0.4.0
phpspec/prophecy                          1.8.0             Highly opinionated mocking framework for PHP 5.3+
phpunit/php-code-coverage                 4.0.8             Library that provides collection, processing, and rendering functionality for PHP code coverage information.
phpunit/php-file-iterator                 1.4.5             FilterIterator implementation that filters files based on a list of suffixes.
phpunit/php-text-template                 1.2.1             Simple template engine.
phpunit/php-timer                         1.0.9             Utility class for timing
phpunit/php-token-stream                  1.4.12            Wrapper around PHP's tokenizer extension.
phpunit/phpunit                           5.7.27            The PHP Unit Testing framework.
phpunit/phpunit-mock-objects              3.4.4             Mock Object library for PHPUnit
psr/cache                                 1.0.1             Common interface for caching libraries
psr/container                             1.0.0             Common Container Interface (PHP FIG PSR-11)
psr/http-message                          1.0.1             Common interface for HTTP messages
psr/log                                   1.0.2             Common interface for logging libraries
psr/simple-cache                          1.0.1             Common interfaces for simple caching
ryanpotter/silverstripe-cms-theme         2.3.0             CMS Theme
sebastian/code-unit-reverse-lookup        1.0.1             Looks up which function or method a line of code belongs to
sebastian/comparator                      1.2.4             Provides the functionality to compare PHP values for equality
sebastian/diff                            1.4.3             Diff implementation
sebastian/environment                     2.0.0             Provides functionality to handle HHVM/PHP environments
sebastian/exporter                        2.0.0             Provides the functionality to export PHP variables for visualization
sebastian/global-state                    1.1.1             Snapshotting of global state
sebastian/object-enumerator               2.0.1             Traverses array structures and object graphs to enumerate all referenced objects
sebastian/recursion-context               2.0.0             Provides functionality to recursively process PHP variables
sebastian/resource-operations             1.0.0             Provides a list of PHP built-in functions that operate on resources
sebastian/version                         2.0.1             Library that helps with managing the version number of Git-hosted PHP projects
sheadawson/silverstripe-linkable          2.0.0             A couple of handy form fields and objects for managing external and internal links on DataObjects
silverstripe/admin                        1.2.1             SilverStripe admin interface
silverstripe/asset-admin                  1.2.1             Asset management for the SilverStripe CMS
silverstripe/assets                       1.2.1             SilverStripe Assets component
silverstripe/blog                         3.2.1             A fresh take on blogging in Silverstripe set out to tackle the issue of a cluttered Site Tree.
silverstripe/campaign-admin               1.2.1             SilverStripe campaign admin interface
silverstripe/cms                          4.2.1             The SilverStripe Content Management System
silverstripe/config                       1.0.6             SilverStripe configuration based on YAML and class statics
silverstripe/errorpage                    1.2.1             ErrorPage component for SilverStripe CMS
silverstripe/framework                    4.2.1             The SilverStripe framework
silverstripe/graphql                      2.0.1             GraphQL server for SilverStripe models and other data
silverstripe/lumberjack                   2.0.0             A module to make managing pages in a GridField easy without losing any of the functionality that you're used to in the CMS.
silverstripe/recipe-cms                   4.2.1             SilverStripe recipe for fully featured page and asset content editing
silverstripe/recipe-core                  4.2.1             SilverStripe framework-only core recipe
silverstripe/recipe-plugin                1.3.0             Helper plugin to install SilverStripe recipes
silverstripe/redirectedurls               2.0.0             Provides a system for users to configure arbitrary redirections in the CMS
silverstripe/reports                      4.2.1             Reports module for SilverStripe CMS
silverstripe/segment-field                2.2.1             A reusable approach to segment-generating fields
silverstripe/siteconfig                   4.2.1             Site wide settings administration.
silverstripe/staticpublishqueue           4.0.0-beta.1      Static publishing queue to create static versions of pages for enhanced performance and security
silverstripe/tagfield                     2.1.0             Tag field for Silverstripe
silverstripe/userforms                    5.2.1             UserForms enables CMS users to create dynamic forms via a drag and drop interface and without getting involved in any PHP code
silverstripe/vendor-plugin                1.3.3             Allows vendor modules to expose directories to the webroot
silverstripe/versioned                    1.2.1             SilverStripe Versioned component
silverstripe/versioned-admin              1.0.0             SilverStripe versioned admin interface
silverstripe/widgets                      2.0.1             Widgets are small pieces of functionality such as showing the latest Comments or Flickr Photos. They normally display on the sidebar of your website.
silverware/validator                      1.2.0             SilverWare Validator Module.
swiftmailer/swiftmailer                   v5.4.12           Swiftmailer, free feature-rich PHP mailer
symbiote/silverstripe-gridfieldextensions 3.2.0             A collection of useful grid field components
symbiote/silverstripe-queuedjobs          4.2.3             A framework for defining and running background jobs in a queued manner
symfony/cache                             v3.4.14           Symfony Cache component with PSR-6, PSR-16, and tags
symfony/config                            v3.4.14           Symfony Config Component
symfony/filesystem                        v3.4.14           Symfony Filesystem Component
symfony/finder                            v3.4.14           Symfony Finder Component
symfony/polyfill-apcu                     v1.9.0            Symfony polyfill backporting apcu_* functions to lower PHP versions
symfony/polyfill-ctype                    v1.9.0            Symfony polyfill for ctype functions
symfony/polyfill-mbstring                 v1.9.0            Symfony polyfill for the Mbstring extension
symfony/polyfill-php56                    v1.9.0            Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions
symfony/polyfill-util                     v1.9.0            Symfony utilities for portability of PHP codes
symfony/translation                       v2.8.44           Symfony Translation Component
symfony/yaml                              v3.4.14           Symfony Yaml Component
unclecheese/display-logic                 2.0.1             Allows assignment of conditions for display and hide of specific form fields based on client side behavior.
undefinedoffset/sortablegridfield         2.0.6             Adds drag and drop functionality to SilverStripe 4.x's GridField
webmozart/assert                          1.3.0             Assertions to validate method input/output with nice error messages.
webonyx/graphql-php                       v0.8.0            A PHP port of GraphQL reference implementation

I suggest we re-open this

@chillu chillu reopened this Aug 29, 2018
@chillu

This comment has been minimized.

Copy link
Member

@chillu chillu commented Aug 29, 2018

Reopening. Please file specific bug reports to help us action these things. Like ... which browser are you using? The original screenshot kind of indicates Chrome, but none of the follow-up posters have noted this important detail.

@eehondas

This comment has been minimized.

Copy link

@eehondas eehondas commented Aug 30, 2018

Hi @chillu.
This isn't browser specific, It happens on any given browser for me and @spark-green.
Apologies for not posting here earlier but there are multiple threads with the same issue and we didn't know about this one. Anyway, the problem we have is related to tinymce not loading in first instance but only after a page reload. The issue is well described and broken down here:
silverstripe/silverstripe-cms#2177
This thread got bounced to the S3 but since this problem it's not S3 related (or not only) we finally posted here.
Please use above thread for info as it is more informative.

@kinglozzer

This comment has been minimized.

Copy link
Member

@kinglozzer kinglozzer commented Aug 30, 2018

Sorry, I split that thread up as it was a combo of people who were and weren’t using the S3 module - two different route causes of similar symptoms.

@eehondas Could you please share the following?

  • Any errors that are logged in your browser console
  • The URL that the CMS is trying to load TinyMCE from (if it is trying to load it at all before you hard-refresh)

I note that a few people have said they’re running a webpack-based frontend build process. If that’s the case for you too, are you viewing the CMS through webpack-dev-server? Does the issue still occur if you don’t have webpack-dev-server enabled, or you view the CMS outside of it?

@eehondas

This comment has been minimized.

Copy link

@eehondas eehondas commented Aug 31, 2018

Hi @kinglozzer
Sure no problem. This is the error in the console.
image
I checked and as a matter of fact when this happens tinyMCE is not in the list of requested JS files.
This is a list of every loaded file from Network tab in Chrome DevTools when the error happens:
image
And this is (part of) the list once I reload the page:
2018-08-31 10_14_40-clipboard
So essentially as some users explained in the other thread it looks like a timing issue when tinyMCE is invoked before is available or loaded at all.
Also to answer the webpack question: we do use webpack, we do not use webpack-dev-server at all.
Also I am testing the error on a website where I don't have a frontend or theme plugged in at all,
Just Backend.

Hope this helps

@eehondas

This comment has been minimized.

Copy link

@eehondas eehondas commented Sep 6, 2018

Sorry to bother but is there any update on this?

@kinglozzer

This comment has been minimized.

Copy link
Member

@kinglozzer kinglozzer commented Sep 7, 2018

Sorry @eehondas, but I still can’t recreate this, which makes it almost impossible to try to debug :/

When you click to edit a page, under the headers for the request to pages/edit/show/123 there should be an x-include-js header - can you see the TinyMCE JS file in the list of files?

@eehondas

This comment has been minimized.

Copy link

@eehondas eehondas commented Sep 10, 2018

Hi @kinglozzer, you can close this issue.
Long story short, it was happening with a base installation of SS 4.1 for us. Then we moved to 4.2 and we thought it was the same problem. However I tried with a base installation of 4.2 and it does not happen anymore. There were multiple things happening at once and one was a third party module stopping tiny mce from loading. We tracked that one down and it is not a framework problem anymore.
Thank you for the help.

@kinglozzer

This comment has been minimized.

Copy link
Member

@kinglozzer kinglozzer commented Sep 10, 2018

Great, thanks for feeding back @eehondas and glad everything’s working for you now 😀

@kinglozzer kinglozzer closed this Sep 10, 2018
@chillu

This comment has been minimized.

Copy link
Member

@chillu chillu commented Feb 11, 2019

@pjayme Can you please list composer info here, and a stripped down test case on when that's happening (page type configs)? Which browser, and what's the error?

Should we be continuing to load the rest of the x-include-js requirements if a file fails

@christopherdarling That sounds like a good idea. Maybe make a pull request for that?

Reopening the issue for now.

@chillu chillu reopened this Feb 11, 2019
@pjayme

This comment has been minimized.

Copy link

@pjayme pjayme commented Feb 12, 2019

@chillu sure thing, the error I am experiencing is identical to the responses on this thread silverstripe/silverstripe-cms#2177 - 'tinyMCE' not defined:

Test case:

  • Visit a generic content page in the CMS

  • On initial load, this is the resulting output:
    screen shot 2019-02-13 at 8 23 49 am

  • This is quite difficult to reproduce as it is inconsistent behaviour, there are times when on initial load the page renders as expected but there are also times when the error appears. Once the page has been refreshed the issue tends to disappear completely.

  • Browser: Chrome V 71.0

  • Error: bundle.js?m=1520903238:1 Uncaught ReferenceError: tinymce is not defined at Object.create (bundle.js?m=1520903238:1) at Object.init (bundle.js?m=1520903238:1) at init.onadd (bundle.js?m=1520903238:1) at o (vendor.js?m=1520903238:1) at Array.<anonymous> (vendor.js?m=1520903238:1) at HTMLDocument.<anonymous> (vendor.js?m=1520903238:1) at HTMLDocument.dispatch (eval at t.exports (vendor.js?m=1520903238:1), <anonymous>:3332:9) at HTMLDocument.eventHandle (eval at t.exports (vendor.js?m=1520903238:1), <anonymous>:2941:28) at Object.trigger (eval at t.exports (vendor.js?m=1520903238:1), <anonymous>:3210:12) at init.triggerHandler (eval at t.exports (vendor.js?m=1520903238:1), <anonymous>:3874:24)

List of modules installed:

asyncphp/doorman                               3.0.0                                    Child process management
cheddam/silverstripe-flash-messages            dev-master b7a232a                       A simple module for sending flash messages in y...
colymba/gridfield-bulk-editing-tools           3.0.0-beta4                              SilverStripe GridField component to upload imag...
composer/ca-bundle                             1.1.4                                    Lets you find a path to the system CA bundle, a...
composer/installers                            v1.6.0                                   A multi-framework Composer library installer
cwp/cwp                                        2.2.0                                    CWP features module. We strongly recommend usin...
cwp/cwp-core                                   2.2.0                                    CWP basic compatibility module. Use for migrati...
cwp/cwp-pdfexport                              1.0.1                                    Add PDF export capability for pages in CWP
cwp/cwp-recipe-cms                             2.2.0                                    CWP CMS requirements recipe
cwp/cwp-recipe-core                            2.2.0                                    CWP core requirements recipe
cwp/cwp-recipe-search                          2.2.0                                    CWP search requirements recipe
cwp/cwp-search                                 1.1.x-dev 5c0b6ea                        CWP fulltextsearch integration module
dnadesign/silverstripe-populate                2.0.0                                    Populate your database through YAML files
doctrine/instantiator                          1.1.0                                    A small, lightweight utility to instantiate obj...
embed/embed                                    v3.3.7                                   PHP library to retrieve page info using oembed,...
guzzlehttp/guzzle                              6.3.3                                    Guzzle is a PHP HTTP client library
guzzlehttp/promises                            v1.3.1                                   Guzzle promises library
guzzlehttp/psr7                                1.5.2                                    PSR-7 message implementation that also provides...
heyday/silverstripe-colorpalette               2.0.3                                    A color palette picker for SilverStripe CMS
heyday/silverstripe-menumanager                3.0.4                                    Allows complex menu management to be handled th...
intervention/image                             2.4.2                                    Image handling and manipulation library with su...
jdorn/sql-formatter                            dev-master 7ef9b85                       a PHP SQL highlighting library
jeremeamia/SuperClosure                        2.4.0                                    Serialize Closure objects, including their cont...
league/csv                                     8.2.3                                    Csv data manipulation made easy in PHP
league/flysystem                               1.0.50                                   Filesystem abstraction: Many filesystems, one API.
lekoala/silverstripe-debugbar                  2.0.1                                    DebugBar for SilverStripe CMS
m1/env                                         2.1.2                                    Env is a lightweight library bringing .env file...
marcj/topsort                                  1.1.0                                    High-Performance TopSort/Dependency resolving a...
maximebf/debugbar                              v1.15.0                                  Debug bar in the browser for php application
monolog/monolog                                1.24.0                                   Sends your logs to files, sockets, inboxes, dat...
myclabs/deep-copy                              1.8.1                                    Create deep copies (clones) of your objects
nikic/php-parser                               v4.2.0                                   A PHP parser written in PHP
nzta/silverstripe-sitebanner                   dev-feature/session-banners a783294      Site-wide banners activated through the CMS
paragonie/random_compat                        v2.0.18                                  PHP 5.x polyfill for random_bytes() and random_...
phpdocumentor/reflection-common                1.0.1                                    Common reflection classes used by phpdocumentor...
phpdocumentor/reflection-docblock              4.3.0                                    With this component, a library can provide supp...
phpdocumentor/type-resolver                    0.4.0                                   
phpspec/prophecy                               1.8.0                                    Highly opinionated mocking framework for PHP 5.3+
phpunit/php-code-coverage                      4.0.8                                    Library that provides collection, processing, a...
phpunit/php-file-iterator                      1.4.5                                    FilterIterator implementation that filters file...
phpunit/php-text-template                      1.2.1                                    Simple template engine.
phpunit/php-timer                              1.0.9                                    Utility class for timing
phpunit/php-token-stream                       2.0.2                                    Wrapper around PHP's tokenizer extension.
phpunit/phpunit                                5.7.27                                   The PHP Unit Testing framework.
phpunit/phpunit-mock-objects                   3.4.4                                    Mock Object library for PHPUnit
psr/cache                                      1.0.1                                    Common interface for caching libraries
psr/container                                  1.0.0                                    Common Container Interface (PHP FIG PSR-11)
psr/http-message                               1.0.1                                    Common interface for HTTP messages
psr/log                                        1.1.0                                    Common interface for logging libraries
psr/simple-cache                               1.0.1                                    Common interfaces for simple caching
ptcinc/solr-php-client                         v1.0.0                                   A purely PHP library for indexing and searching...
ralouphie/getallheaders                        2.0.5                                    A polyfill for getallheaders.
sebastian/code-unit-reverse-lookup             1.0.1                                    Looks up which function or method a line of cod...
sebastian/comparator                           1.2.4                                    Provides the functionality to compare PHP value...
sebastian/diff                                 1.4.3                                    Diff implementation
sebastian/environment                          2.0.0                                    Provides functionality to handle HHVM/PHP envir...
sebastian/exporter                             2.0.0                                    Provides the functionality to export PHP variab...
sebastian/global-state                         1.1.1                                    Snapshotting of global state
sebastian/object-enumerator                    2.0.1                                    Traverses array structures and object graphs to...
sebastian/recursion-context                    2.0.0                                    Provides functionality to recursively process P...
sebastian/resource-operations                  1.0.0                                    Provides a list of PHP built-in functions that ...
sebastian/version                              2.0.1                                    Library that helps with managing the version nu...
sheadawson/silverstripe-dependentdropdownfield 2.0.0                                    A silverstripe dropdown field that has it's opt...
sheadawson/silverstripe-linkable               2.0.0                                    A couple of handy form fields and objects for m...
silverstripe-archive/silverstripe-bbcodeparser dev-feature/update-vendor-module 6c70801 Abandoned moduled providing BBCodeParser and Te...
silverstripe/admin                             1.3.0                                    SilverStripe admin interface
silverstripe/akismet                           4.0.1                                    Akismet antispam module for Silverstripe
silverstripe/asset-admin                       1.3.0                                    Asset management for the SilverStripe CMS
silverstripe/assets                            1.3.0                                    SilverStripe Assets component
silverstripe/auditor                           2.1.4                                    Adds security audit trail to SilverStripe.
silverstripe/blog                              3.2.1                                    A fresh take on blogging in Silverstripe set ou...
silverstripe/campaign-admin                    1.3.0                                    SilverStripe campaign admin interface
silverstripe/cms                               4.3.0                                    The SilverStripe Content Management System
silverstripe/comment-notifications             2.0.1                                    Provides email notifications for visitor comments
silverstripe/comments                          3.1.5                                    This module provides commenting functionality f...
silverstripe/config                            1.0.9                                    SilverStripe configuration based on YAML and cl...
silverstripe/content-widget                    2.0.1                                    Display HTML content in a widget
silverstripe/contentreview                     4.1.1                                    Flags pages for periodical author review (incl....
silverstripe/environmentcheck                  2.0.0                                    Provides an API for building environment tests
silverstripe/errorpage                         1.3.0                                    ErrorPage component for SilverStripe CMS
silverstripe/framework                         4.3.0                                    The SilverStripe framework
silverstripe/fulltextsearch                    3.4.1                                    Adds support for Fulltext Search engines like S...
silverstripe/fulltextsearch-localsolr          dev-master f2a799e                       A pre-configured, ready to use Solr instance fo...
silverstripe/graphql                           3.0.0                                    GraphQL server for SilverStripe models and othe...
silverstripe/gridfieldqueuedexport             2.1.1                                    Export large data sets from your GridField in t...
silverstripe/html5                             2.0.1                                    HTML5 support for SilverStripe
silverstripe/hybridsessions                    2.1.0                                    Cookie/DB session support for SilverStripe
silverstripe/lumberjack                        2.0.1                                    A module to make managing pages in a GridField ...
silverstripe/mimevalidator                     2.0.0                                    Checks uploaded file content roughly matches a ...
silverstripe/recipe-blog                       1.1.2                                    SilverStripe Blog Project Template
silverstripe/recipe-cms                        4.3.0                                    SilverStripe recipe for fully featured page and...
silverstripe/recipe-collaboration              1.2.0                                    Add extra functionality to enhance CMS user col...
silverstripe/recipe-core                       4.3.0                                    SilverStripe framework-only core recipe
silverstripe/recipe-form-building              1.2.0                                    A recipe of modules to help you build forms in ...
silverstripe/recipe-plugin                     1.3.0                                    Helper plugin to install SilverStripe recipes
silverstripe/reports                           4.3.0                                    Reports module for SilverStripe CMS
silverstripe/segment-field                     2.2.2                                    A reusable approach to segment-generating fields
silverstripe/sharedraftcontent                 2.2.0                                    Share draft page content with non-CMS users
silverstripe/siteconfig                        4.3.0                                    Site wide settings administration.
silverstripe/sitewidecontent-report            3.0.2                                    Report of all pages and files across all subsites
silverstripe/spamprotection                    3.0.1                                    Spam protection module for SilverStripe.
silverstripe/tagfield                          2.2.2                                    Tag field for SilverStripe
silverstripe/taxonomy                          2.0.1                                    Provide extra taxonomy for cataloguing the data.
silverstripe/textextraction                    3.0.0                                    Text Extraction API for SilverStripe CMS (mostl...
silverstripe/userforms                         5.3.0                                    UserForms enables CMS users to create dynamic f...
silverstripe/vendor-plugin                     1.4.0                                    Allows vendor modules to expose directories to ...
silverstripe/versioned                         1.3.0                                    SilverStripe Versioned component
silverstripe/versioned-admin                   1.1.x-dev 747c508                        SilverStripe versioned admin interface
silverstripe/widgets                           2.0.2                                    Widgets are small pieces of functionality such ...
squizlabs/php_codesniffer                      3.4.0                                    PHP_CodeSniffer tokenizes PHP, JavaScript and C...
swiftmailer/swiftmailer                        v5.4.12                                  Swiftmailer, free feature-rich PHP mailer
symbiote/silverstripe-advancedworkflow         5.1.0                                    Adds configurable workflow support to the CMS, ...
symbiote/silverstripe-gridfieldextensions      3.2.1                                    A collection of useful grid field components
symbiote/silverstripe-queuedjobs               4.3.0                                    A framework for defining and running background...
symfony/cache                                  v3.4.22                                  Symfony Cache component with PSR-6, PSR-16, and...
symfony/config                                 v3.4.22                                  Symfony Config Component
symfony/filesystem                             v4.2.3                                   Symfony Filesystem Component
symfony/finder                                 v3.4.22                                  Symfony Finder Component
symfony/polyfill-apcu                          v1.10.0                                  Symfony polyfill backporting apcu_* functions t...
symfony/polyfill-ctype                         v1.10.0                                  Symfony polyfill for ctype functions
symfony/polyfill-mbstring                      v1.10.0                                  Symfony polyfill for the Mbstring extension
symfony/polyfill-php56                         v1.10.0                                  Symfony polyfill backporting some PHP 5.6+ feat...
symfony/polyfill-php72                         v1.10.0                                  Symfony polyfill backporting some PHP 7.2+ feat...
symfony/polyfill-util                          v1.10.0                                  Symfony utilities for portability of PHP codes
symfony/process                                v3.4.22                                  Symfony Process Component
symfony/translation                            v2.8.49                                  Symfony Translation Component
symfony/var-dumper                             v4.2.3                                   Symfony mechanism for exploring and dumping PHP...
symfony/yaml                                   v3.4.22                                  Symfony Yaml Component
tijsverkoyen/akismet                           1.1.0                                    Akismet is a wrapper-class to communicate with ...
tractorcow/classproxy                          0.1.2                                   
tractorcow/silverstripe-proxy-db               0.1.0                                   
unclecheese/display-logic                      2.0.2                                    Allows assignment of conditions for display and...
webmozart/assert                               1.4.0                                    Assertions to validate method input/output with...
webonyx/graphql-php                            v0.8.0                                   A PHP port of GraphQL reference implementation
@micmania1

This comment has been minimized.

Copy link
Member

@micmania1 micmania1 commented Feb 28, 2019

Following on from @pjayme's post above, we can consistently reproduce this by logging into the cms and then clicking a page.

The problem seems to lie with how the javascript is loaded.

For example, going directly to the page /admin/pages/edit/show/6 the tinymce javascript will be loaded via a script tag in the DOM. However, when you go via /admin/pages and then navigate to a page, that area is loaded using an ajax call and the script should be loaded through the x-include-js header but isn't. The script is in the header, but never gets loaded (not sure why yet).

This explains why refreshing the page works (because the javascript is loaded differently).

@bergice bergice self-assigned this Mar 3, 2019
@bergice bergice removed their assignment Mar 18, 2019
@NightJar

This comment has been minimized.

Copy link
Contributor

@NightJar NightJar commented Mar 18, 2019

This issue appears double layered.

  1. Generated TinyMCE script is not being saved and thus cannot be loaded - why do we generate our own TinyMCE bundle per EditorConfig in SS4?
  2. jQuery.onDemand which is a "third party" script (that SilverStripe totally wrote and maintain) that is not fault tolerant - any error (server/transport/syntax/runtime) will cause every subsequent file in the queue to not be loaded. This breaks the CMS.

I've run into this trying to solve a cryptic "parsererror" toast message (that is also green, indicating success 🤷‍♂️) from appearing in various select pages in the CMS. In the end it was the same as @christopherdarling has also run into above (described at #8228 (comment)) - the root cause being that this file attempt to use (register a transformation with) the JavaScript Injector after it has been initialised, resulting in Injector throwing an error, thereby halting the dynamic include chain.

I see a number of actions to be taken here.

  1. Fix this issue for the OP description (lets not conflate issues) whereby the failure to write the TinyMCE config should be more ... "loud" - and perhaps a fallback default could be loaded.
  2. A new issue is made to address fault tolerance in the jQuery.onDemand plugin heavily used by the CMS
  3. Another issue is opened to consider ways Injector may be made more flexible to allow on-demand loaded scripts to mutate the container

@Cheddam is currently looking into silverstripe/cwp#141 and may have thoughts on this.

Thanks @micmania1 for pointing out this connected issue :)

@bergice

This comment has been minimized.

Copy link
Contributor

@bergice bergice commented Mar 18, 2019

@NightJar jQuery.onDemand will no longer fail silently and should not stop subsequent script loading.

See silverstripe/silverstripe-admin@e624376#diff-023e4c16d7408481b09f8ee6fba162cb

@micmania1

This comment has been minimized.

Copy link
Member

@micmania1 micmania1 commented Mar 19, 2019

I've pulled in silverstripe/admin 1.3.2 (as per above commit) and this helps solve the problem.

@mhenden

This comment has been minimized.

Copy link

@mhenden mhenden commented Mar 20, 2019

I'm having issues with TinyMCE not loading in a clean 'Vanilla'' install of SS4.3.2. Have tracked the problem down to a 403 error with /Public/assets/_tinymce/tinymce-cms-9a0ff8de32.js?_=1553045079110 which I believe stems from a 'permissions' issue. In my local (Mac OS) development environment the nested folder permissions are as follows:

  • /public 'owner' R/W, 'staff' R, 'everyone' R
  • /assets 'owner' R/W, 'staff' R, 'everyone' R
  • /_tinymce 'owner' R/W, 'staff' R, 'everyone' R

I can change the first two folders for R/W for everyone. When I change permissions on /_tinymce and admin?flush=all the settings on _tinymce revert to 'write only' for user 'everyone'. Is this the root of the problem?

@chillu chillu added this to the Recipe 4.4.0 milestone Mar 20, 2019
@maxime-rainville

This comment has been minimized.

Copy link
Contributor

@maxime-rainville maxime-rainville commented Mar 20, 2019

@mhenden I presume you are hosting this on Windows and IIS?

For anyone else experiencing this issue, could you clarify what OS/Server stack you are using?

@mhenden

This comment has been minimized.

Copy link

@mhenden mhenden commented Mar 20, 2019

@chillu

This comment has been minimized.

Copy link
Member

@chillu chillu commented Apr 7, 2019

It looks like this migh be resolved by @bergice BUG: Always continue loading scripts even if one script fails which he referenced above, and was released with 4.3.2.

If anyone still experiences this issue with 4.3.2 or newer, please ping us here in the next 48h, otherwise I'll close this issue

For every further report on this issue, we need the following info. There's so much back and forth here that we need accurate and actionable bug reports to track this down:

  • composer info
  • Steps you took before the error occured
  • Network panel requests for tinymce*
  • X-Include-JS responses on the failing AJAX CMS requests (if any)
  • Browser and version

@mhenden: I think your issue seems unrelated. You're getting 403 (permission denied) errors on that file, which indicates filesystem permission issues. That's different from parsing errors around TinyMCE. It looks like there's an existing issue for this, let's continue that discussion thread there.

@christopherdarling

This comment has been minimized.

Copy link
Contributor

@christopherdarling christopherdarling commented Apr 9, 2019

@chillu I'm no longer facing the issues I had previously, thanks @bergice for the fix!

@chillu

This comment has been minimized.

Copy link
Member

@chillu chillu commented Apr 9, 2019

OK thanks for your patience everyone, I'm closing this ... again ;)

@chillu chillu closed this Apr 9, 2019
@a2nt

This comment has been minimized.

Copy link
Contributor

@a2nt a2nt commented Aug 5, 2019

I have noticed that one of bug reports was made with my webpack module: https://github.com/a2nt/silverstripe-webpack

Someone thought that it appeared cuz of using webpack, but it has nothing to deal with CMS Requirements and my module serves only frontend using webpack.

I have experienced the same issue with following modules installed:

a2nt/silverstripe-font-awesome-field              dev-master 4635537 A simple form field for selecting font...
axllent/silverstripe-bootstrap-forms              2.0.3              An extension to add CSS classes to Sil...
axllent/silverstripe-version-truncator            2.0.3              Automatically delete old SiteTree page...
betterbrief/silverstripe-googlemapfield           v2.2.1             Save locations using latitude/longitud...
bramus/ansi-php                                   3.0.2              ANSI Control Functions and ANSI Contro...
bramus/monolog-colored-line-formatter             2.0.3              Colored Line Formatter for Monolog
colymba/gridfield-bulk-editing-tools              dev-master 7f871a7 SilverStripe GridField component to up...
composer/ca-bundle                                1.2.3              Lets you find a path to the system CA ...
composer/installers                               v1.6.0             A multi-framework Composer library ins...
dnadesign/silverstripe-elemental                  4.1.0              Elemental pagetype and collection of E...
dnadesign/silverstripe-elemental-list             1.2.0              Adds a new element for nested elements
dnadesign/silverstripe-elemental-userforms        3.0.0              Adds a new element for usersforms
dnadesign/silverstripe-elemental-virtual          1.2.2              Adds ability for Elemental to share co...
doctrine/instantiator                             1.2.0              A small, lightweight utility to instan...
drmartingonzo/ss-tinymce-charcount                1.1.1              Plugin for tinyMCE in siverstripe to c...
dynamic/flexslider                                4.0.1              Display a FlexSlider on pages of your ...
dynamic/silverstripe-elemental-accordion          2.0.3              Display content in collapsable panels
dynamic/silverstripe-elemental-baseobject         2.0.3              A simple base DataObject to use with E...
dynamic/silverstripe-elemental-blocks             3.0.1              A recipe to require additional element...
dynamic/silverstripe-elemental-blog               2.1.2              Show recent posts from a featured blog.
dynamic/silverstripe-elemental-countdown          2.0.3              Display a countdown to a specific date...
dynamic/silverstripe-elemental-customer-service   2.0.4              Additional customer service element fo...
dynamic/silverstripe-elemental-embedded-code      2.0.2              Embed code like iFrames or Javascript ...
dynamic/silverstripe-elemental-features           2.0.5              A block that displays featured content...
dynamic/silverstripe-elemental-filelist           2.0.2              A multi file block for SilverStripe El...
dynamic/silverstripe-elemental-flexslider         2.0.2              Flexslider slideshow content block for...
dynamic/silverstripe-elemental-gallery            2.0.4              A block to display a collection of images
dynamic/silverstripe-elemental-image              2.0.1              A block to add a single image to your ...
dynamic/silverstripe-elemental-oembed             2.1.1              A block to embed media from other webs...
dynamic/silverstripe-elemental-promos             2.0.3              A content block to display a group of ...
dynamic/silverstripe-elemental-section-navigation 2.0.2              A block to display a list of links to ...
dynamic/silverstripe-elemental-sponsors           2.0.1              Display a list of sponsor logos with l...
dynamic/silverstripe-elemental-tabset             2.0.1              Create a tabbed interface that uses el...
dynamic/silverstripe-elemental-testimonials       2.0.1              Testimonials element for the SilverStr...
dynamic/silverstripe-geocoder                     1.0.0              SilverStripe wrapper for Geocoder
egeloen/http-adapter                              0.8.0              Issue HTTP request for PHP 5.3+.
embed/embed                                       v3.4.1             PHP library to retrieve page info usin...
firesphere/googlemapsfield                        dev-master ecf39a4 Google places api field for SilverStripe
gorriecoe/silverstripe-dataobjecthistory          1.2.2              Adds a history tab to dataobjects
guzzlehttp/psr7                                   1.6.1              PSR-7 message implementation that also...
igorw/get-in                                      v1.0.3             Functions for for hash map (assoc arra...
innoweb/silverstripe-sitemap                      2.1.1              Adds a page type that automatically bu...
intervention/image                                2.5.0              Image handling and manipulation librar...
jdorn/sql-formatter                               dev-master 7ef9b85 a PHP SQL highlighting library
jonom/silverstripe-betternavigator                4.1.1              Front-end utility menu for SilverStrip...
league/csv                                        8.2.3              Csv data manipulation made easy in PHP
league/flysystem                                  1.0.53             Filesystem abstraction: Many filesyste...
lekoala/silverstripe-debugbar                     2.0.3              DebugBar for SilverStripe CMS
m1/env                                            2.1.2              Env is a lightweight library bringing ...
marcj/topsort                                     1.1.0              High-Performance TopSort/Dependency re...
maximebf/debugbar                                 v1.15.0            Debug bar in the browser for php appli...
monolog/monolog                                   1.24.0             Sends your logs to files, sockets, inb...
myclabs/deep-copy                                 1.9.1              Create deep copies (clones) of your ob...
nikic/php-parser                                  v4.2.2             A PHP parser written in PHP
paragonie/random_compat                           v2.0.18            PHP 5.x polyfill for random_bytes() an...
phar-io/manifest                                  1.0.3              Component for reading phar.io manifest...
phar-io/version                                   2.0.1              Library for handling version informati...
phpdocumentor/reflection-common                   1.0.1              Common reflection classes used by phpd...
phpdocumentor/reflection-docblock                 4.3.1              With this component, a library can pro...
phpdocumentor/type-resolver                       0.4.0             
phpspec/prophecy                                  1.8.1              Highly opinionated mocking framework f...
phpunit/php-code-coverage                         7.0.7              Library that provides collection, proc...
phpunit/php-file-iterator                         2.0.2              FilterIterator implementation that fil...
phpunit/php-text-template                         1.2.1              Simple template engine.
phpunit/php-timer                                 2.1.2              Utility class for timing
phpunit/php-token-stream                          3.1.0              Wrapper around PHP's tokenizer extension.
phpunit/phpunit                                   8.3.3              The PHP Unit Testing framework.
psr/cache                                         1.0.1              Common interface for caching libraries
psr/container                                     1.0.0              Common Container Interface (PHP FIG PS...
psr/http-message                                  1.0.1              Common interface for HTTP messages
psr/log                                           1.1.0              Common interface for logging libraries
psr/simple-cache                                  1.0.1              Common interfaces for simple caching
ralouphie/getallheaders                           3.0.3              A polyfill for getallheaders.
sebastian/code-unit-reverse-lookup                1.0.1              Looks up which function or method a li...
sebastian/comparator                              3.0.2              Provides the functionality to compare ...
sebastian/diff                                    3.0.2              Diff implementation
sebastian/environment                             4.2.2              Provides functionality to handle HHVM/...
sebastian/exporter                                3.1.0              Provides the functionality to export P...
sebastian/global-state                            3.0.0              Snapshotting of global state
sebastian/object-enumerator                       3.0.3              Traverses array structures and object ...
sebastian/object-reflector                        1.1.1              Allows reflection of object attributes...
sebastian/recursion-context                       3.0.0              Provides functionality to recursively ...
sebastian/resource-operations                     2.0.1              Provides a list of PHP built-in functi...
sebastian/type                                    1.1.3              Collection of value objects that repre...
sebastian/version                                 2.0.1              Library that helps with managing the v...
sheadawson/silverstripe-dependentdropdownfield    2.0.0              A silverstripe dropdown field that has...
sheadawson/silverstripe-linkable                  2.0.0              A couple of handy form fields and obje...
silverstripe/admin                                1.4.1              SilverStripe admin interface
silverstripe/asset-admin                          1.4.1              Asset management for the SilverStripe CMS
silverstripe/assets                               1.4.1              SilverStripe Assets component
silverstripe/blog                                 3.3.0              A fresh take on blogging in Silverstri...
silverstripe/campaign-admin                       1.4.1              SilverStripe campaign admin interface
silverstripe/cms                                  4.4.1              The SilverStripe Content Management Sy...
silverstripe/config                               1.0.15             SilverStripe configuration based on YA...
silverstripe/errorpage                            1.4.1              ErrorPage component for SilverStripe CMS
silverstripe/externallinks                        2.0.4              Adds tracking of broken external links...
silverstripe/framework                            4.4.1              The SilverStripe framework
silverstripe/graphql                              3.1.1              GraphQL server for SilverStripe models...
silverstripe/lumberjack                           2.0.1              A module to make managing pages in a G...
silverstripe/recaptcha                            3.0.0-alpha1       Provides a form field which allows for...
silverstripe/recipe-cms                           4.4.1              SilverStripe recipe for fully featured...
silverstripe/recipe-core                          4.4.1              SilverStripe framework-only core recipe
silverstripe/recipe-plugin                        1.3.0              Helper plugin to install SilverStripe ...
silverstripe/redirectedurls                       dev-master c0d4cde Provides a system for users to configu...
silverstripe/reports                              4.4.1              Reports module for SilverStripe CMS
silverstripe/segment-field                        2.2.2              A reusable approach to segment-generat...
silverstripe/siteconfig                           4.4.1              Site wide settings administration.
silverstripe/spamprotection                       3.0.1              Spam protection module for SilverStripe.
silverstripe/tagfield                             2.3.0              Tag field for SilverStripe
silverstripe/userforms                            5.4.1              UserForms enables CMS users to create ...
silverstripe/vendor-plugin                        1.4.0              Allows vendor modules to expose direct...
silverstripe/versioned                            1.4.1              SilverStripe Versioned component
silverstripe/versioned-admin                      1.2.1              SilverStripe versioned admin interface
stevie-mayhew/silverstripe-svg                    2.2.0              Basic SVG support for SilverStripe
swiftmailer/swiftmailer                           v5.4.12            Swiftmailer, free feature-rich PHP mailer
symbiote/silverstripe-gridfieldextensions         3.2.1              A collection of useful grid field comp...
symfony/cache                                     v3.4.30            Symfony Cache component with PSR-6, PS...
symfony/config                                    v3.4.30            Symfony Config Component
symfony/filesystem                                v4.3.3             Symfony Filesystem Component
symfony/finder                                    v3.4.30            Symfony Finder Component
symfony/polyfill-apcu                             v1.11.0            Symfony polyfill backporting apcu_* fu...
symfony/polyfill-ctype                            v1.11.0            Symfony polyfill for ctype functions
symfony/polyfill-mbstring                         v1.11.0            Symfony polyfill for the Mbstring exte...
symfony/polyfill-php72                            v1.11.0            Symfony polyfill backporting some PHP ...
symfony/translation                               v2.8.50            Symfony Translation Component
symfony/var-dumper                                v4.3.3             Symfony mechanism for exploring and du...
symfony/yaml                                      v3.4.30            Symfony Yaml Component
theseer/tokenizer                                 1.1.3              A small library for converting tokeniz...
tractorcow/classproxy                             0.1.2             
tractorcow/silverstripe-autocomplete              4.0.0-beta1        Autocomplete text field for Silverstripe
tractorcow/silverstripe-proxy-db                  0.1.0             
unclecheese/display-logic                         2.0.2              Allows assignment of conditions for di...
undefinedoffset/silverstripe-nocaptcha            2.0.4              A spam protector and form field using ...
undefinedoffset/sortablegridfield                 2.0.8              Adds drag and drop functionality to Si...
webmozart/assert                                  1.4.0              Assertions to validate method input/ou...
webonyx/graphql-php                               v0.12.6            A PHP port of GraphQL reference implem...
willdurand/geocoder                               v3.3.0             The almost missing Geocoder PHP 5.4 li...
wilr/silverstripe-googlesitemaps                  2.1.5              SilverStripe support for the Google Si...
zendframework/zend-diactoros                      1.8.6              PSR HTTP Message implementations

Following configuration at app/_config/requirements.yml resolved the issue:

SilverStripe\View\Requirements:
  disable_flush_combined: true
SilverStripe\View\Requirements_Backend:
  combine_in_dev: true
  combine_hash_querystring: true
  default_combined_files_folder: 'combined'
SilverStripe\Core\Injector\Injector:
  # Create adapter that points to the custom directory root
  SilverStripe\Assets\Flysystem\PublicAdapter.custom-adapter:
    class: SilverStripe\Assets\Flysystem\PublicAssetAdapter
    constructor:
      Root: ./app/javascript
  # Set flysystem filesystem that uses this adapter
  League\Flysystem\Filesystem.custom-filesystem:
    class: 'League\Flysystem\Filesystem'
    constructor:
      Adapter: '%$SilverStripe\Assets\Flysystem\PublicAdapter.custom-adapter'
  # Create handler to generate assets using this filesystem
  SilverStripe\Assets\Storage\GeneratedAssetHandler.custom-generated-assets:
    class: SilverStripe\Assets\Flysystem\GeneratedAssets
    properties:
      Filesystem: %$League\Flysystem\Filesystem.custom-filesystem
  # Assign this generator to the requirements builder
  SilverStripe\View\Requirements_Backend:
    properties:
      AssetHandler: '%$SilverStripe\Assets\Storage\GeneratedAssetHandler.custom-generated-assets'

Don't know why had no time to debug

@a2nt

This comment has been minimized.

Copy link
Contributor

@a2nt a2nt commented Aug 5, 2019

UPD: made a request to /admin/pages?flush, confirmed action - the issue reappeared, made another request to /dev/build?flush - the issue disappeared

@dnsl48

This comment has been minimized.

Copy link
Member

@dnsl48 dnsl48 commented Aug 12, 2019

the issue reappeared

is it still the same issue that was reported in the first message?

@a2nt

This comment has been minimized.

Copy link
Contributor

@a2nt a2nt commented Aug 13, 2019

the issue reappeared

is it still the same issue that was reported in the first message?

unable to load tinyMCE from assets/_tinymce/tinymce-cms-hash.js
and as the result tinyMCE.editor initializing function is undefined

I suppose tinymce-cms-hash.js file deleted on ?flush, but SS doesn't regenerate it without /dev/build
So something wrong happens on ?flush and looks like /dev/build?flush sometimes doesn't regenerate the file too

@dnsl48 dnsl48 reopened this Aug 13, 2019
@dnsl48 dnsl48 added effort/hard and removed effort/easy labels Aug 13, 2019
@robbieaverill

This comment has been minimized.

Copy link
Member

@robbieaverill robbieaverill commented Aug 22, 2019

I haven't been able to reproduce this issue yet on my local dev environment, but I can see how it could potentially be an issue.

When you flush from the frontend, TinyMCECombinedGenerator::flush() is called which deletes the TinyMCE JavaScript file. The is regenerated via HTMLEditorField::Field() which calls TinyMCEConfig::init() - this in turn calls TinyMCECombinedGenerator::generateContent() via a chain.

If you were to do this on a scaled server setup where the assets folder hasn't had a chance to synchronise between instances, there may be a short period of time where you could experience this issue.

There were some notes that this was reproducible in a local (single) environment though, which is interesting.

We might be able to regenerate the file content on flush after it has been deleted - the problem with that is that flush() doesn't care about which TinyMCE config instance is active, it just nukes all of them. We could easily regenerate the default config by adding static::singleton()->getScriptURL(TinyMCEConfig::get()) after it has deleted the folder.

It sounds like the browser call to get the JS is happening before it has been generated. Since the Requirements call that adds it (TinyMCEConfig::init()) internally generates it if it doesn't exist, I'm not really sure why this would happen anyway.

Some thoughts anyway - I'm not able to reproduce this

@dawb

This comment has been minimized.

Copy link

@dawb dawb commented Sep 3, 2019

@a2nt is the error only appearing on pages using the GoogleMapField by chance? We are experiencing the issue and it only seems to occur when navigating from another page to one that uses that field.

@NightJar

This comment has been minimized.

Copy link
Contributor

@NightJar NightJar commented Sep 3, 2019

Nice spotting @dawb - are you able to provide any further context from the developer tools on those pages with the GoogleMapField? e.g. a 404 to some tinymce.js (or similar), console errors, etc.

@a2nt

This comment has been minimized.

Copy link
Contributor

@a2nt a2nt commented Sep 6, 2019

@robbieaverill I have made some investigations.
Modules may change TinyMCE config, all configs will be deleted on /dev/build.

Take a look to:
https://github.com/dnadesign/silverstripe-elemental/blob/4/src/Forms/EditFormFactory.php

Config of TinyMCE was changed but it won't be regenerated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.