modxcms / Collections

An Extra for MODX Revolution that provides for Resource Collections managed by CollectionContainer Resources
GNU General Public License v2.0
53 stars 37 forks source link

Fred 3.0.0 fails with JS error on MODX 2.8.7, Collections 3.7.1 ? #368

Closed martinf55 closed 1 month ago

martinf55 commented 2 months ago

Fred 3.0.0 MODX 2.8.7 Collections 3.7.1 Chrome 126

Fred fails in the "Preparing Content" phase with a Javascript error:

Uncaught (in promise) TypeError: Class constructor Oi cannot be invoked without 'new'
    at new o (fred_integration.js:1:2218)
    at fred.min.js?v=d31060:2:598235
    at Array.forEach (<anonymous>)
    at Wi (fred.min.js?v=d31060:2:598208)
    at Gi.render (fred.min.js?v=d31060:2:599370)
    at new Gi (fred.min.js?v=d31060:2:599096)
    at Xi.renderComponents (fred.min.js?v=d31060:2:606277)
    at Xi.loadContent (fred.min.js?v=d31060:2:608369)
    at async Xi.init (fred.min.js?v=d31060:2:614562)
    at async HTMLDocument.<anonymous> (fred.min.js?v=d31060:2:603463)
o @ fred_integration.js:1
(anonymous) @ fred.min.js?v=d31060:2
Wi @ fred.min.js?v=d31060:2
render @ fred.min.js?v=d31060:2
Gi @ fred.min.js?v=d31060:2
renderComponents @ fred.min.js?v=d31060:2
loadContent @ fred.min.js?v=d31060:2

When rendering the Fred components, the array contains a function pointer for Collections instead of a class like the other entries, which seems to trigger the error?

image
matdave commented 2 months ago

This is more an issue with Collections. The revo 2.x branch needs to be rebuilt.

matdave commented 1 month ago

I've updated Collections for revo 2.x work with the latest version of Fred.