Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#181 2016-05-13 00:09:00

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: ied_plugin_composer - new plugins never came that easy

Bloke wrote #299087:

How does yours compare?

Copied from ctrl-clicking the “POST index.php” entry > Copy data from POST

“Save code” results in:

event=ied_plugin_composer
step=code_save
plugin=esq_sectionsort
codeblock= […]
app_mode=async
_txp_token=[...]

“Save meta” is also affected I just remarked, clicking it brings:

event=ied_plugin_composer
step=meta_save
plugin=esq_sectionsort
data[newname]=esq_sectionsort
data[version]=2.01
data[description]=Custom+sorting+of+sections+and+categories
data[author]=cainmi
data[author_uri]=https://github.com/cainmi/esq_sectionsort
data[type]=3
data[load_order]=5
data[status]=1
data[flags[]]=2
app_mode=async
_txp_token=[...]

The Inspector’s Parameters pane shows some less params than ctrl-clicking the POST line, but additionally to/divergent from the result via ctrl-click it offers two entries for the “Save meta” step:

step: "set_tp_prefix"
prefix: ""

BTW, is it to be expected that both AJAX buttons do save when the result is a dimmed panel? (Cause they do, crazy.)

Edited by Stef to redact txp_token.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#182 2016-05-13 08:28:19

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

Re: ied_plugin_composer - new plugins never came that easy

uli wrote #299088:

Copied from ctrl-clicking the “POST index.php” entry

So it’s doing the same as mine. No idea how it can be saving all plugins based on that request. Totally weird. Can’t reproduce that here.

is it to be expected that both AJAX buttons do save when the result is a dimmed panel?

Yes. The dimming takes place during the save. When everything comes back OK, the panel opacity is restored. If something goes wrong (network error, or more usually a syntax error), the panel stays dimmed.


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

#183 2016-05-13 14:13:52

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: ied_plugin_composer - new plugins never came that easy

No doubt, it has nothing to do with your plugins. I just hoped you might have an idea what happened, invisible meta character crept in somewhere outside of Textpattern, that kind of stuff.

It came to my mind I hadn’t thought of replacing the MAMP from an older backup, where things might have worked but to no avail. That taught me where the database is stored ;)

The AJAX button is so friggin useful, the code stays where you edited it, you can redo edits, it’s just confusing to have the editor like behind some tracing paper though everything is working. So I colored the H1 instead of dimming the “working areas”, and if things start functioning again at some point I can still have an indicator for that.

Thanks for the trouble!


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#184 2016-05-13 14:24:09

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: ied_plugin_composer - new plugins never came that easy

Just saw you edited away the tokens from my post, thanks. Out of curiosity: What could be done with the info in there?


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#185 2016-05-13 14:24:35

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

Re: ied_plugin_composer - new plugins never came that easy

uli wrote #299100:

No doubt, it has nothing to do with your plugins.

Oh don’t be so sure!

The AJAX button is so friggin useful, the code stays where you edited it, you can redo edits, it’s just confusing to have the editor like behind some tracing paper though everything is working.

Yes. I could change that so it only dimmed some other DOM element or popped up a spinny somewhere.

Out of curiosity, what happens if you go to Plugin Composer’s settings and turn off syntax checking? If you’re developing in the editor window and don’t require that feature, it makes things less invasive because it’ll only dim momentarily while it performs the save.


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

#186 2016-05-13 14:25:48

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

Re: ied_plugin_composer - new plugins never came that easy

uli wrote #299101:

Just saw you edited away the tokens from my post, thanks. Out of curiosity: What could be done with the info in there?

Probably nothing, but, well, you never can be too careful since the tokens might be able to be used to make a replay attack on your site.


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

#187 2016-05-13 14:37:25

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: ied_plugin_composer - new plugins never came that easy

Bloke wrote #299102:

Out of curiosity, what happens if you go to Plugin Composer’s settings and turn off syntax checking?

Aha, interesting! Warmer, warmer still: It sets my H1 to red.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#188 2016-05-13 14:49:22

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

Re: ied_plugin_composer - new plugins never came that easy

On reflection, I think dimming the whole panel is a bit rubbish actually. I mean, even if you did have a syntax error, looking at a “tracing paper” (I like that!) version of the code isn’t going to help you find the bug. Any better suggestions on how to notify you? It won’t save the code all the while there’s a syntax error (for protection) but it only needs to notify you and then get out of the way.


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

#189 2016-05-13 15:08:38

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: ied_plugin_composer - new plugins never came that easy

One of my favourites for doing stuff like that is outline. It doesn’t influence the position like border would, even if you do 30px solid orange. But 2px solid #d00 would be significant enough without distracting.

Bloke wrote #299105:

It won’t save the code all the while there’s a syntax error

Oh, then we’ve had a misunderstanding here in the second half. But no matter.

I now have syntax checking off and still get a red H1 (would get a dimmed panel), hell! What’s going on? But it dovetails with the fact that I could save when syntax checks were still on though the panel was dimmed.

Last edited by uli (2016-05-13 15:13:45)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#190 2016-05-13 15:24:33

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: ied_plugin_composer - new plugins never came that easy

uli wrote #299106:

I now have syntax checking off and still get a red H1 (would get a dimmed panel)

Sorry, spoke too soon. Must have been cacheing or whatnot: It’s working like I had expected it: No dims/red H1s when I “Save code” and syntax checks are off. See below :]

Last edited by uli (2016-05-13 17:40:43)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#191 2016-05-13 17:32:50

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: ied_plugin_composer - new plugins never came that easy

Blimey! Don’t think I’m a moron, I hardly could believe my own eyes, but

  • Prefs are set to No for “Syntax check on code save” (looked it up twice and saved again with “No”).
  • ied_plugin_composer is totally fresh installed, no longer my colour change version (checked that, too).
  • I even installed rah_nocache (and activated it and checked that)
  • All old tabs were closed.

When I open a working (not broken) plugin and do nothing but saving it via the AJAX button (no edits, not even clicking inside the text area) then I get a dimmed edit panel (and it saves, checked that twice, too). POST Parameters are still:

event
step
plugin
codeblock
app_mode
_txp_token

Sorry for that roller coaster ride :)
Does that give you an idea what might be going on?

Last edited by uli (2016-05-13 17:43:38)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#192 2016-05-13 20:26:38

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

Re: ied_plugin_composer - new plugins never came that easy

uli wrote #299110:

When I open a working (not broken) plugin and do nothing but saving it via the AJAX button (no edits, not even clicking inside the text area) then I get a dimmed edit panel (and it saves, checked that twice, too).

Does the browser’s inspector indicate any errors being thrown, or anything weird in the response block? Sounds like it’s doing the server side part (save) but not returning control to the client properly to complete the action and undim the panel. I might see if I can do that in an always block so it should (syntax errors notwithstanding) at least return some semblance of control to you.

Presumably your ied_plugin_composer is set to type 5 or it wouldn’t complete the save, but it might be worth checking the txp_plugin type column in PHPMyAdmin.

Ummm, past that, I dunno sorry. If it wasn’t a local MAMP install I’d ask for a login so I can see if I can diagnose it. Any way I can see this in action and get my hands on your site so I can help debug this?


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

Board footer

Powered by FluxBB