Blocks in Package not installing in 5.6

Permalink
I have a package with 3 blocks. When installing this package on 5.5.2.1, 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);

ideasponge
 
andrew replied on at Permalink Reply
andrew
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
ideasponge
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
andrew
If it has no options, just remove the $btTable field from the block controller.
ideasponge replied on at Permalink Reply
ideasponge
Awesome thanks. That solved it. Also removed the db.xml file since it is not needed.
ideasponge replied on at Permalink Reply
ideasponge
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
hutman
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...