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.
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');
    }


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

gwardell
 
mesuva replied on at Permalink Reply
mesuva
I'd suggest going to /index.php/dashboard/system/environment/debug and turning on 'Show the debug error output' - that then outputs a detailed error message that you can screenshot for more clues.

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.