ERROR - Class 'Grav\Plugin\Login\Controller' not found

After the upgrade to rc5, I’m seeing this occasionally… Seemingly the first connection. From a fresh browser. I can reload the page and all is well.

I don’t see it running local in php mode, so maybe it’s something I’ve loused up with my hosting, but all was happy until the upgrade.

Any ideas?

An example is http://craftacraft.com which just did it to me.

Thanks!

I would suggest updating to the latest version of the login plugin and clearing the cache. Also makes sure all the other plugins are updated also.

Have tried those already… still getting it…

did:
bin/gpm selfupgrade -f
bin/gpm update -f

That should get them all, right?

Same problem here

[2015-11-24 11:03:44] grav.CRITICAL: Class ‘Grav\Plugin\Login\Controller’ not found - Trace: #0 /home/forge/monhelp.com/vendor/filp/whoops/src/Whoops/Run.php(3$

that is the error you would get if the login plugin was not updated. try updating them wth bin/gpm update

Updated to login->1.0.1 (I assume that’s what you meant - that you had rev’ed the logon plugin).

Sometimes works, sometimes:

…/­user/­plugins/­login/­login.php:81

Whoops \ Exception \ ErrorException (E_ERROR)

Class ‘Grav\Plugin\Login\Controller’ not found

Maybe you can zip up your site and put it somewhere we can download so we can investigate further? Not able to reproduce this on my local setup.

This one does it for me… First time. If you refresh, it works.

I just tried your file on my local… fresh install, no errors at all. Not on first load or refresh. I also tried your original craftacraft site and can’t get that to error either.

Maybe you have something cached in your browser? Try clearing the browser cache and also try with another browser such as firefox?

@rhukster Although I can’t reproduce this either, the above error directly points to the recent changes in the Login plugin, L81. For a quick help @bdillahu and @“Juan Giraldo” I suggest disabling the “RememberMe” option via rememberme.enabled: false. But it would be nice if you are open to test some changes, when I have something possibly to solve this error (see below).

For me it seems like to be an autoloader conflict. Thus, if you have shell access can you browse to user/plugins/login, delete the vendor folder, do a composer install in this folder and try again?

Another thought to get an idea of what the error actually might be is to cut and paste L55-L60, login.php after L41, login.php and tell me whether this fixes the error or not.

(of course both has to be tried with rememberme.enabled: true)

I had the same problem recently when clearing the browser cache. composer update fixed the problem

Thanks for all the pointers… Have to do holiday stuff with the family today. Will try to test tonight or tomorrow… Sorry for the delay

@Sommerregen, @rhukster and @flaviocopes, Thanks for the pointers…

@Sommerregen, adding those lines (55-60) of login.php after L41 didn’t seem to change anything.

I’m sorry, I think I goofed up in the first test of deleting vendor and doing the composer install… wound up doing the composer update and so far, it seems to have fixed it.

This was the output of what a composer update performed, if that tells anybody anything:

Updating dependencies

  • Removing erusev/parsedown-extra (0.7.0)

  • Installing erusev/parsedown-extra (0.7.1)
    Loading from cache

  • Removing symfony/yaml (v2.7.6)

  • Installing symfony/yaml (v2.7.7)
    Loading from cache

  • Removing symfony/console (v2.7.6)

  • Installing symfony/console (v2.7.7)
    Loading from cache

  • Removing symfony/event-dispatcher (v2.7.6)

  • Installing symfony/event-dispatcher (v2.7.7)
    Loading from cache

  • Removing symfony/var-dumper (v2.7.6)

  • Installing symfony/var-dumper (v2.7.7)
    Loading from cache

So, is it a good idea to do a composer update regularly? Sorry, not quite sure what that one is doing.

Happy Thanksgiving to anybody that happens to have that holiday where you are :slight_smile:

The Grav ‘updates’ contain the composer based dependencies, but there have been a few updates lately. There will be another update of vendor packages with the next Grav release which is coming soon.

And I guess I spoke too soon… the error cropped back up again.

Sigh.

I’ll try to chase some more tomorrow.

Ok. Well, I guess we need a more systematic approach here. Yesterday it came into my mind that plugins and themes could interfere, too.

Can you download the Blog skeleton and only install Admin plugin and Login plugin? The latter by downloading it from here https://github.com/getgrav/grav-plugin-login/archive/develop.zip and extracting it into user/plugins/login; there are some changes made in the develop branch, which might solve your issue.

Then, test it against the blog skeleton. If there is everything is fine, try to subsequently add all the plugins you are currently using one by one. Each time clear the cache and test it against the recent changes. At last, switch to your theme and follow the same steps.

Report on any problem here, which might occur and the constellation of plugins/themes you have been used.

Not that I have anything definitive, but so far, I haven’t figured it out :slight_smile:

Tried turning off all the “non-standard” plugins I had - no change

Tried going back to default antimatter theme (mine was based on it) - no change

(sorry, I know all of this isn’t exactly in your order… trying to hit them as I can)

Downloaded your develop version for grins and loaded it in my “problem” setup - it didn’t work at all… going to play with that a little more - that may have been me.

Anyhow… still chugging along. I’ll keep you posted as I have a few minutes to test randomly.

Thanks all!

Have you updated to all the latest versions? We just released new Grav + Admin + Login + Form plugin yesterday.

Yes, sorry… That was my first step.