Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Admincontroller namespace error

admin solved

Solved by Vojtěch Fárek View solution

Started by Vojtěch Fárek 8 years ago · 1 replies · 1061 views
8 years ago

Hello, I've recently tried to modificate admincontroller.php, because of pictures metadata, but after I changed just one true to false I keep geetting this error and can't do anything with admin - logging etc. Don't know what is wrong, I would be glad for every response. 😦

/web
/htdocs2
/gymostrov_testcz
/home
/www
/user
/plugins
/admin
/classes
/admincontroller.php

PHP
<?php
namespace Grav\Plugin\Admin;

use Grav\Common\Cache;
use Grav\Common\Config\Config;
use Grav\Common\File\CompiledYamlFile;
use Grav\Common\Filesystem\Folder;
use Grav\Common\GPM\GPM as GravGPM;
use Grav\Common\GPM\Installer;
use Grav\Common\Grav;
use Grav\Common\Data;
use Grav\Common\Page\Media;
use Grav\Common\Page\Medium\Medium;
use Grav\Common\Page\Page;
use Grav\Common\Page\Pages;
use Grav\Common\Page\Collection;
use Grav\Common\User\User;
use Grav\Common\Utils;
use Grav\Common\Backup\ZipBackup;
use Grav\Plugin\Admin\Twig\AdminTwigExtension;
use Grav\Plugin\Login\TwoFactorAuth\TwoFactorAuth;
use RocketTheme\Toolbox\Event\Event;
use RocketTheme\Toolbox\File\File;
use RocketTheme\Toolbox\File\JsonFile;
use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator;
use Symfony\Component\Yaml\Exception\ParseException;
use Symfony\Component\Yaml\Yaml;

/**
 * Class AdminController
 *
 * @package Grav\Plugin
 */
class AdminController extends AdminBaseController
{
    /**
     * @var Grav
     */
    public $grav;

Arguments

TXT
"Namespace declaration statement has to be the very first statement or after any declare call in the script"
8 years ago Solution

Solved! :) Manually replaced whole classes folder with my backup using FTP. 🙂

Suggested topics

Topic Participants Replies Views Activity
Support · by complanar, 6 days ago
6 140 16 hours ago
Support · by Rick Beebe, 6 days ago
2 100 2 days ago
Support · by blu3prince, 3 days ago
0 52 3 days ago
Support · by alex, 4 days ago
2 92 3 days ago
Support · by Marcel, 2 weeks ago
1 143 4 days ago