Odd error when saving custom block data..
Permalink 2 users found helpfulI've created a small custom block that lists all files in a fileset and generates download links for them. I used the slideshow block as a template for this as the slideshow block basically produces a list of files in a fileset anyway..
The block works fine for the most part except when I'm adding the block to the page - when I click "Add" I get a blank screen with the following information on it:
{"aID":"317","arHandle":"Newsfeed","cID":"97","error":false,"bID":"249"}
the url that causes this is
index.php?cID=97&arHandle=Newsfeed&btID=52&mode=edit&ccm_token=1273072602:74cd3c9c436f112ab0ba02c2055bbc44
if I then hit "back" in the browser my block has been added successfully and is working fine.. The data has also be inserted into the database as well..
my save() is as follows
What am I doing wrong? Perhaps I just need more sleep.
Thanks all.
the problem came from the auto.js which I'd copied over from the slideshow block (doh).
So deleting auto.js fixed the issue nicely.
I am not going to give myself a gold star for solving this. I am going to stand in the corner for 10 minuted wearing the Dunce Hat instead.
BTW, if you ever need to track down exactly what's going on with these in the future, you'll need to use Firebug and step through the code to see where it fails.
My error was any edits to any content block caused the following error..
{"aID":"4","arHandle":"Main","cID":"1","isGlobalBlock":false,"error":false,"bID":"306"}
I had also copied the auto.js from the slideshow folder it originally resided in to the /blocks/slideshow/ folder in the root.
Not sure what was causing it but it's gone now.
Thanks for updating with your fix.
What's probably happening in your case is you got html for an entire page, but you can't do that because you're putting this mailchimp form in the middle of your C5 page that already exists -- you probably want to find different "embed code" from mailchimp -- something that is specifically for putting into a page on your site, not for an entire page itself.
Wish I could explain it better, but I don't know what terminology they are using over there.
*edit - tried the fix inhttp://www.concrete5.org/community/forums/chat/just-upgraded-to-5-4... (clear cache) - but no joy