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:
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:
echo '<form method="post" action='.$this->action('someFunction').'>';
echo $form->submit('disable', 'Disable', array('class' => 'btn btn-warning btn-mini'));
echo '</form>';

Jozzeh
View Replies: View Best Answer
WillemAnchor replied on at Permalink Reply
WillemAnchor
I ran into a similar problem. It turned out that it was not the file that couldn't be found, but that i had some errors in the controller functions.
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
CaptainPanda replied on at Permalink Reply
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...
andrew replied on at Permalink Reply
andrew
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.
Jozzeh replied on at Permalink Reply
Jozzeh
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)
WillemAnchor replied on at Permalink Reply
WillemAnchor
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)
Jozzeh replied on at Permalink Reply
Jozzeh
from the root:

packages/seo_headers/single_pages/dashboard/system/seo/seo_headers.php
packages/seo_headers/controllers/dashboard/system/seo/seo_headers.php
WillemAnchor replied on at Permalink Best Answer Reply
WillemAnchor
try to put the controller in
packages/seo_headers/controllers/single_page/dashboard/system/seo/seo_headers.php
Jozzeh replied on at Permalink Reply
Jozzeh
Thanks a lot ... this was the error. Is this a new thing in version 5.7 ?
controllers/certain page type/.....
WillemAnchor replied on at Permalink Reply
WillemAnchor
np and yes, it's described by andrew's:
http://www.concrete5.org/documentation/how-tos/developers/concrete5...
under "Controller Reorganization"