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,316

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: 12,476
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.

Hire 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,316

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,316

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: 12,476
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.

Hire 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: 12,476
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.

Hire 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,316

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: 12,476
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.

Hire 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,316

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,316

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,316

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: 12,476
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.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#193 2016-05-13 21:06:51

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

Re: ied_plugin_composer - new plugins never came that easy

Yes, type 5.
Thanks for your offer, and yes, still MAMP, but that gives me a new idea (dang, why not earlier), I’ll try it out in the wild and let you know. But chances are low, I had it working before, both official v1.06 and 1.10 beta 2, and now both are broken in one go and I don’t see what I’ve done that might have caused that.

I’ll see what the www-server brings, asking me for Network panels and Response blocks … might last longer :P


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

Offline

#194 2016-05-13 21:28:48

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

Re: ied_plugin_composer - new plugins never came that easy

Bloke wrote #299111:

Does the browser’s inspector indicate any errors being thrown, or anything weird in the response block?

Well, I can’t judge weirdness in the Network panel. Anyways, here’s the response block for “Save code”:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<textpattern>
	<ied_plugin_msg value='                $(document).ready(function ()&#xA;                {&#xA;                    $(&quot;#messagepane&quot;).html(&quot;&lt;span class=\&quot;messageflash success\&quot; role=\&quot;alert\&quot; aria-live=\&quot;assertive\&quot;&gt;&lt;span class=\&quot;ui-icon ui-icon-check\&quot;&gt;&lt;/span&gt; Code saved&amp;#160;&lt;a class=\&quot;close\&quot; role=\&quot;button\&quot; title=\&quot;Schlie&szlig;en\&quot; aria-label=\&quot;Schlie&szlig;en\&quot; href=\&quot;#close\&quot;&gt;&amp;#215;&lt;/a&gt;&lt;/span&gt;&quot;);&#xA;                    $(window).resize(function ()&#xA;                    {&#xA;                        $(&quot;#messagepane&quot;).css({&#xA;                            left: ($(window).width() - $(&quot;#messagepane&quot;).outerWidth()) / 2&#xA;                        });&#xA;                    });&#xA;                    $(window).resize();&#xA;                });' />

	<http-status value='200 OK' />

</textpattern>

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

Offline

#195 2016-05-24 17:06:25

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

Re: ied_plugin_composer - new plugins never came that easy

uli wrote #299112:

yes, still MAMP, but that gives me a new idea (dang, why not earlier), I’ll try it out in the wild and let you know.

I’ve installed ied_pc on a www website and everything works as expected. So I really think it might have something to do with my local environment, especially given the fact that both ied_pc versions stopped AJAX-saving in one go. But I recently discovered what broke the connection between my text editor and the It’s All Text controlled textareas1 and so I can keep working my way and the AJAX issue is no longer a problem that I stumble upon.

What I want to suggest now is an improvement for the textpack pane: When I translate an English plugin I get titles for every text field I hover over. That’s been a very very useful idea that facilitates translations. Just, it doesn’t work the other way around, you don’t get titles hovering English strings. So I as someone wanting to introduce gTxt strings to an existing, un-gTxt-ified plugin, for both English and German strings, can’t make fully use of that nifty feature.

That’s actually a comment for the previous version, it seems the current 1.10beta works exactly the other way around (or changes its behaviour, I can’t tell ATM2, too fresh), anyways I’d be super cool if both user languages would have titles displayed over the text strings.

1 One obviously has to save the text area in question one time. That removes the token in the URL. Once that is done one can start editing, and then every saving inside the text editor transfers the text over to Firefox.

2 Does it take the current admin language into account? I switch quite often between German and English in 4.6, now that it’s so much easier to do so.

Last edited by uli (2016-05-24 17:43:10)


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

Offline

Board footer

Powered by FluxBB