Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#85 2020-09-10 16:54:37

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

Re: glz_custom_fields v2 beta for Textpattern v4.7

In various installations it works without problems so far.

Offline

#86 2020-09-10 23:32:12

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,220
Website

Re: glz_custom_fields v2 beta for Textpattern v4.7

jayrope wrote #325870:

Just for clarity: Does the the beta 2.0 from github work with 4.8.2 or should one be careful? I read through the thread here, but can’t see a clear “yes! it works!”

ditto what GugUser says – the latest from GH you linked to works OK from here.

(as always have a backup of the DB at hand before any upgrading etc etc and so on)


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#87 2020-09-19 15:18:12

peterj
Member
From: Melbourne, Australia
Registered: 2005-06-02
Posts: 99

Re: glz_custom_fields v2 beta for Textpattern v4.7

Hi, I’m just playing with the multi-select, as I build up the courage to make a custom script based field. My multi-select field is throwing an alert on the write tab (see below), though values save.
Running 2.0 Beta on TXP 4.8.2 on PHP 7.4. In debug mode.

8192 "implode(): Passing glue string after array is deprecated. Swap the parameters"
in /home/xoxoxo/2020dev/textpattern/plugins/glz_custom_fields/glz_custom_fields.php at line 1808.
adminErrorHandler()
textpattern/plugins/glz_custom_fields/glz_custom_fields.php:1808 implode()
textpattern/lib/txplib_misc.php:1506 glz_custom_fields_before_save()
textpattern/index.php:224 callback_event()

I found the code in glz_custom_fields_before_save():

$value = implode($value, '|');

Changed this around to

$value = implode('|', $value);

Now it’s happy. Old way deprecated in 7.4.

Last edited by peterj (2020-09-19 15:18:48)

Offline

#88 2020-10-15 03:46:59

wavesource
Member
From: Australia
Registered: 2011-08-02
Posts: 56

Re: glz_custom_fields v2 beta for Textpattern v4.7

peterj wrote #325968:

I found the code in glz_custom_fields_before_save():
$value = implode($value, '|');...
Changed this around to
$value = implode('|', $value);...
Now it’s happy.

This bug is confirmed in TXP 4.8.3. Fix works.

Last edited by wavesource (2020-10-15 03:49:10)

Offline

#89 2021-03-24 04:48:43

peterj
Member
From: Melbourne, Australia
Registered: 2005-06-02
Posts: 99

Re: glz_custom_fields v2 beta for Textpattern v4.7

Same problems with checkboxes.
TXP 4.8.4 on PHP 7.4.

Offline

#90 2021-03-24 09:05:55

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,742
Website

Re: glz_custom_fields v2 beta for Textpattern v4.7

peterj wrote #329414:

Same problems with checkboxes.
TXP 4.8.4 on PHP 7.4.

Thanks for prodding me. I’ve updated that online and done a minor re-issue with that change included.


TXP Builders – finely-crafted code, design and txp

Offline

#91 2021-05-09 05:51:42

demoncleaner
Plugin Author
From: Germany
Registered: 2008-06-29
Posts: 220
Website

Re: glz_custom_fields v2 beta for Textpattern v4.7

It seems I just ran into a bug that I would like to describe here and see if somebody can reproduce or even solve it.

I have multiple custom_fields as teaxtareas and some textinputs as well.

When I am saving the article it duplicates the textareas (and sometimes their entries) so that I see clones of the textarea in my write pane. When reloading the page it disappears.

I am testing in 4.8.5.

EDIT: Sorry. I just found out, the problem is related to the plugin write_tab_customize. It only appears when custom fields are textareas and move to a different position via this plugin.

Last edited by demoncleaner (2021-05-09 07:29:16)

Offline

#92 2021-05-09 22:28:40

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

Re: glz_custom_fields v2 beta for Textpattern v4.7

demoncleaner wrote #330073:

When I am saving the article it duplicates the textareas (and sometimes their entries) so that I see clones of the textarea in my write pane. When reloading the page it disappears.

Have you installed glz_custom_fields_v2.0.1?

Offline

#93 2021-05-10 05:51:51

demoncleaner
Plugin Author
From: Germany
Registered: 2008-06-29
Posts: 220
Website

Re: glz_custom_fields v2 beta for Textpattern v4.7

Have you installed glz_custom_fields_v2.0.1?

yes

Offline

#94 2021-05-10 07:33:46

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,742
Website

Re: glz_custom_fields v2 beta for Textpattern v4.7

demoncleaner wrote #330073:

When I am saving the article it duplicates the textareas (and sometimes their entries) so that I see clones of the textarea in my write pane. When reloading the page it disappears.

EDIT: Sorry. I just found out, the problem is related to the plugin write_tab_customize. It only appears when custom fields are textareas and move to a different position via this plugin.

Both plugins originate from an era before the Ajax-based saving on the write tab. In those days the entire tab was reloaded and glz_cf and bot_wtc would then do their additions/changes on page load (bot_wtc also when the section drop-down is changed). Over the years, various people have patched the plugin to keep up with changes in the Textpattern interface but as you say there are problems when custom fields lie outside the custom fields panel when the Ajax-update refreshes that section.

I guess bot_wtc should be triggered again on ajax-save to ditch any ‘stale‘ custom fields outside the custom fields block and replace them with their ‘fresh’ replacements from the custom fields block. I don’t have the time to investigate this just now but the plugins are both on GitHub and you’re welcome to fork them: glz_custom_fields and bot_wtc.


TXP Builders – finely-crafted code, design and txp

Offline

#95 2021-05-10 07:48:22

demoncleaner
Plugin Author
From: Germany
Registered: 2008-06-29
Posts: 220
Website

Re: glz_custom_fields v2 beta for Textpattern v4.7

Thanks for the explanation of the origin of its behavior. I will try to fix it.

Offline

#96 2021-12-13 07:21:59

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,220
Website

Re: glz_custom_fields v2 beta for Textpattern v4.7

with PHP 8.1 the plugin seems to work in my basic tests (I don’t use it much beyond a set of radios here or there).

Some noise and complains (admin side): github.com/jools-r/glz_custom_fields/issues/7


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

Board footer

Powered by FluxBB