Jump to content

JavaScript error - 'invalid json in alfred' but I'm not outputting any json to the block


FireWire
 Share

Recommended Posts

First time I've run into this. I have a block called "Quote" and I've used it on one template but started getting this error when using it on a different template.

image.png.33c219ea3d8b6ee388d1682fcaea6d10.png

I removed all of my block markup but still getting the error.

image.png.743fc237599ca75acba326adbffd446a.png

It looks like the {alfred($block)} call is inserting JSON into the element

image.thumb.png.6da06aa4735600e09eca64a7c98ec189.png

I feel like there's something I'm missing but can't figure out what would be causing it and not sure where to start looking.

 

Link to comment
Share on other sites

Hey @FireWire the error does not come from block markup, it comes from the {alfred()} call, as the error message tells.

Alfred needs a json to get all block settings and it should look like this in the source code (don't use the devtools here):

uUyTewe.png

Also look into the console - it should log the element with the wrong alfred json. Once we know the json we can see how to fix it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...