Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#193 2011-04-25 23:16:24

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: bot_write_tab_customize: rearrange and style items in the write tab

johnstephens wrote:

I have not looked at it in any version of Firefox yet. I’m getting the same results in Safari (v5.0.4), Opera (v11.10), and Chrome (10.0.648.205). It seems like something is impeding bot_wtc from loading on the Write tab. Can I look for something in the HTML source to verify that bot_wtc is active in the Write tab?

Ok. It was strange I could solve it so quickly, wasn’t it?
Anyway yes, search the source code —in the ‘write’ tab— for this snippet:

$("select#section.list").change(function(){

If you find it, it means the js code is loaded properly so we can narrow our bug hunt.

P.S. for the record it’s working for me in both Opera and Chrome

Last edited by redbot (2011-04-25 23:19:28)

Offline

#194 2011-04-26 00:10:25

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 997
Website

Re: bot_write_tab_customize: rearrange and style items in the write tab

Thanks again, Red! That code-block is there, just before <div id="end_page">. But I note that a few of the lines seems to have too many square brackets, or anyway it’s inconsistent:

			$("p:has(*[name=custom_6])").show();
==>			$("p:has(*[name=custom_17[]])").show();
			$("p:has(*[name=custom_18])").show();

			[...]

			$("p:has(*[name=custom_20])").show();
==>			$("p:has(*[name=custom_14[]])").show();
			$("p:has(*[name=custom_2])").show();

			[...]

			$("p:has(*[name=custom_25])").show();
==>			$("p:has(*[name=custom_26[]])").show();

The same custom fields are displaying extra square brackets in the hide section too. Could this be the problem?

Thanks!

Offline

#195 2011-04-26 01:14:21

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: bot_write_tab_customize: rearrange and style items in the write tab

Good catch! the bug is showing only if you use bot_wtc with glz_custom and a cf of type “checkbox” or “multiselect”.
This worked before so I suppose there was some change in the latest jquery version.
Anyway you can try if this fixes the issue,
Edit the plugin and around line 150 replace:

$selector = '$("p:has(*[name='.$name.'[]])")';

with:

$selector = '$("p:has(*[name*='.$name.'])")';

If this works I’ll release a new version with a more polished fix.

Offline

#196 2011-04-26 02:31:08

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 997
Website

Re: bot_write_tab_customize: rearrange and style items in the write tab

Sure enough, the fields with the extra brackets are all checkboxes. However, when I edit the plugin as directed, nothing changes in the Write tab— I get identical source code, even when I delete my browser’s cache.

Offline

#197 2011-04-26 08:16:13

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: bot_write_tab_customize: rearrange and style items in the write tab

johnstephens wrote:

Sure enough, the fields with the extra brackets are all checkboxes. However, when I edit the plugin as directed, nothing changes in the Write tab— I get identical source code, even when I delete my browser’s cache.

Oops, I forgot to tell that after the above mentioned change you have to delete and set again the specific rules dealing with checkboxes.
That’s because the ‘wrong’ selector is still stored in the db until you delete and re-create it.

Offline

#198 2011-04-26 11:50:08

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 997
Website

Re: bot_write_tab_customize: rearrange and style items in the write tab

Thanks again, Red! As predicted, this completely solves the problem. I couldn’t delete the rules from the bot_wtc tab because there were errors showing, but I was able to remove them using phpMyAdmin. Thank you!

Offline

#199 2011-04-26 17:26:16

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: bot_write_tab_customize: rearrange and style items in the write tab

johnstephens wrote:

Thanks again, Red! As predicted, this completely solves the problem.

Glad it worked!
Anyway consider it only as a temporary solution. I’ll release ASAP a new version which handles this issue more reliably.
(for the curious I can confirm this was caused by some recent changes in jquery which now requires mandatory quotes in some circumstances)

Offline

#200 2011-05-30 12:17:18

funtoosh
Member
From: Münster, Germany
Registered: 2006-10-09
Posts: 149
Website

Re: bot_write_tab_customize: rearrange and style items in the write tab

ups! i just noticed that i get a couple of these in the extension tab since i upgraded to TXP 4.4.0 and BWTC 0.7:

Notice: Undefined index: $("p:has(select[id*=markup-excerpt])") in /home/ ... /textpattern/lib/txplib_misc.php(653) : eval()'d code on line 323

didn’t find any other sightings of that snippet — any ideas?
cheers, -f

Offline

#201 2011-05-30 20:09:17

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: bot_write_tab_customize: rearrange and style items in the write tab

funtoosh wrote:

ups! i just noticed that i get a couple of these in the extension tab since i upgraded to TXP 4.4.0 and BWTC 0.7….

Hey funtoosh thank you for reporting.
Unfortunately these are frantic days for me but I’ll try to have a look asap, ok?

Offline

#202 2011-05-31 11:11:56

funtoosh
Member
From: Münster, Germany
Registered: 2006-10-09
Posts: 149
Website

Re: bot_write_tab_customize: rearrange and style items in the write tab

yeah, fine.
looks like it’s got sth. to do with renamed IDs in 4.4.0 after the upgrade, or in the german lang file?
[id*=markup-excerpt] etc.

(does not make sense, really, but that’s what it loks like.)

Offline

#203 2011-06-01 03:37:56

maruchan
Member
From: Ukiah, California
Registered: 2010-06-12
Posts: 586
Website

Re: bot_write_tab_customize: rearrange and style items in the write tab

I get the same error here in 4.4.0.

Edit: Didn’t have time to troubleshoot, so I removed the plugin, dropped the table, and am starting anew with a reinstall. No notices so far.

Last edited by maruchan (2011-06-01 04:44:35)

Offline

#204 2011-06-01 08:49:27

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: bot_write_tab_customize: rearrange and style items in the write tab

funtosh and maruchan

As I said I’ve not much time now. Just a quick question for you: Does this happen if you are upgrading from txp 4.3 to 4.4 or if you are upgrading from a pre-4.3 version to 4.4?
In this second case this is normal given the massive changes in the ‘write’ tab markup introduced with txp 4.3.
I must have already said it somewhere: in this case you have to delete and rewrite all the rules you set before to fix everything.

If the issue arises when you upgrade from txp 4.3 to 4.4 the there is actually a problem and I ‘ll have to investigate further.

Offline

Board footer

Powered by FluxBB