Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: bot_wtc v8 for Textpattern v4.7 (beta)
I ran into a problem in combination with glz_custom_fields like described here already.
But I am quite sure it is more of a bot_wtc-problem so I wanted to continue here.
Basically when having a textarea outside the normal custom_fields box it duplicates when saving.
This does not happen with normal inputs.
But I cannot figure out on how to fix it.
I am not even sure if I am looking at the right spot.
It could be related to the function:
function bot_wtc_jquery_cleanrefresh_rows()
But I am not sure. If anybody could help me on this it would be great.
I could also make this a payed job, because I need it for a project.
glz_custom_fields Version is: 2.0.1
bot_wtc Version is: 8.0
Last edited by demoncleaner (2021-05-11 09:50:37)
Offline
Re: bot_wtc v8 for Textpattern v4.7 (beta)
demoncleaner wrote #330103:
I ran into a problem in combination with glz_custom_fields like described here already.
But I am quite sure it is more of a bot_wtc-problem so I wanted to continue here.Basically when having a textarea outside the normal custom_fields box it duplicates when saving.
This does not happen with normal inputs.But I cannot figure out on how to fix it.
I am not even sure if I am looking at the right spot.It could be related to the function:
function bot_wtc_jquery_cleanrefresh_rows()...But I am not sure. If anybody could help me on this it would be great.
I could also make this a payed job, because I need it for a project.glz_custom_fields Version is: 2.0.1
bot_wtc Version is: 8.0
Have a look at $bot_arr_item_groups because the function bot_wtc_jquery_cleanrefresh_rows() compares the items that you have set to be repositioned against their “home” locations and removes them if they are not found. It could be that your custom_field or extra field is not listed in that array. The custom fields are not listed there and there may have been a good reason for that but it was a while ago and I can’t remember. It may need an additional check for duplicate items outside their “home” location.
TXP Builders – finely-crafted code, design and txp
Offline
Re: bot_wtc v8 for Textpattern v4.7 (beta)
Thanks jakob. I am on it.
Just to give you an indermediate result:
I think it is not a custom_field related problem at all.
I deleted all my current custom_fields and moved the Excerpt field with bot_wtc before the body field. Same thing happens. On save I will have a duplicate of the Excerpt textarea including its (old) value.
Which disappears when I reload the page.
Offline
Re: bot_wtc v8 for Textpattern v4.7 (beta)
Have a look at $bot_arr_item_groups
Adding
'#main_content' => array (
'.excerpt'
),
to the array solved the problem. Not sure if this solution brings other issues.
I guess there must be a better way to generally solve this than adding all custom_fields that are moved to main_content to this array.
Offline
#50 2021-07-14 09:49:49
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: bot_wtc v8 for Textpattern v4.7 (beta)
Just had a tentative prod at bot_wtc. On TXP 4.8.7 running v8.0, when I untick the last hidden section I get:
Notice "Undefined variable: static_sections_string"
in /Users/adi/Sites/textpattern-4.8.7/textpattern/plugins/bot_write_tab_customize/bot_write_tab_customize.php at line 803.
textpattern/plugins/bot_write_tab_customize/bot_write_tab_customize.php:803 adminErrorHandler()
bot_wtc_tab()
textpattern/lib/txplib_misc.php:1589 call_user_func_array()
textpattern/index.php:231 callback_event()
BTW for anyone using adi_menu, be aware that may fiddle with the section list as well (if the user so chooses). This can cause issues with bot_wtc, as deamoncleaner has discovered. The next release of adi_menu will put a stop to this, in the meantime just set the two prefs to “name” & “no”.
Offline
Re: bot_wtc v8 for Textpattern v4.7 (beta)
My workaround for the textarea duplication issue was to use css to position everything instead.
I added a stylesheet to the admin-theme (referencing it in /textpattern/config.php).
display: contents; is used to null out the container divs, making their children addressable using grid-template-areas:
.txp-layout { // 12x
grid-template-areas:
// 'xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx
'headng headng headng paging paging paging paging paging paging save__ save__ save__'
'title_ title_ title_ title_ title_ title_ title_ title_ title_ author author author'
'title_ title_ title_ title_ title_ title_ title_ title_ title_ action action action'
'excrpt excrpt excrpt body__ body__ body__ body__ body__ body__ srtdsp srtdsp srtdsp'
'cf3___ cf3___ cf3___ body__ body__ body__ body__ body__ body__ datesg datesg datesg'
'cfgrop cfgrop cfgrop body__ body__ body__ body__ body__ body__ catsgp catsgp catsgp'
'artimg artimg artimg artimg artimg artimg artimg artimg artimg metagp metagp metagp'
'artimg artimg artimg artimg artimg artimg artimg artimg artimg comtgp comtgp comtgp'
'artimg artimg artimg artimg artimg artimg artimg artimg artimg recent recent recent'
;
grid-template-rows: min-content;
grid-auto-rows: auto;
}

The top row uses too much space (this being my first attempt). I still need to shift the action blocks to a better location…
Offline