Custom Blocks in 5.6.0.2
Permalink
I've been trying to add a custom block for a concrete5 install. I have built several and have had them running for quite some time. I keep receiving this error mysql error.
The documented custom block template found here gave me the same error.http://www.concrete5.org/documentation/how-tos/developers/understan...
Is there a way to set btDisplayOrder in a custom block that has not been documented yet? It seems like it should be a pretty simple solution. I don't really want to create a package. Is this something anyone else has encountered? I searched the forums, it seems that most of the btDisplayOrder errors had to do with developed packages(Designer Content, Tweetcrete). I could not find any for the developer end concerning custom blocks.
I'm using version 5.6.0.2 and I have cleared cached.
mysql error: [1048: Column 'btDisplayOrder' cannot be null]
The documented custom block template found here gave me the same error.http://www.concrete5.org/documentation/how-tos/developers/understan...
mysql error: [1048: Column 'btDisplayOrder' cannot be null] in EXECUTE("INSERT INTO BlockTypes(btID,btHandle,btName,btDescription,btActiveWhenAdded,btCopyWhenPropagate,btIncludeAll,btIsInternal,btInterfaceWidth,btInterfaceHeight,pkgID,btDisplayOrder) VALUES (NULL,'basic_test','Basic Test','A simple testing block for developers',1,0,0,0,'350','300',0,NULL)")
Is there a way to set btDisplayOrder in a custom block that has not been documented yet? It seems like it should be a pretty simple solution. I don't really want to create a package. Is this something anyone else has encountered? I searched the forums, it seems that most of the btDisplayOrder errors had to do with developed packages(Designer Content, Tweetcrete). I could not find any for the developer end concerning custom blocks.
I'm using version 5.6.0.2 and I have cleared cached.
Thanks for the reply. The block I'm making can't be made in designer content. I was careful to follow naming conventions. That's part of why I tried to install the custom block that franz had in the tutorial.
I'm installing this by uploading it to the blocks folder.
directory - blocks/mb_user_list/
controller - MbUserListBlockController extends BlockController
btTable - btMbUserList
I'm installing this by uploading it to the blocks folder.
directory - blocks/mb_user_list/
controller - MbUserListBlockController extends BlockController
btTable - btMbUserList
The problem involved an error that occurred when I updated to version 5.6.0.2 My current version was 5.6.0.2 but there was still the option to update. Seemed kind of strange, I'm not quite sure why but this prevented any blocks from being installed. All I did to fix it was apply the update to 5.6.0.2 again.
As a check you could try generating the same block using designer content (either fully, or with just a dummy field), and see how the names of all the components compare.