Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#21 2020-09-23 12:48:02

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,430

Re: bot_wtc v8 for Textpattern v4.7 (beta)

Yes, the plug-in works well otherwise.

With other providers (in Switzerland) I had problems with ModSecurity roles after the Textpattern and PHP 7.4 upgrade because of my Ecuadorian IP. The provider with this plug-in problem deactivated them temporarily, but it didn’t help.

I think like you, that it has to do with the interaction between Plug-In PHP and jQuery in Textpattern. But, what interferes with this interaction?

When saving, the process goes on endlessly (circling). If I wait long enough and reload the page I notice that the content has been saved. Only the interaction with the button does not work properly.

Offline

#22 2020-09-23 13:14:46

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 3,946
Website

Re: bot_wtc v8 for Textpattern v4.7 (beta)

GugUser wrote #326048:

Yes, the plug-in works well otherwise.

Good :-)

I think like you, that it has to do with the interaction between Plug-In PHP and jQuery in Textpattern. But, what interferes with this interaction?

It’s actually jQuery in bot_wtc, it’s only injected into the head of the page via PHP. bot_wtc listens to see if the section is changed and then switches the custom field display accordingly. Textpattern seems to do something with skin (e.g. themes) but I’m not sure. When the section drop-down is changed, both scripts respond and something’s happening there. I don’t know enough about what textpattern is doing there but I suspect it’s bot_wtc that needs adjusting to play nicely with txp.

Maybe a dev can chime in here.

When saving, the process goes on endlessly (circling). If I wait long enough and reload the page I notice that the content has been saved. Only the interaction with the button does not work properly.

That sounds like it’s interfering with completion of the ajax-save and does need resolving, then.


TXP Builders – finely-crafted code, design and txp

Offline

#23 2020-09-23 13:34:43

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,790
Website

Re: bot_wtc v8 for Textpattern v4.7 (beta)

jakob wrote #326049:

bot_wtc listens to see if the section is changed and then switches the custom field display accordingly.

Textpattern 4.8.2+ (or thereabouts) listens to the section dropdown and uses that to seed the override form based on the theme in use. I suspect bot_wtc is either stomping on this callback or is being stomped on by core’s callback. Perhaps one of them is not propagating, e.g. doing a .stopPropagation() or .preventDefault() or exiting or returning false which stops (or interferes with) the next one firing properly?

The console output should help narrow it down.

Last edited by Bloke (2020-09-23 13:35:18)


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

Online

#24 2020-09-24 17:11:23

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,430

Re: bot_wtc v8 for Textpattern v4.7 (beta)

GugUser wrote #326045:

Maybe this is the better place (yesterday):

I use identical Textpattern installations at different providers, version 4.8.3 and PHP 7.4.10. At one of the providers there are problems saving the articles. After several attempts to solve the problem I found out that it has to do with the latest version of the bot_write_tab_customize plug-in. The console shows the following, only if the plug-in is activated.

What has this to do with the provider, why it works for some providers and not for one?

Warnings:

jQuery.Deferred exception: allForms is not defined ReferenceError: allForms is not defined...

Errors:

Uncaught ReferenceError: allForms is not defined...

It seems that there is no solution to the problem described. The provider’s customer service cannot help either.

Offline

#25 2020-09-26 16:16:49

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,430

Re: bot_wtc v8 for Textpattern v4.7 (beta)

Is this true, nobody has an idea what could cause the problem? The support of the provider doesn’t know a solution either. What now? In other installations with other providers it works, but I can’t change provider because of that (it’s not my account), and the company is otherwise serious and unreliable.

GugUser wrote #326045 on 2020-09-23:

I use identical Textpattern installations at different providers, version 4.8.3 and PHP 7.4.10. At one of the providers there are problems saving the articles. After several attempts to solve the problem I found out that it has to do with the latest version of the bot_write_tab_customize plug-in. The console shows the following, only if the plug-in is activated.

What has this to do with the provider, why it works for some providers and not for one?

Warnings:

jQuery.Deferred exception: allForms is not defined ReferenceError: allForms is not defined...

Errors:

Uncaught ReferenceError: allForms is not defined...

p.

Offline

#26 2020-09-26 16:31:38

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,790
Website

Re: bot_wtc v8 for Textpattern v4.7 (beta)

Crap. This might be a core bug. Just out of curiosity, does it go away if you visit Preferences and toggle Allow form override? to Yes?

If it’s set to No, the JS Console complains trying to access the allForms variable. I’m not sure if bot_wtc has anything to do with it (unless it somehow assumes that override forms are in use).


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

Online

#27 2020-09-26 16:50:52

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,430

Re: bot_wtc v8 for Textpattern v4.7 (beta)

You are great, yes, that helps. Many, many thanks.

Offline

#28 2020-09-26 16:53:00

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 3,946
Website

Re: bot_wtc v8 for Textpattern v4.7 (beta)

Bloke wrote #326109:

Crap. This might be a core bug. Just out of curiosity, does it go away if you visit Preferences and toggle Allow form override? to Yes?

Would be good to know, but it could also be bot_wtc. Textpattern’s own textpattern.js has evolved over the years whereas bot_wtc uses good ‘ol jQuery detection as it always did. All I’ve done is update the selectors so it could no longer be in sync with what txp is using (the selector in question and the jQuery code insertion). If it’s jumping in and colliding with txp, maybe it can be made to wait its turn?

As regards the two differences between the sites, maybe it helps to take a dump of each installation to your local computer and then run a diff on the folders to determine if there are any differences in the actual core files. If you’re on the newer txp version, the plugins directory should also contain the plugin code as text files and you can do a diff on that folder too, to determine whether the plugin code differs at all. Another thing you could look at is any differences between the bot_wtc re-arranging you are doing on each site. If there’s a difference there, you might be able to try out whether a particular instruction is causing it to trip on one site but not on the other.


TXP Builders – finely-crafted code, design and txp

Offline

#29 2020-09-26 16:54:10

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 3,946
Website

Re: bot_wtc v8 for Textpattern v4.7 (beta)

GugUser wrote #326110:

You are great, yes, that helps. Many, many thanks.

Cool! Maybe that makes further investigations unnecessary.

@bloke: can you explain why that might have an effect?


TXP Builders – finely-crafted code, design and txp

Offline

#30 2020-09-26 16:58:26

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,790
Website

Re: bot_wtc v8 for Textpattern v4.7 (beta)

jakob wrote #326112:

@bloke: can you explain why that might have an effect?

Because the JavaScript incorrectly assumed that the variable allForms (added by the Write panel code) exists and tries to inspect it when you change Section dropdown. When it couldn’t find it, crying ensued.

Fixed in upcoming 4.8.4.

Sorry for the issue.

Last edited by Bloke (2020-09-26 17:01:47)


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

Online

Board footer

Powered by FluxBB