Error Only When First Adding Block

Permalink
I am working on an image slider block, and I am getting a white page of death that only shows this:
{"message":null,"title":null,"time":"2016-09-05 11:04:49","redirectURL":"","btID":"108","bID":"481","arHandle":"Main","aID":"659","cID":"212","pages":[{"name":"CameraCRETE","cID":"212"}]}


This only happens when you first add the block. I have found that if you hit the "back" button, then publish the page, the block shows up and you can edit the block without issue.

Any ideas what might be causing this?

PineCreativeLabs
 
Gondwana replied on at Permalink Reply
Gondwana
I don't suppose you're relying on isEditMode(), by chance? I've found this to be unreliable, with the occasional result that newly-added blocks get processed as though isEditMode() were false, resulting in Bad Things.
PineCreativeLabs replied on at Permalink Reply
PineCreativeLabs
I've since figured out the problem.

Turns out, I was using a variable that was conflicting with the block table.

I was using "time" as one of the columns in my block table, which was causing the conflict. So, by changing "time" to something unique, this fixed the issue.