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

Not works with jquery #440

Closed
ateshuseyin opened this issue Oct 20, 2017 · 8 comments
Closed

Not works with jquery #440

ateshuseyin opened this issue Oct 20, 2017 · 8 comments
Labels

Comments

@ateshuseyin
Copy link
Contributor

ateshuseyin commented Oct 20, 2017

I use jquery in my project. After version 0.12.8 it does not work with jquery.

Prt of my webpack.config is;

resolve: {
    modules: [
      path.resolve(__dirname, 'node_modules/grapesjs/src'),
      path.resolve(__dirname, 'node_modules')
    ],
    alias: {
      'cash-dom': 'jquery'
    }
  },
  externals: {
    'jquery': 'jQuery'
  },

When I try to drop a block it throws;

ComponentsView.js:76 Uncaught TypeError: Cannot read property 'length' of undefined
at child.addToCollection (ComponentsView.js:76)
at child.addTo (ComponentsView.js:22)
at triggerEvents (backbone.js:371)
at triggerApi (backbone.js:356)
at eventsApi (backbone.js:155)
at child.Events.trigger (backbone.js:346)
at child._onModelEvent (backbone.js:1187)
at triggerEvents (backbone.js:372)
at triggerApi (backbone.js:357)
at eventsApi (backbone.js:155)

@artf
Copy link
Member

artf commented Oct 23, 2017

Do you get the same error with all of your blocks? Even with some official one?

@ateshuseyin ateshuseyin mentioned this issue Oct 24, 2017
@ateshuseyin
Copy link
Contributor Author

Right. I get the same error with all blocks defined in mjml plugin.

@artf
Copy link
Member

artf commented Oct 24, 2017

Ok, I'd like to understand if it's something related to jquery. Are you able to reproduce it without the mjml plugin? (latest version)

@ateshuseyin
Copy link
Contributor Author

I try to run mjml plugin with several versions of grapesjs. mjml plugin works with 0.12.6 and older but get above error with 0.12.7 and newer

@ateshuseyin
Copy link
Contributor Author

Ok. I will try without mjml plugin

@artf
Copy link
Member

artf commented Oct 25, 2017

Can you reproduce it with http://codesandbox.io please?

@ateshuseyin
Copy link
Contributor Author

@artf This issue is about mjml plugin. This can be closed. I will open an issue to mjml plugin

@lock
Copy link

lock bot commented Sep 18, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the outdated label Sep 18, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Sep 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants