Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2020-03-09 22:46:47

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

plugins: odd display of error message

Take a look at the screen grab in this message, you’ll see that the message (problem report) is displayed inside the list table.

I would expect the message to appear at the top of the page.

The image is also available here (in case it is removed).


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

Offline

#2 2020-03-10 01:43:43

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

Re: plugins: odd display of error message

This is, annoyingly, a feature of throwing errors in an Ajax environment. When you flick the plugin on/off, it expects the plugin to respond without syntax errors. If it doesn’t get that, it just spits out what it did receive right in the place where the on/off would reside.

That creates a holy mess.

When we revisit the JavaScript code that handles on/off states, maybe we could harden it a bit so it doesn’t splurge the plugin output right there. If it detects an error situation, maybe it just shows on/off as normal?

That does, however, mask the problem until such time as you move away to another admin panel, at which point the holy mess will splatter all over the screen (if it’s an admin-side plugin). At least if you see this horrible output in the plugins panel, you know something’s up. That gives you the opportunity to toggle the state back to ‘off’ (because that panel is effectively a sandbox) and fix the plugin before activating it again.

Last edited by Bloke (2020-03-10 01:45:24)


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 2020-03-10 03:16:21

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

Re: plugins: odd display of error message

Bloke wrote #322127:

This is, annoyingly, a feature […]

At least if you see this horrible output in the plugins panel, you know something’s up. That gives you the opportunity to toggle the state back to ‘off’ (because that panel is effectively a sandbox) and fix the plugin before activating it again.

so all-in-all, a holy mess feature :-) I kinda like that for a moment.

I see your point about displaying a message immediately as it does indeed make clear something is (badly) wrong. If there is no immediate report, and you try to go to another panel, you run the risk of seeing a blank page with bio way back because the holy mess was really messy and the plugin would screw up much more.


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

Offline

Board footer

Powered by FluxBB