question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

remote storage load-method fired twice on-load

See original GitHub issue

I’ve encountered a small issue, where the initial data is being loaded twice on init (when autoload: true is set).
My config:

lp.builder = grapesjs.init({
    clearOnRender: true,
    plugins: ['gjs-preset-newsletter'],
    pluginsOpts: {
        'gjs-preset-newsletter': {
            '...':'...'
        }
    },
    assetManager: {
        storeOnChange: true,
        storeAfterUpload: true,
        upload: 'upload_assets/',
        beforeSend: lp.addCsrfTokenHeader
    },
    storageManager: {
        id: '',
        type: 'remote',
        autosave: true,
        autoload: true,
        stepsBeforeSave: 5,
        storeComponents: false,
        storeStyles: false,
        storeHtml: true,
        storeCss: true,
        urlStore: 'save/',
        urlLoad: 'load/',
        beforeSend: lp.addCsrfTokenHeader,
        onComplete: lp.resetSaveButton
    }
});

When I try to listen to 'storage:load'-event from editor, nothing is being logged, but Chrome’s network-tab shows 2 xhr-requests to urlLoad endpoint.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
artfcommented, Sep 5, 2017
0reactions
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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

jQuery event firing twice after .load() - javascript - Stack Overflow
I've come across an issue where jQuery events fire twice after $.load() is called. The event handler is placed in the load() callback ......
Read more >
lightning:recordEditForm onLoad being called twice
I have a lightning:recordEditForm that is calling "onload" function twice, there is a parameter on the event to prevent that like we have ......
Read more >
the page load event execute twice - Microsoft Q&A
The Page_load fires once unless the page is called twice or in very rare cases the Page_Load event is manually called. the code...
Read more >
Vesper: Measuring Time-to-Interactivity for Modern Web Pages
Abstract. Everyone agrees that web pages should load more quickly. However, a good definition for “page load time” is elusive. We argue that,...
Read more >
Release Notes | Ext JS 5.0.1 - Sencha Documentation
EXTJS-12962 TreeStore datachanged is not fired when data is changed; EXTJS-13049 Tree ... EXTJS-14107 Tree fires double sortchange event when sort changes ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found