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

Chrome throws "Uncaught TypeError: Cannot read property 'save' of undefined" on every mosaic save #421

Open
fredvd opened this issue Sep 3, 2018 · 1 comment

Comments

@fredvd
Copy link
Member

fredvd commented Sep 3, 2018

While debugging another mosaic I notice that the latest relased mosaic 2.1.1 with Plone 5.1 throws a javascript error in the Chrome browser console on every save.

to reproduce, install mosaic, activat mosaic layout on the homepage, edit and select basic layout, press save.
javascript_error_on_save

It seems Browser specific as Firefox is not showing the same error. When I enable developer mode and develop javascript on the plone-logged-in bundle it goes into pattern.js, but I have no clue how to debug this further.

VM559 pattern.js:428 Uncaught TypeError: Cannot read property 'save' of undefined
at HTMLFormElement. (VM559 pattern.js:428)
at HTMLFormElement.dispatch (VM543 jquery.min.js:4)
at HTMLFormElement.t.dispatch (VM552 plone-compiled.min.js:1)
at HTMLFormElement.r.handle (VM543 jquery.min.js:4)
at Object.trigger (VM543 jquery.min.js:4)
at HTMLInputElement. (VM543 jquery.min.js:4)
at Function.each (VM543 jquery.min.js:2)
at m.fn.init.each (VM543 jquery.min.js:2)
at m.fn.init.trigger (VM543 jquery.min.js:4)
at m.fn.init.m.fn.(:9090/Plone/front-page/anonymous function) [as click] (http://localhost:9090/Plone/++plone++static/components/jquery/dist/jquery.min.js:5:15442)

Editing of the title/Description field contents works though. Customizing and reordering both tiles and saving also persists.

javascript_error_on_save

@djay
Copy link
Member

djay commented Jun 4, 2021

I'm getting a similar error on 5.2 when using mosaic on a collection. Differences are that it says "Changes you have saved may not be saved".
It will still save if you click "leave".

logged-in.js:5 Uncaught TypeError: Cannot read property 'save' of undefined
    at HTMLFormElement.<anonymous> (logged-in.js:5)
    at HTMLFormElement.dispatch (default.js:3)
    at HTMLFormElement.p.dispatch (logged-in.js:3)
    at HTMLFormElement.r.handle (default.js:3)
    at Object.trigger (default.js:3)
    at HTMLInputElement.<anonymous> (default.js:3)
    at Function.each (default.js:2)
    at n.fn.init.each (default.js:2)
    at n.fn.init.trigger (default.js:3)
    at n.fn.init.n.fn.<computed> [as click] (default.js:4)
(anonymous) @ logged-in.js:5
dispatch @ default.js:3
p.dispatch @ logged-in.js:3
r.handle @ default.js:3
trigger @ default.js:3
(anonymous) @ default.js:3
each @ default.js:2
each @ default.js:2
trigger @ default.js:3
n.fn.<computed> @ default.js:4
(anonymous) @ plone-mosaic.js:3
dequeue @ default.js:3
(anonymous) @ default.js:3
each @ default.js:2
each @ default.js:2
queue @ default.js:3
e.mosaic.queue @ plone-mosaic.js:3
exec @ plone-mosaic.js:3
(anonymous) @ plone-mosaic.js:3
each @ default.js:2
each @ default.js:2
e.fn.mosaicExecAction @ plone-mosaic.js:3
(anonymous) @ plone-mosaic.js:2
dispatch @ default.js:3
p.dispatch @ logged-in.js:3
r.handle @ default.js:3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants