Package Upgrade bug
Permalink 1 user found helpful
Hi,
I am trying to upgrade a package to 8.3 from 5.6.
I am using this tutorial.
https://documentation.concrete5.org/developers/working-with-blocks/c...
I am getting this error and I don't know why, or how to fix it.
This is my log file
This is my some bits of my code.
I am trying to upgrade a package to 8.3 from 5.6.
I am using this tutorial.
https://documentation.concrete5.org/developers/working-with-blocks/c...
I am getting this error and I don't know why, or how to fix it.
Class does not exist
This is my log file
start install start addEveryTime addEveryTime 2 addEveryTime 3 start addBlockType addBlockType 1 addBlockType 2 addBlockType 3
This is my some bits of my code.
<?php namespace Concrete\Package\SampleRequest; defined('C5_EXECUTE') or die(_("Access Denied.")); use Concrete\Core\Package\Package; use Concrete\Core\Block\BlockController; use Concrete\Core\Block\BlockType\BlockType; use Core; class Controller extends Package { public function addEveryTime() { $this->logx('start addEveryTime'); // $this->addSinglePage("/dashboard/sample_request", false); $this->logx('addEveryTime 2'); // $this->addSinglePage("/dashboard/sample_request/download", false); $this->logx('addEveryTime 3'); $this->addBlockType("sample_request");
Viewing 15 lines of 31 lines. View entire code block.
Why don't you use a tool like xDebug to step through the code?
If you enable the full debug settings in the dashboard, you will get more detailed info on which class it is that doesn't exist.
Hi,
Thanks. I didn't even know that was there.
I am new to Concreate5.
According to the stack trace it is successfully calling installBlockType, but it doesn't say what the wrong class is. It would appear to be an error in the Concreate5 framework.
So I am still at a loss.
Thanks. I didn't even know that was there.
I am new to Concreate5.
According to the stack trace it is successfully calling installBlockType, but it doesn't say what the wrong class is. It would appear to be an error in the Concreate5 framework.
So I am still at a loss.
Probably the wrong namespace for your Block Type (BT)? Where is your controller for the BT located and what is the namespace (and its classname)?
The block is located at:
packages/sample_request/blocks/sample_request
The package name space is:
namespace Concrete\Package\SampleRequest;
The block name space is:
namespace Packages\SampleRequest\Block\SampleRequest;
The package class is:
class Controller extends BlockController
Hmm, should the package name space be?
Concrete\Package\SampleRequest\Block\SampleRequest;
Or what should it be?
packages/sample_request/blocks/sample_request
The package name space is:
namespace Concrete\Package\SampleRequest;
The block name space is:
namespace Packages\SampleRequest\Block\SampleRequest;
The package class is:
class Controller extends BlockController
Hmm, should the package name space be?
Concrete\Package\SampleRequest\Block\SampleRequest;
Or what should it be?
If your package's namespace is:
namespace Concrete\Package\SampleRequest;
then your BT's namespace is:
namespace Concrete\Package\SampleRequest\Block\SampleRequest;
namespace Concrete\Package\SampleRequest;
then your BT's namespace is:
namespace Concrete\Package\SampleRequest\Block\SampleRequest;
Thank you.
That did it.
And thank you for introducing me to the Debug Settings.
That did it.
And thank you for introducing me to the Debug Settings.