Ju99ernaut / grapesjs-template-manager

Template and page manager for grapesjs
MIT License
79 stars 35 forks source link

Open projects and templates not working #26

Closed huzaifaazim0 closed 2 years ago

huzaifaazim0 commented 2 years ago

Hello, I just installed the plugin and perform the exact steps in the docs and the open project button is failing with the below error

TypeError: t.loadAll is not a function. (In 't.loadAll((function(t){e({sites:t,loading:!1})}),(function(e){return console.log("Error",e)}))', 't.loadAll' is undefined)

my configuration

`var editor = grapesjs.init({ height: '100%', showOffsets: 1, noticeOnUnload: 0, storageManager: { autoload: 0 }, container: '#gjs', fromElement: true, pageManager: true,

    plugins: ['gjs-preset-webpage','grapesjs-project-manager','gjs-aviary'],
    pluginsOpts: {
      'gjs-preset-webpage': {},
      'gjs-aviary': {/* ...options */}
    }
  });

  // Running commands from panels
  const pn = editor.Panels;
  pn.addButton('options', {
      id: 'open-templates',
      className: 'fa fa-folder-o',
      attributes: {
          title: 'Open projects and templates'
      },
      command: 'open-templates', //Open modal 
  });
  pn.addButton('views', {
      id: 'open-pages',
      className: 'fa fa-file-o',
      attributes: {
          title: 'Take Screenshot'
      },
      command: 'open-pages',
      togglable: false
  });`

screenshots of the error are attached

Screenshot 2022-04-30 at 11 26 44 PM Screenshot 2022-04-30 at 11 26 59 PM
huzaifaazim0 commented 2 years ago

Error was just because I didn't use store manager By using store manager error should be fixed