Block Install Error
Permalink
I am trying to move a block from my staging server to a live server. But I am getting this error on the live server when displaying Block Types in the dashboard.
I tried removing all but the essential code form the controller and still get the error.
This is my skeleton code.
I tried putting the Hello World up there and it did work. And I don't see any significant difference between Hello World and this code.
The live server is:
# concrete5 Version Core Version - 8.3.0RC1
# PHP Version 5.6.31
The staging server is:
# concrete5 Version Core Version - 8.3.1
# PHP Version 7.1.1
Gary
An unexpected error occurred. Class does not exist
I tried removing all but the essential code form the controller and still get the error.
This is my skeleton code.
<?php namespace Application\Block\Appointment; use Concrete\Core\Block\BlockController; use Core; defined('C5_EXECUTE') or die(_("Access Denied.")); class Controller extends BlockController { protected $btTable = 'btAppointment'; protected $btInterfaceWidth = "700"; protected $btInterfaceHeight = "450"; protected $btDefaultSet = 'basic'; public function getBlockTypeName() { return t('Appointment'); }
Viewing 15 lines of 21 lines. View entire code block.
I tried putting the Hello World up there and it did work. And I don't see any significant difference between Hello World and this code.
The live server is:
# concrete5 Version Core Version - 8.3.0RC1
# PHP Version 5.6.31
The staging server is:
# concrete5 Version Core Version - 8.3.1
# PHP Version 7.1.1
Gary
In your code, take out the defined('C5.. line
That's not needed in files that define PHP classes, it's only required in 'view' related templates like view.php, edit.php, etc.