Ajax Routing v8
Permalink
I've just updated a site and experiencing issues with the routing
I'm getting the following error
The route is set in the package controller as
Can anyone point me in the right direction or help?
I'm getting the following error
Call to undefined method Concrete\Package\CustomPackage\Block\Ajax\Controller::getViewObject()
The route is set in the package controller as
Route::register('/dynamic/page-list', '\Concrete\Package\CustomPackage\Block\Ajax\Controller::getStuff');
Can anyone point me in the right direction or help?
Couple questions, is there a reason you're not using the "standard" Src directory for your ajax route? Also, is there a reason you called your class Controller not something else (anything else)? Controller could very well bring in some unexpected stuff since controller is more or less of a reserved word.
I'm not to sure about the src as I was not responsible for creating this, just debugging the issue. The route is for a custom ajax page_list block, which routes a certain url to a block controller.
I have spent the last couple of days digging into this and managed to get it working.
It turns out it's not an issue with the route, this works correctly.
It's an issue with the way the 5.8 handles some of the previous functions being called from within the getViewObject method.
The date attribute, is now an object and not a string so caused some issues when trying to convert use strtotime.
The previous page list handled the filtering of excluded pages differently (exclude_pagelist, attribute) and the old version now causes some Exceptions.
A few of the files had custom overrides which also caused some issues. So I've replaced those with the new Facade version
I have spent the last couple of days digging into this and managed to get it working.
It turns out it's not an issue with the route, this works correctly.
It's an issue with the way the 5.8 handles some of the previous functions being called from within the getViewObject method.
The date attribute, is now an object and not a string so caused some issues when trying to convert use strtotime.
The previous page list handled the filtering of excluded pages differently (exclude_pagelist, attribute) and the old version now causes some Exceptions.
A few of the files had custom overrides which also caused some issues. So I've replaced those with the new Facade version