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:
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);
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.
Error: Block Type table must contain at least two fields.
The block in question has no options during Add/Edit.
If it has no options, just remove the $btTable field from the block controller.
Awesome thanks. That solved it. Also removed the db.xml file since it is not needed.
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?
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?
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...
Sent from my iPhone