Skip Navigation

[Resolved] some CPT groups aren't updated

This support ticket is created 3 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 4 replies, has 2 voices.

Last updated by Eugene Mednikov 3 years ago.

Assisted by: Jamal.

Author
Posts
#2209459

Very strange issue. I've got a CPT with grouped fields. Some fields at some group rows aren't updated (at specific post). You'll have to look at the site itself, I have no idea how to reproduce it...

#2209943

Hello and thank you for contacting Toolset support.

Sure, I'd like to see this issue closely. Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **
Please let me know for what posts this happens, and what grouped fields?
If you could record a short screencast to demonstrate the issue, that would be very helpful. I usually use "Loom" or "Screencastify" for that.

In the meantime, can you increase the max_input_vars PHP variables on your website to make sure that's not the issue behind it?
hidden link

Make sure that the PHP memory limit is at least 128M as required by Toolset https://toolset.com/toolset-requirements/

#2210003

PHP settings look good:
"PHP":{"MemoryLimit":"256M","UploadMax":"100M","PostMax":"100M","TimeLimit":"30","MaxInputVars":"3000"}}

#2210055

Thank you for the credentials. From what I gathered so far, the unsaved fields have a display condition on a checkbox field. They should display only when the field's value is not equal to 1.

At first sight, I thought that this happens because the field is configured to store the value("1") on the database only when it is checked, which has its benefits for views with search forms.

So, I tried to reproduce this on a clean install, here hidden link
It was reproduced, even if I configured the field to store "0" on the database when the checkbox is not checked.

Recently, in Toolset Types 3.4.13, we fixed a problem when clearing values for fields hidden due to conditionals. This issue may be related to it.

IMHO, besides what will be stored on the database, and from a PHP point of view, an unchecked checkbox does not have a value(NULL) instead of having the value "0", vs "1" when the checkbox is checked.

I tried a test using a Select field("Has Answer Select" on my test site), with two options(No/Yes) with the corresponding values(0/1). Then I configured the conditional display rules based on these custom fields, and they worked as expected.

Unfortunately, the UI does not allow to change the field type once set, otherwise, we can change the type to a select field with two values(0/1) and 0 being the default value. This way, a value will always exist (either 0 or 1) for the conditional display rules.
However, with some browser console manual hacks, I was able to choose a select field type, save the custom fields group. Then, add the options (Yes/No) with values(1/0), No(0) being the default, and it worked correctly.

I hope this helps. Let me know if you have any questions.

#2211301

ok, I've simply removed conditionals from there and it started to work... they weren't critical there after all

hopefully, you'll fix it eventually