Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#73 2020-01-09 13:28:32

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 687
Website Mastodon

Re: glz_custom_fields v2 beta for Textpattern v4.7

jakob wrote #320966:

There was a reason for that, but I had to look it up again – see this thread. In short, you can’t change it in the plugin, but you can use either rah_replace to search/replace the | to a , or you can use rah_repeat where you can specify the delimiter you want to use when processing the list of items.

Yes! Jakob, Du rockst. Dicken Dank. That was the answer. I did it before, but couldn’t remember on which of the various sites. Now i just hope that all this will be much more unproblematic with TXP 4.8 …

Last edited by jayrope (2020-01-09 13:29:16)


A hole turned upside down is a dome, when there’s also gravity.

Offline

#74 2020-01-09 13:32:55

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

Re: glz_custom_fields v2 beta for Textpattern v4.7

Glad you found it. The unlimited custom fields is not in txp 4.8 core (but is in development in a separate branch) but txp 4.8 contains a lot more and is worth updating to when it comes out.

I’ll have to investigate the new plugin format where attached files can be included as part of the plugin. That could make sense for a txp-4.8-only version of this plugin to make installing easier.


TXP Builders – finely-crafted code, design and txp

Offline

#75 2020-01-09 13:48:20

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 687
Website Mastodon

Re: glz_custom_fields v2 beta for Textpattern v4.7

jakob wrote #320968:

Glad you found it. The unlimited custom fields is not in txp 4.8 core (but is in development in a separate branch) but txp 4.8 contains a lot more and is worth updating to when it comes out.

So i will just hope, that the current glz_custom_fields v2 beta will STILL work with TXP 4.8 … ui ui ui.


A hole turned upside down is a dome, when there’s also gravity.

Offline

#76 2020-01-09 14:03:48

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 687
Website Mastodon

Re: glz_custom_fields v2 beta for Textpattern v4.7

While we’re at it:
Can anybody see a way to turn single values from multiple entry custom fields into individual search terms?
Just looking for a roadmap there.
Thank you!


A hole turned upside down is a dome, when there’s also gravity.

Offline

#77 2020-01-09 14:14:14

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

Re: glz_custom_fields v2 beta for Textpattern v4.7

Can you explain what you’re trying to achieve?

Two examples:

1. A list of search links with each selected value:

<txp:rah_repeat value='<txp:custom_field name="your-multi-cf" />' delimiter="|">
    <a href="https://example.com/?q=<txp:rah_repeat_value escape="url" />">
        Search for “<txp:rah_repeat_value />”
    </a>
</txp:rah_repeat>

or 2. a single search term comprised of all chosen values together:

<!-- construct the search term out of the chosen options -->
<txp:variable name="search_term" escape="trim">
<txp:rah_repeat value='<txp:custom_field name="your-multi-cf" />' delimiter="|" break="+" escape="trim">
    <txp:rah_repeat_value />
</txp:rah_repeat>
</txp:variable>
<!-- the search link -->
<a href="https://example.com/?q=<txp:variable name="search_term" escape="url" />">Search for <txp:variable name="search_term" /></a>
jayrope wrote #320971:

Just looking for a roadmap there.

The idea is that this plugin eventually disappears when more flexible custom fields hit the core. Ideally, at that point, you can migrate your glz_custom_fields to the core method and then remove the plugin altogether.

I will endeavour to ensure it keeps working until then to the best of my abilities but I don’t really want to add any functionality that will mean it is still needed after that.


TXP Builders – finely-crafted code, design and txp

Offline

#78 2020-02-25 09:12:18

THE BLUE DRAGON
Member
From: Israel
Registered: 2007-11-16
Posts: 619
Website

Re: glz_custom_fields v2 beta for Textpattern v4.7

Hi I’m getting some errors while creating/deleting a field, regardless the type.
Also in a case of creating a textarea type field it is also “clears” all the data from existing textarea fields from all existing articles, but if I delete that field the data “restores” back.

using TXP v4.8.0 beta3 and PHP7.0, on a migrated installation, in localhost.
I’m currently having 55 custom fields and would like to create more.

On creation error:

User_Error “Incorrect datetime value: ’0000-00-00 00:00:00’ for column ‘Expires’ at row 3”
in C:\wamp64\www\example\textpattern\lib\txplib_db.php at line 403.

Visiting the Write tab returns an error:

User_Error “Unknown column ‘custom_56’ in ‘field list’”
in C:\wamp64\www\example\textpattern\lib\txplib_db.php at line 403.

Deleting any custom field other than the core fields (1-10), returns a error:

There was a problem deleting custom field ID# 25
User_Error “Can’t DROP ‘custom_25’; check that column/key exists”

