Unable to delete a block

Permalink
Hi everyone, i'm currently having a problem with a block.
I did several things with it, including trying to copy and modify it to make a second version of it, slightly modified and using the same db. After horrible bugs i gave up the idea, but now i'm trying to delete this block type to reinstall it in order to apply some changes.. and here's what i got:

An unexpected error occurred.
mysql error: [-1: No primary key found for table bttunnels] in BlockRecord::UpdateActiveTable(0, 0)

bttunnels is the table used by this block.. and it's got a primary key.

I tried deleting the block's folder and table but it only got concrete5 to crash as soon as i would try to reach the "block types" page.

Anyone have an idea how i could get rid of this problem ?

gloglo
 
cherrycake replied on at Permalink Reply
cherrycake
one quick and dirty suggestion would be to delete the "tunnels" block type entry in the BlockTypes table.

it should be at the bottom somewhere. that should make the block types page show correctly.

be aware though that any pages that uses the block type will most likely crash but that is probably the case already anyway :)
gloglo replied on at Permalink Reply
gloglo
The thing is, i'm trying to delete the block type from the list... but it just crashes whenever i'm trying it.
It sends me to this page when i'm clicking on "remove", and also when i'm going to a page where this block is..

Screenshot =>
http://imgur.com/hkhThJu
mnakalay replied on at Permalink Reply
mnakalay
You might have to delete it directly in the database.
gloglo replied on at Permalink Reply
gloglo
I deleted the table bttunnels but it didn't change anything at all,
Same bug (see screenshot) when i try to delete the block or when i go to a page where the block is
cherrycake replied on at Permalink Reply
cherrycake
sorry i wasn't being clear enough.

what i meant was you should delete the tunnels block type entry in the BlockTypes database table, not in the dashboard.

the page crashes because concrete thinks you have a block type because of the entry in the database table but can't find it and crashes because the bttunnels table is gone.
gloglo replied on at Permalink Reply
gloglo
Haaa yeah sorry, it's my fault i should have understood.
But...

I just checked and my block type isn't there :x
It's not in the blocktypes database..