Concrete 5.8 , page in dashboard - Call to a member function generate() on a non-object
Permalink 1 user found helpful
Hi
I have a problem with apply my addon from Concrete 5.7 to 5.8 .
I didn't have problem with install but in dashboard.
When I go to page in my package, I can see error:
Call to a member function generate() on a non-object
So I ran debbug mode and the problem is in "/concrete/themes/dashboard/view.php" file in line 10.
The problem is $token variable . It's NULL.
To resolve this problem I have to edit /concrete/themes/dashboard/view.php by adding:
How can I resolve problem without edit core ?
I have a problem with apply my addon from Concrete 5.7 to 5.8 .
I didn't have problem with install but in dashboard.
When I go to page in my package, I can see error:
Call to a member function generate() on a non-object
So I ran debbug mode and the problem is in "/concrete/themes/dashboard/view.php" file in line 10.
The problem is $token variable . It's NULL.
To resolve this problem I have to edit /concrete/themes/dashboard/view.php by adding:
$token = Core::make('helper/validation/token');
How can I resolve problem without edit core ?
It is my addon - dsEventCalendarPro for Concrete 5.7.
If you want, I can add you license to test it.
I've tested on fresh instance of Concrete 5.
If you want, I can add you license to test it.
I've tested on fresh instance of Concrete 5.
@IceManSpy
If you grant me a license, I will test with it.
If you grant me a license, I will test with it.
I granted license.
Please, check it, because I don't know, why my add on make conflict with core.
Please, check it, because I don't know, why my add on make conflict with core.
@IceManSpy
The problem is in your single page controllers. You are adding a CSS file to your views using the on_before_render() method. This is breaking the dashboard view.
As a solution, I beleive you can add $this->addFooterItem(Loader::helper('html')->css('dsStyle.css', 'dsEventCalendarPro')); inside your view() method.
The problem is in your single page controllers. You are adding a CSS file to your views using the on_before_render() method. This is breaking the dashboard view.
public function on_before_render() { $this->addFooterItem(Loader::helper('html')->css('dsStyle.css', 'dsEventCalendarPro')); }
As a solution, I beleive you can add $this->addFooterItem(Loader::helper('html')->css('dsStyle.css', 'dsEventCalendarPro')); inside your view() method.
Thank you.
I think, that is good solution.
I will release new version with this fixes.
I think, that is good solution.
I will release new version with this fixes.
Have you tried this solution and it worked? I am facing the same error message on a custom block but the fix did not do anything. Where have you put the css reference?
Thank you!
Thank you!
Yes, it helped me to my addon.
I cannot confirm this. I tested with a 5.7 to v8 install and a fresh v8 install.
When I check the value of $token in that file, it is a Concrete\Core\Validation\CSRF\Token class object.
Do you see this error only when you use a specific add-on?