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

Specifying data-objectParams-preloadermarkup crashed requests when editing. #8

Open
David-Polehonski opened this issue Mar 29, 2019 · 2 comments

Comments

@David-Polehonski
Copy link

Attempting to specify a value for objectParams.preloadermarkup crashes requests when using the layout manager as the markup is serialised into the URL and can easily exceed browser limits.

I've resolved the issue locally with a custom distribution of mura.js where I've modified the processAync request to use a post request instead.

if(typeof data.preloadermarkup != 'undefined'){
  self.innerHTML = data.preloadermarkup;
} else {
  self.innerHTML = Mura.preloaderMarkup;
}

ajax({
  url: Mura.apiEndpoint + '?method=processAsyncObject',
  type: 'post',
  data: data,
  success: function(resp) {
    handleResponse(obj,resp);
    if (typeof resolve =='function') {
      if(typeof resolve.call == 'undefined'){
	resolve(obj);
      } else { 
        resolve.call(obj.node, obj);
      }
    }
  }
});					
@mattlevine
Copy link
Member

I put in a partial fix. I'm still thinking about any potential issue moving from get to post perhaps related to browser caching or something.

@David-Polehonski
Copy link
Author

Removing the markup from the request should resolve the issue but I could find no evidence to indicate whether this was required on the server-side or not.

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