Single Page Dashboard Blank Page

Permalink
Hi all,

Hope you can render some assistance here..

I am trying to build a small package in Concrete5. I believe I have got everything correct in terms of the namespaces and the package did manage to get installed. However when trying to nagivate to the single page dashboard, I am served with a blank page.

I have uninstalled and reinstalled several times over and I am no further forward trying to figure out when it wont display. I have even gone as far as clearing the cache and still no joy.

I have attached a screenshot of my package structure and the code i am using for the single_page dashboard is shown below:

namespace Concrete\Package\HelastelGlossary\Controller\SinglePage\Dashboard\Sitemap;
use \Concrete\Core\Page\Controller\DashboardPageController;
use Concrete\Package\HelastelGlossary\Models\HelastelGlossary;
use Loader;
/**
 * Created by PhpStorm.
 * User: Emmanuel
 * Date: 14/12/2015
 * Time: 19:39
 */
class Glossary extends DashboardPageController
{
    public $helpers = array('form');
    function view() {
        $this->set('terms', $this->getGlossaryTerms());


The debug settings on concrete have been switched on and i have turned all caching off.

Can anyone help shed a light on this?

Regards,

Emmanuel

1 Attachment

 
hutman replied on at Permalink Reply
hutman
You structure looks good, but if you are working with 5.7.5+ you can't use the Models folder anymore, you have to put everything in the src folder and reference it from there. It's possible that this is causing your issues. Also, in your use statement for your model you need a \ before Concrete.

Also, make sure in your Debug Settings you have "Show the debug error output" selected so that it gives you the full error output, much easier to troubleshoot that way.
emmanuelokorie replied on at Permalink Reply 1 Attachment
Thank for your reply hutman, I have managed to get the package working but I do have one small problem.

As you can see from the file I have attached, I have updated the structure a bit. When I navigate to the package via /index.php/dashboard/sitemap/glossary, I get a blank page. However when I navigate to /index.php/dashboard/sitemap/glossary/search, the page content show up. Is there a way I can redirect /index.php/dashboard/sitemap/glossary to /index.php/dashboard/sitemap/glossary/search?

I added a controller file in the glossary folder and in the construct added a redirect to /index.php/dashboard/sitemap/glossary/search. But that is not doing anything. Any ideas would be helpful.

Thanks
hutman replied on at Permalink Reply
hutman
I'm glad this is working for you now.

A couple of things:
You need a view.php inside the single_pages/dashboard/sitemap/glossary directory (it can be blank with the exception of the defined that's at the top of every page).
You need to rename your controller.php to glossary.php and move it out to the controllers/single_page/dashboard/sitemap directory.

Once you have done that you should try refreshing your Single Page through the dashboard (make sure your namespaces are correct in those files). If it doesn't work then you might have to uninstall/reinstall. 5.7 seems really fussy about the files being in the structure on install where 5.6 was not so.
emmanuelokorie replied on at Permalink Reply
Yippee :)

That seems to be work... Thank so much...

Just need to figure to implement a good CRUD functionality and to understand how to Model system works. I work with Laravel and there are a few similarities.

:)