Last edited by THE BLUE DRAGON (2020-02-25 09:14:04)

Offline

#79 2020-02-25 10:42:42

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,281
Website GitHub

Re: glz_custom_fields v2 beta for Textpattern v4.7

THE BLUE DRAGON wrote #321886:

User_Error “Incorrect datetime value: ’0000-00-00 00:00:00’ for column ‘Expires’ at row 3”

I thought the patched version dealt with the NULLDATETIME issue already. One might have slipped through the net, or your MySQL table definitions may need updating to reflect current Txp practices when dealing with null values. There are topics floating around the forum with NULLDATETIME fixes and avenues of exploration, if that helps.

I’m currently having 55 custom fields and would like to create more… Unknown column ‘custom_56’ in ‘field list’

You’re likely hitting the MySQL column or (more likely) row limit. This is a byproduct of custom fields being stored in the article table and is a key driver for moving them out when we eventually merge unlimited custom fields into core.

I expect most of the issues you face with weird data loss and plugin behaviour is related to this.


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

Offline

#80 2020-02-25 16:20:29

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

Re: glz_custom_fields v2 beta for Textpattern v4.7

Thanks for diving in there Stef. I wouldn’t have known that.

User_Error “Incorrect datetime value: ’0000-00-00 00:00:00’ for column ‘Expires’ at row 3”

The datetime message says it refers to ‘Expires’ which should not be affected by glz_custom_fields at all.

All the same, I haven’t tested glz_custom_fields conclusively against txp 4.8.0 yet, so there may be some tweaks coming.


TXP Builders – finely-crafted code, design and txp

Offline

#81 2020-02-26 16:56:35

THE BLUE DRAGON
Member
From: Israel
Registered: 2007-11-16
Posts: 619
Website

Re: glz_custom_fields v2 beta for Textpattern v4.7

Thank both of you very much.

I ended updating my WAMP server to a newer PHP and MySQL versions:

Before it was:
WAMP server v3.0
PHP7.0
MySQL 5.6 I think.

Now:
WAMP server v3.2
PHP7.4
MariaDB 10.4.10
MySQL 8.0.18.

and now everything seems to be working fine,
by creating a new custom field and deleting it, it “refreshed” whatever was “stuck” and need from the old version and I am able to create/delete new fields with no problems and no errors (at least for now LOL).

I was doing lots of testing today, the reason I have decided to update WAMP server it is because I couldn’t run a query to search for “0000-00-00 00:00:00” in Expires filed in “textpattern” table and replace it with “NULL”.
But after updating to the new WAMP version I do not receive that error anymore and even that there are still lots of “0000-00-00 00:00:00” values in the textpattern table, I do not seems to need to do anything about it as I do not get that error message unlike before.
Is it still better to search-replace the “0000-00-00 00:00:00” values into “NULL” or should I keep it as it is please?

Offline

#82 2020-02-26 21:00:46

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

Re: glz_custom_fields v2 beta for Textpattern v4.7

Thanks for the feedback and glad you got it working again.

FWIW: I’ve done some very preliminary testing on a new 4.8.0 release with some sample articles using v2.0beta as found here and the following have all worked without any problems:

☑ Adding new custom fields of types textarea, text input, date input
☑ Changing custom field order per drag and drop
☑ Adding field label titles and instruction text
☑ Switching language and adding field label titles and instruction text
☑ Switching back to the original language and field label titles and instructions are still intact
☑ Deleting custom fields

Obviously that’s not conclusive by any means, but it looks like the main functionality works out of the box. Oleg has since added the possibility to bundle dependencies along with a plugin as part of a zip installer file, e.g. a zip file one imports via the Plugins panel: that would make it possible to include the javascript and css that currently needs installing separately and could allow one to simplify the prefs. I will investigate.


TXP Builders – finely-crafted code, design and txp

Offline

#83 2020-02-26 22:00:21

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

Re: glz_custom_fields v2 beta for Textpattern v4.7

jakob wrote #321952:

Thanks for the feedback and glad you got it working again.

FWIW: I’ve done some very preliminary testing on a new 4.8.0 release with some sample articles using v2.0beta as found here and the following have all worked without any problems:

FWIW – I haven’t had any issues with the plugin on TXP 4.8.0 or dev, save for the hiccup I mentioned up thread

Everything working with PHP v7.2+ and mySQL 5.7 or 8


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

Offline

#84 2020-09-10 14:00:58

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 687
Website Mastodon

Re: glz_custom_fields v2 beta for Textpattern v4.7

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!”

thanx in advance!


A hole turned upside down is a dome, when there’s also gravity.

Offline

Board footer

Powered by FluxBB