modxcms / fred

The friendly front-end editor for visual, drag-and-drop content building in MODX CMS
https://fred.modx.com
MIT License
57 stars 25 forks source link

Unhandled Promise Rejection: TypeError: Cannot call a class constructor without |new| #493

Closed lottaar closed 5 months ago

lottaar commented 5 months ago

When working in Fred suddenly I can't load the front-end anymore. All I see is Fred's spinning "Preparing content" graphic. Get this error in the console:

Unhandled Promise Rejection: TypeError: Cannot call a class constructor without |new| (anonymous function) fred.min.js:20:476268

Also these warnings: [Warning] @babel/polyfill is loaded more than once on this page. This is probably not desirable/intended and may have consequences if different versions of the polyfills are applied sequentially. If you do need to load the polyfill more than once, use @babel/polyfill/noConflict instead to bypass the warning. (fredrtetinymce.min.js, line 1) [Warning] @babel/polyfill is loaded more than once on this page. This is probably not desirable/intended and may have consequences if different versions of the polyfills are applied sequentially. If you do need to load the polyfill more than once, use @babel/polyfill/noConflict instead to bypass the warning. (fredfaeditor.min.js, line 1)

I tried uninstalling Fred and installing again, clearing cache etc, with no luck. Also tried different pages, different browsers and restarting MAMP.

Fred 2.1.5-pl PHP 8.2/Apache/MAMP

lottaar commented 5 months ago

Replacing fred.min.js with the version from Fred 2.1.4 seems to fix it.

matdave commented 5 months ago

@lottaar do you have Collections installed? I believe that needs to be updated.

matdave commented 5 months ago

To clarify, the REPO needs updated, not the extra. If you disable the Collection onFred events it should work again.

matdave commented 5 months ago

I've updated Collections to support newer versions of Fred.

lottaar commented 5 months ago

@matdave Great, thank you!

modxcommunity commented 2 weeks ago

This issue has been mentioned on MODX Community. There might be relevant details there:

https://community.modx.com/t/problem-upgrading-fred-to-version-3-0-in-modx-2-8-7/7915/13