Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2016-04-19 10:02:04

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Login form in the plugin tab…

Hi, in 4.5.7 or 4.6, log you into your Txp admin; open two bowser tabs, each one tagerting your admin, one in the Admin>Plugin tab and logout from the other. Once you are log out, try to disable a plugin from the other browser tab… The login form appears in the plugin row.


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#2 2016-04-19 10:27:05

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,271
Website GitHub

Re: Login form in the plugin tab…

NicolasGraph wrote #298691:

Once you are log out, try to disable a plugin from the other browser tab… The login form appears in the plugin row.

That’s to do with the AJAX call failing because you’ve logged out. Perhaps we should only serve the login screen from non-asynchronous requests and silently fail otherwise. Anyone any view on this? Is that a better paradigm?

Incidentally, you also get error messages appearing in place of the Yes/No text if you try to enable a plugin that has syntax errors in it. And you’ll maybe get the login Form in many places on the Write panel if you log out in a different tab prior to saving an already published article. And in the Sections panel if you toggle any of the Yes/No options. Anywhere there’s AJAX, really.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#3 2016-04-19 13:04:09

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

Re: Login form in the plugin tab…

Bloke wrote #298692:

Perhaps we should only serve the login screen from non-asynchronous requests and silently fail otherwise. Anyone any view on this? Is that a better paradigm?

Silent fail can be misleading, probably js redirection is better?

Offline

#4 2016-04-19 13:15:59

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,271
Website GitHub

Re: Login form in the plugin tab…

etc wrote #298695:

Silent fail can be misleading, probably js redirection is better?

Sure, if you can figure out how to do it, be my guest.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#5 2016-04-19 14:39:05

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

Re: Login form in the plugin tab…

Bloke wrote #298696:

Sure, if you can figure out how to do it, be my guest.

It could be just something like

if (!$txp_user) {
    if(ps('app_mode') == 'async') {
        echo '<script>window.location.assign("index.php")</script>';
        exit(0);
    } else {
        doLoginForm($message);
    }

in doAuth()?

Offline

#6 2016-04-20 05:59:26

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: Login form in the plugin tab…

Thanks for your replies; I can’t help to fix but I’ll keep watching this topic.


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#7 2016-04-22 12:16:00

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

Re: Login form in the plugin tab…

Patched here, please test.

Offline

#8 2016-04-22 12:48:16

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: Login form in the plugin tab…

etc wrote #298770:

Patched here, please test.

Thanks, seems to work fine for now…


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#9 2016-04-23 00:18:37

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,079
Website

Re: Login form in the plugin tab…

etc wrote #298770:

Patched here, please test.

Much better now. That is the behaviour I always would have expected.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#10 2016-04-23 20:43:43

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

Re: Login form in the plugin tab…

Thanks for testing, gentlemen. I was a little hesitating between js alert and confirm, it’s yet time to choose.

Offline

Board footer

Powered by FluxBB