Blocks in Package not installing in 5.6

I have a package with 3 blocks. When installing this package on, everything works fine. But when installing it on 5.6, the blocks don't install. What is going on?

Here is the install code for the blocks:

$pkg = parent::install();
BlockType::installBlockTypeFromPackage('create_events', $pkg); 
BlockType::installBlockTypeFromPackage('customer_enroll', $pkg); 
BlockType::installBlockTypeFromPackage('schedule_display', $pkg);

View Replies: View Best Answer
andrew replied on at Permalink Reply
Try taking the block out of the package, disabling the override cache, putting the block in the blocks directory and installing it manually. See if you get an error

Sent from my iPhone
ideasponge replied on at Permalink Reply
I got this error when installing manually via the Block Types screen.

Error: Block Type table must contain at least two fields.

The block in question has no options during Add/Edit.
andrew replied on at Permalink Best Answer Reply
If it has no options, just remove the $btTable field from the block controller.
ideasponge replied on at Permalink Reply
Awesome thanks. That solved it. Also removed the db.xml file since it is not needed.
ideasponge replied on at Permalink Reply
Ahh yes it seems that the previously mentioned Error s what is causing this to break in 5.6. I added an extra field to the db.xml file and that block installed just fine manually AND with the package.

Strange that I am not getting this error reported during install with the package though. Is this a bug I should post in the tracker?
hutman replied on at Permalink Reply
I tried stepping through this with my debugger and didn't see what would cause it, either. Sorry. It was trying to autoload the class so I added Loader::model('block_types') above it and it seemed to find the class properly and call the install routine on it, I walked down as far as installing the DB and it appeared to hit that fine...