verbb / postie

A Craft Commerce shipping calculator plugin.
Other
12 stars 18 forks source link

2 Clicks to login to Control Panel... Postie somehow involved? #9

Closed chadcrowell closed 4 years ago

chadcrowell commented 4 years ago

Description

I have a commerce site where on all environments, its been requiring 2 clicks to login to the Control Panel. I finally got around to debugging that today, and by using the disabledPlugins Craft general config override, I was able to find that disabling Postie stopped this from happening and allowed Control Panel login with just 1 click. Seems strange that it would be Postie, but that is the case. There are 35 plugins in use on the site, and by disabling everything but Postie, the issue happened, and when enabling everything but Postie, the issue disappeared.

I did install Postie on a completely different site (not even a Commerce site) locally and didn't have this issue - so I am not sure its necessarily Postie on its own, but maybe you can provide some direction where I can further look?

Additional info

engram-design commented 4 years ago

That certainly seems odd behaviour. Are there any JS errors when inspecting the page? It might pay to have a look at the Network tab when logging into Craft, and check out the response from the login controller.

If you're looking to do some DIY debugging, you can try commenting out some of the functions in the main Postie.php file - that's where I believe any issue (if it is an issue) would occur.

engram-design commented 4 years ago

Additionally, if you can post your composer.lock file, I can try locally on my end with your same plugin combination - not sure if I'll be able to reproduce, but worth a shot!

chadcrowell commented 4 years ago

Ah - that did it.

In my postie.php I have both displayDebug and displayErrors to true, and here is the login controller response after the first login click that doesn't work: https://d.pr/i/vhIiey

Changing displayDebug to false allows the expected single click login. I'll just leave that to false and problem solved on my end. Thanks for the direction. Hope that helps you debug on your end so others don't have the same issue.

Also - typo bug here: https://d.pr/i/LuGBkH

engram-design commented 4 years ago

Thanks for the typo - whoops! Thanks also for investigating, that all makes sense and will fix.