Page not found on controller of dashboard single page
Permalink
Hi,
I have a 5.7 package and it installs a single page in the dashboard which is located under dashboard/system/seo.
The page displays nicely however when I try to do an action (using a form and $this->action('actionHere') ) I get 'Page not found'.
This means the controller is not found. However i've tried almost anything i could find...
- flush/clear cache
- check , recheck namespace
- check controller name and extends
- look at the core single page controllers under system/seo and compair
- follow the immigration tutorial for packages from 5.6 -> 5.7
- tested in 5.7.0.2 and 5.7.2
- ....
Anyway I can't find the mistake , the package, single page and controller is called seo_headers
top of the controller:
in the single page:
I have a 5.7 package and it installs a single page in the dashboard which is located under dashboard/system/seo.
The page displays nicely however when I try to do an action (using a form and $this->action('actionHere') ) I get 'Page not found'.
This means the controller is not found. However i've tried almost anything i could find...
- flush/clear cache
- check , recheck namespace
- check controller name and extends
- look at the core single page controllers under system/seo and compair
- follow the immigration tutorial for packages from 5.6 -> 5.7
- tested in 5.7.0.2 and 5.7.2
- ....
Anyway I can't find the mistake , the package, single page and controller is called seo_headers
top of the controller:
namespace Concrete\Package\SeoHeaders\Controller\SinglePage\Dashboard\System\Seo; use \Concrete\Core\Page\Controller\DashboardPageController; use Loader; class SeoHeaders extends DashboardPageController { public function someFunction() {
in the single page:
I am having same issue on 5.6, I have figure out my namespace issue but my function still does not run, please see here:https://www.concrete5.org/community/forums/customizing_c5/call-to-co...
Yeah I would verify that the controller is found by adding a method named view to it. Then in that method just type exit; if the page exits properly you know the controller is well formed. If not the controller isn't being found for some reason. Probably a name space issue.
The view method is already present with an exit but that does not work either.
What the methods do is only an insert, update or delete from the database. So the only thing that should be loaded is the Loader. (at least to my understanding)
What the methods do is only an insert, update or delete from the database. So the only thing that should be loaded is the Loader. (at least to my understanding)
what is the path of the controller file ?
yourpackage\controllers\single_page...etc ?
it's different from the view:
\yourpackage\single_pages ... etc
(singular form)
yourpackage\controllers\single_page...etc ?
it's different from the view:
\yourpackage\single_pages ... etc
(singular form)
from the root:
packages/seo_headers/single_pages/dashboard/system/seo/seo_headers.php
packages/seo_headers/controllers/dashboard/system/seo/seo_headers.php
packages/seo_headers/single_pages/dashboard/system/seo/seo_headers.php
packages/seo_headers/controllers/dashboard/system/seo/seo_headers.php
try to put the controller in
packages/seo_headers/controllers/single_page/dashboard/system/seo/seo_headers.php
packages/seo_headers/controllers/single_page/dashboard/system/seo/seo_headers.php
Thanks a lot ... this was the error. Is this a new thing in version 5.7 ?
controllers/certain page type/.....
controllers/certain page type/.....
np and yes, it's described by andrew's:
http://www.concrete5.org/documentation/how-tos/developers/concrete5...
under "Controller Reorganization"
http://www.concrete5.org/documentation/how-tos/developers/concrete5...
under "Controller Reorganization"
Make sure that all the namespaces that you need in your controller are included. You may have to use the full path with an 'as' keyword.
good luck