Empty Dashboard Single Pages
Permalink
I've created a few packages with single pages successfully; however, this is my first time installing dashboard pages and I'm having some trouble. The pages install and are navigable but simply return 200 OK and an empty response body. The system doesn't seem to recognize the single_pages/dashboard/product_features/add.php file or any of the controllers.
The page path is /dashboard/product_features/add, the controller file is located at product_features/controllers/single_page/dashboard/product_features/add.php, and the controller code is below:
Thanks in advance.
The page path is /dashboard/product_features/add, the controller file is located at product_features/controllers/single_page/dashboard/product_features/add.php, and the controller code is below:
<?php namespace Concrete\Package\ProductFeatures\Controller\SinglePage\Dashboard\ProductFeatures; use \Concrete\Core\Page\Controller\DashboardPageController as Controller; class Add extends Controller { public function view() { print('Welcome to the add page!'); } }
Thanks in advance.
Apologies for the mistype -- that is where the controller is located. Any other ideas?
So you have
/packages/product_features/controllers/single_page/dashboard/product_features/add.php
/packages/product_features/single_pages/dashboard/product_features/add.php
If you go to System & Settings -> Pages & Themes -> Single Pages in the Dashboard is your page listed there? If so click the little arrow icon to "refresh" the page.
What happens if you add an echo or something to the single page itself, does that show up?
What version of 5.7 are you using?
/packages/product_features/controllers/single_page/dashboard/product_features/add.php
/packages/product_features/single_pages/dashboard/product_features/add.php
If you go to System & Settings -> Pages & Themes -> Single Pages in the Dashboard is your page listed there? If so click the little arrow icon to "refresh" the page.
What happens if you add an echo or something to the single page itself, does that show up?
What version of 5.7 are you using?
I'm using 5.7.1.
Yes, those are the paths I have. I get nothing from either the page template file or the controller. Just an empty response with no body. The pages the package creates are all showing up in the dashboard's Single Page list.
I just tried to refresh from the Single Page list but it didn't make any difference.
I'm certain it's something I've got misconfigured but I can't think of what it might be. :(
Yes, those are the paths I have. I get nothing from either the page template file or the controller. Just an empty response with no body. The pages the package creates are all showing up in the dashboard's Single Page list.
I just tried to refresh from the Single Page list but it didn't make any difference.
I'm certain it's something I've got misconfigured but I can't think of what it might be. :(
Could you take a screen shot of the Single Pages list with those pages on it just so I can see? Everything you have looks just like what I have in a package that's working locally for me so it almost seems like there has to be a mismatch somewhere.
Sure, attached.
So your package looks like this
product_features
controllers
single_page
dashboard
product_features
add.php
delete.php
edit.php
product_features.php
single_pages
dashboard
product_features
add.php
delete.php
edit.php
And inside your
product_features/controllers/single_page/dashboard/product_features/add.php
you have
and in your
product_features/single_pages/dashboard/product_features/add.php
you have something like
But your page comes up completely blank and you don't get any errors?
If you go to Sytem & Settings -> Debug Settings is Output error information to site users checked? Is Show the debug error output selected?
product_features
controllers
single_page
dashboard
product_features
add.php
delete.php
edit.php
product_features.php
single_pages
dashboard
product_features
add.php
delete.php
edit.php
And inside your
product_features/controllers/single_page/dashboard/product_features/add.php
you have
<?php namespace Concrete\Package\ProductFeatures\Controller\SinglePage\Dashboard\ProductFeatures; use \Concrete\Core\Page\Controller\DashboardPageController as Controller; class Add extends Controller { public function view() { print('Welcome to the add page!'); } }
and in your
product_features/single_pages/dashboard/product_features/add.php
you have something like
<?php namespace Concrete\Package\ProductFeatures\SinglePages\Dashboard\ProductFeatures; print('Made it to the view!');
But your page comes up completely blank and you don't get any errors?
If you go to Sytem & Settings -> Debug Settings is Output error information to site users checked? Is Show the debug error output selected?
That's correct, other than I didn't add the namespace line to the view file. This issue seems to have resolved itself, though I'm not certain why. I removed the package and re-installed it for what seemed like the 10th time and the pages appeared and are now working as expected.
I have the same with one package. Though it's just one of the files that does not get recognized. I'm getting insane over this. I checked a hundred times if everything is there and correct and it all is. Emptied every cache there is, reload the single pages. Nothing works.
I use 5.7.3.1. Also re-installed it all. Guess I'll give your method a try and just do that for 10 times and see if it suddenly works.
I use 5.7.3.1. Also re-installed it all. Guess I'll give your method a try and just do that for 10 times and see if it suddenly works.
Guess what.... it worked!!!
Suddenly it was there. I've wasted around 6 hours on that, looking for any possible mistake I made. Even installed it myself 1 time again. Little did I now I just had to do it over and over again till the page finally just magically works.
Suddenly it was there. I've wasted around 6 hours on that, looking for any possible mistake I made. Even installed it myself 1 time again. Little did I now I just had to do it over and over again till the page finally just magically works.
I'm not 100% certain, but I think I've found you need a properly pathed and namespaced controller and view file BEFORE installing the package for it to be recognized.
Would be possible. I didn't had that when I installed it the first time. But I'm 90% sure I had it when I re-installed it. Possible that it didn't show because of any cache.... it's weird.
Well, glad it works now. Thanks to you!
Well, glad it works now. Thanks to you!
product_features/controllers/single_page/dashboard/product_features/add.php