[Solvend] V8.2.1 Dashboard Single Page Controller is not loaded

Permalink
Hello everybody,

I'm trying to install singlepages in a package for the backend dashboard. This works so far. The entries in the backend navigation are available and the pages can also be opened.
However, when I access the Dashboard page, no information is passed from the view () function to the page.

Where is my mistake?

Directory structure:
tests (package)
--- + controllers
------ + single_pages
--------- + dashboard
------------ + tests
--------------- + customers
--------------- customers.php
------------ tests.php
--- + single_pages
------ + dashboard
--------- + tests
------------ + customers
------------ customers.php
--------- test.php
--- controller.php

controller.php (package):
<?php
namespace Concrete\Package\Tests;
use Loader;
use Package;
use SinglePage;
use Core;
use Page;
defined('C5_EXECUTE') or die(_("Access Denied."));
class Controller extends Package
{
    protected $pkgHandle = 'tests';
    protected $appVersionRequired = '8.2.0';
    protected $pkgVersion = '0.3.1';
    public function getPackageName()
    {


test.php (controller for dashboard single page):
<?php
namespace Concrete\Package\Tests\Controller\SinglePage\Dashboard;
use \Concrete\Core\Page\Controller\DashboardPageController;
use Package;
use Core;
use Config;
use Loader;
class Tests extends DashboardPageController
{
    public function view(){
        $this->set('testing', 'My regular message');
    }
}


test.php (dashboard single page):
<?php
defined('C5_EXECUTE') or die("Access Denied.");
echo 'HALLO'.$testing;
?>
Tests2


For testing i have attached the package.

Thanks for tips/help.
greetings
LennDa

1 Attachment

LennDa
View Replies: View Best Answer
hutman replied on at Permalink Best Answer Reply
hutman
Your single_pages directory should actually be single_page

Directory structure:
tests (package)
--- + controllers
------ + single_pages <--- single_page
--------- + dashboard
LennDa replied on at Permalink Reply
LennDa
Ups, embarrassing.
I must have been blind.
Thank you for your help :)
JohntheFish replied on at Permalink Reply
JohntheFish
Its a mistake many of us have made and spent time tearing our hair out. Another one of those silly 5.7/v8 gotchas that doesn't have any particular attention drawn to it in the docs.