Jump to content

non-readable admin.php, unable to access backend, after change to site/templates


Recommended Posts

Posted

Hello everybody,

I'm new to the forum, although I have been working with PW since 2016. Up until now I did not need to open my own topic, as usually questions about problems I encountered where already answered.

I was working on setting up a new website in my online dev environment, when I suddenly could not access the backend anymore, after deleting the blank profile in site/templates via and uploading my new files and folders.

I did find a similar problem posted by user kalimati here: 17110-admin-login-page-after-foundation-6-update. However, their question was apparently solved by removing (?) an admin.php file in site/templates and cleaning the cache.
The files I uploaded to my file/templates were a slightly modified bootstrap theme with a folder named "assets" containing only .js, .css, .jpg-files and fonts. So I don't have an admin.php file lying around there. Cleaning the cache via the following two approaches did not do the trick:

<?php 
	$cache->maintenance();
?>
<?php 
	$cache->delete("*");
?>

The error message looks as follows:

Error: Exception: Missing or non-readable template file: admin.php (in /srv/data/web/vhosts/www.mywebsite.de/htdocs/wire/modules/PageRender.module line 517)

#0 /srv/data/web/vhosts/www.mywebsite.de/htdocs/wire/core/Wire.php(383): ProcessWire\PageRender->___renderPage(Object(ProcessWire\HookEvent))
#1 /srv/data/web/vhosts/www.mywebsite.de/htdocs/wire/core/WireHooks.php(723): ProcessWire\Wire->_callMethod('___renderPage', Array)
#2 /srv/data/web/vhosts/www.mywebsite.de/htdocs/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\PageRender), 'renderPage', Array)
#3 /srv/data/web/vhosts/www.mywebsite.de/htdocs/wire/core/WireHooks.php(822): ProcessWire\Wire->__call('renderPage', Array)
#4 /srv/data/web/vhosts/www.mywebsite.de/htdocs/wire/core/WireHooks.php(822): ProcessWire\PageRender->renderPage(Object(ProcessWire\HookEvent))
#5 /srv/data/web/vhosts/www.mywebsite.de/htdocs/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\Page), 'render', Array)
#6 /srv/data/web/vhosts/l


This error message was shown because: you are logged in as a Superuser. Error has been logged.

I'm at a loss. Does anybody here have an idea what I could do, and/or what I am doing, but wrongly?

Thank you for considering helping me.
Cheers!

Posted

Welcome to the forum ?

Create a file in site/template called admin.php with this code :

<?php namespace ProcessWire;

require($config->paths->adminTemplates . 'controller.php'); 

 

  • Like 4
Posted
On 5/30/2018 at 11:42 AM, flydev said:

Welcome to the forum ?

Create a file in site/template called admin.php with this code :


<?php namespace ProcessWire;

require($config->paths->adminTemplates . 'controller.php'); 

 

Foolish me had simply removed admin.php. Now it's working again.

Thank you so much!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...