craftcms / cms

Build bespoke content experiences with Craft.
https://craftcms.com
Other
3.28k stars 635 forks source link

CP redirects to install URL #2908

Open KatieMFritz opened 6 years ago

KatieMFritz commented 6 years ago

Description

When I click to another screen in the CP before the current screen has finished loading, it redirects me to /admin/install and gives a "template not found: install" error - but only sometimes. It may be related to Globals, but I haven't been able to pin down the pattern. It seems to happen in waves (3 or 4 times within 10 minutes, then not for a while), and it may only happen on my local Wamp install.

Steps to reproduce

  1. Load a page on the Control Panel
  2. Click on a menu item
  3. Before the new screen loads, click on another menu item

Additional info

screenshot-safs local-2018 05 21-16-52-03

brandonkelly commented 6 years ago

Huh, that's pretty weird. The only time Craft will redirect to admin/install is if it thinks it’s not installed. Maybe the database connection is going dark for brief periods when this happens.

@angrybrad any ideas?

jamiewade commented 6 years ago

Nothing further to add technically, but just a point that I too experience this same issue. Probably about 3 or 4 times a day unfortunately!

As mentioned, it seems to happen when doing things in quick succession (saving multiple entry types, fields etc).

angrybrad commented 6 years ago

@jamiewade @KatieMFritz can you check through your craft/storage/logs files for any database connection errors? Similarly, through your MySQL logs for any aborted connections that might be happening around the same time? Could be anything from hitting database connection limits to resource related issues.

jamiewade commented 6 years ago

@angrybrad @brandonkelly Hey guys, sorry this took a while:

2018-05-24 16:33:07 [192.168.8.18][1][82f9l23g3ahvo8asvg0ev1mis6][error][yii\base\ErrorException:2] yii\base\ErrorException: fopen(C:\sites\geocurve\public\cpresources\e69a1ba9\thumb-100x100.jpg): failed to open stream: No such file or directory in C:\sites\geocurve\vendor\yiisoft\yii2\web\Response.php:485
Stack trace:
#0 C:\sites\geocurve\vendor\craftcms\cms\src\web\ErrorHandler.php(84): yii\base\ErrorHandler->handleError(2, 'fopen(C:\\sites\\...', 'C:\\sites\\geocur...', 485)
#1 [internal function]: craft\web\ErrorHandler->handleError(2, 'fopen(C:\\sites\\...', 'C:\\sites\\geocur...', 485, Array)
#2 C:\sites\geocurve\vendor\yiisoft\yii2\web\Response.php(485): fopen('C:\\sites\\geocur...', 'rb')
#3 C:\sites\geocurve\vendor\craftcms\cms\src\web\Response.php(107): yii\web\Response->sendFile('C:\\sites\\geocur...', 'thumb-100x100.j...', Array)
#4 C:\sites\geocurve\vendor\craftcms\cms\src\web\Application.php(453): craft\web\Response->sendFile('C:\\sites\\geocur...', NULL, Array)
#5 C:\sites\geocurve\vendor\craftcms\cms\src\web\Application.php(151): craft\web\Application->_processResourceRequest(Object(craft\web\Request))
#6 C:\sites\geocurve\vendor\yiisoft\yii2\base\Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#7 C:\sites\geocurve\public\index.php(21): yii\base\Application->run()
#8 {main}
2018-05-24 16:33:06 [192.168.8.18][1][82f9l23g3ahvo8asvg0ev1mis6][info][application] $_GET = [
    'p' => 'cpresources/e69a1ba9/thumb-100x100.jpg'
    'v' => '1526043959'
]

The error has literally just happened:

Page Not Found Template not found: install

And this is the only instance of [error] in my storage/logs/web.log file (I deleted it a few days ago).

And here's a Gist of the whole log from that timestamp if you need it.

Hope that helps!

angrybrad commented 6 years ago

That error seems unrelated to me. Anything in your MySQL error/slow query logs? Running any sort of firewall/anti-virus software locally?

KatieMFritz commented 6 years ago

@angrybrad Looking through the logs - next time it happens I'll mark the time so I can see if there's a connected log item. I do see this error occurring frequently in storage/logs/phperrors.log:

PHP Fatal error:  Maximum execution time of 120 seconds exceeded in C:\wamp64\www\safs-effs\vendor\yiisoft\yii2\web\Session.php on line 137