Skip Navigation

[Resolved] BUG / conflict occurring while trying to update post

This support ticket is created 6 years, 3 months 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 16 replies, has 3 voices.

Last updated by hendrikH 6 years, 2 months ago.

Assisted by: Beda.

Author
Posts
#597285

I am trying to:

So i've got multiple custom post fields on multiple post types. At one point i have noticed that certain post fields are not saving anymore on post update. (fields that where populated with no problem prior to this issue).
I haven't noticed any particular pattern in which the BUG occurs, since some posts and fields are not having this issue. And it is not based on a certain post types or fields.

Link to a page where the issue can be seen:

hidden link
example: all the posts (bike tours, hotels, restaurants) have a slider field assigned to them, only on some an image can be uploaded to this slider field and being kept upon update. But the problem extends to other fields too.

Until this point i have tried removing custom scripts that i have on the site, but with no result.
No other plugins were installed prior to the moment this BUG occured.

#597358

1. Please update your system.
WordPress, several Plugins and the Toolset are outdated.

2. If then the issue is not gone, please try to:
- disable all Plugins but Toolset
- use a native WordPress theme

3. If then it still persists (in this scenario I was not able top replicate a similar issue), please provide me a Duplicator Package:
https://toolset.com/faq/provide-supporters-copy-site/

Thank you!

#597520

Hello Beda,
I have updated all the plugins, Avada theme and WordPress. Also used a native theme for test (Twenty Seventeen), and the BUG is still occuring.
As a result i will link you the site duplicate and (credentials prior used by Nigel for another ticket).

Thank you

#598128

Repeating fields should not be used in child posts. Types will update all field values.

That is the first issue that you need to correct.
Those Field values won't apply as expected if used like this.

And I think it is exactly the image field that you mention which is repeated.
You cannot use repeating Fields in a Child post.

You might use repeating posts (make instead of repeating fields, many posts of a certain kind, one each image).

#598897

Hello Beda,

Ok i understand the repeating fields problem and i'll try to adjust.
In the mean time, what about the other fields that are not updating, which are not repeating fields.
For example on this post: hidden link
I have a Highlights field having the same issue.

Thank you.

#599264

I downloaded your package and activated Theme Twenty Seventeen, disabled all non Toolset Plugins, and then I saved the post you mention.

It said:

Field "E-Mail-Address" not updated: Please enter a valid email address.

I checked the value there, it's a valid email address.

Anyway that error seems the issue why it's not saving (since it fails, with an error message)

But, even if I leave that field empty, the WYSIWYG still doesn't save it's values.

I started picking apart the site (deleting plugins, theme's, unused files which are not part of a WordPress vanilla install).

I discovered a JS error in your install:

TypeError: Cannot read property 'getNotificationManagerImpl' of undefined

This is from the TinyMCE instance of WordPress.

Hence I thought eventually the install is corrupt, and replaced all WordPress files as well.
It did not help.

So I proceeded stripping the site, deleting Custom Field Groups, recreating new ones, etc. At no avail.

Only deleting all fields post types and then recreating new ones solved the issue.

The database showed a lot of corrupted data before I did this.
As example, post field groups where saved with a value of ,,,,
This seems to have been provoked by hidden errors, related to:
RevSliderBaseAdmin->onAddMetaBoxContent() and, Toolset_Theme_Integration_Settings_Front_End_Controller_avada->get_keys_from_filter(). Both functions seem to produce a PHP Notice, which is not replicable locally.

One function is from Revolution slider, and the last in the call stack.
The Toolset_Theme_Integration_Settings_Front_End_Controller_avada method is ours, it's used when you have AVADA and Toolset Installed, but this function came earlier in the call stack.

I am not able to replicate that error, but that might be due to some settings I miss.

Now, the problem is of course that I cannot ask you to recreate 300 Custom Fields.
But I do not know where the error sources from, and this will require time to fix on your specific site - I will need to send this package to a Developer for further investigation

What can help me a lot is:
- if you recall after what step this stopped working
- if you saved ANY form of HTML, JS, CSS or whatnot, that is not a simple string, in any of the fields.
==> If so, this might have caused a database corruption that is irreparable if the code somehow managed to manipulate other data.
This sounds impossible, but is not.
I have seen JS added within script tags in a Visual Editor that disabled the entire Toolset Layouts List.

I also saw that you use 3rd Party ShortCodes within our Fields, which seem to use a custom syntax and return complex data.
Such data can also corrupt the database

Of course all this is very unlikely but we see that there is a form of corruption ion how things are stored in the database.
Hence, at some point some thing must have sneaked in.

Starting with the JS error you should see on your live site as well, I guess there is as well a plugin who registers some JS code that conflicts with the native WordPress TinyMCE JS.

A quick test can be to disable all WYSIWYG Fields on that post type and re-try, but I suspect that won't help, since the data already is corrupted.

I will ask a developer to help us on this.

#599402
slider.jpg

Hello Beda, and thank you for your assistance.
Talking about unusual fields matter, form what i know of:

I had previously used a field (file field) to parse a .gpx where witch the user can download.
Here is a link to it: hidden link

But a more recent change after witch i've noticed the bug (and witch uses js code), is the Slider field:
hidden link
hidden link

I have not build the slider personally, so this is all i know about it. But that's the point when i've noticed the bug.

#599525

It's strange, on wp-admin/admin.php?page=ct-editor&ct_id=1957&ct_editor_choice=basic I see no JS, and the field is a Image field.
Those cannot upload dangerous file types unless you would have permitted so with custom code.

Anyway I disabled those Field Groups, but that did not solve the issue.
But the issue is solved when all but the "New Guided Tour Info" are deleted.

I tested that and also discovered a long chain of issues in the site, resulting in PHP errors.
Some are due to Toolset and some to fusion builder.

Still it is not clear what group creates the conflict but it is sure it's a group (or a setting that connects the group to some other group)

It could be a validation that tries to trigger an error in the page, but cannot because that field is conditional hidden, or similar.

Please check the settings of each group carefully or better, remove them from the post type temporarily (deactivate) and then re-activate.

Mohammed, 2nd Tier lead, will also look into this on Monday, and this ticket is assigned to him already.

#600634

Hello,
So I have checked the fields but didn't get a positive result.
Did you get any breakthrough on tier 2 support?

#600765

Hi Hendrik,

I'm Mohammed, the Toolset support team leader.

I'm posting here just to inform you that Beda is not working these days.I've asked another supporter to handle your request.

Please wait and we will be in touch with you again very soon.

Thanks.

#601104

Hi Hendrik,

Let me update you on the issue.

I've reported it to the development team and they are checking it.

Please keep watching this ticket and I will notify you once I get any updates.

Thanks.

#601105

I just wanted to inform you:
- For the chain of errors I discovered during the Debug, we did have an erratum already, which I missed.
Here it is:
https://toolset.com/errata/avada-5-3-triggers-php-warning-undefined-offset-1/
- But, this erratum will not solve the issue you reported initially here.

On that, the Developers are still working on.

The issue has been reported to them already as Mohammed stated above. I hope we can find the cause fast.

#603240

Hello,
Any news regarding the problem ?
It there a way to fix it?
Thank you!

#606118

I apologize that this issue escaped my attention.

There have been 2 errata:
https://toolset.com/errata/types-custom-fields-cant-be-saved-when-condition-is-used/ (Open)
https://toolset.com/errata/avada-5-3-triggers-php-warning-undefined-offset-1/ (Solved)

If you apply the erratum that is open, it should solve this issue.

Please perform a full backup for safety, before you proceed.

Thank you.

#606765

Hello Beta,
I have applyed the erratum that is open(replaced class.types.php), but i get the same behavior as before. On guided bike tours: hidden link
almost all the fields are not saving.
And on the other post types i can't save "Featured Image Slider" fields.
On your environment the bug was solved for this particular case ? And there is any way we can directly test if the future patch will solve the issue?
I have linked the login details for the site in a previous reply, if you want to take a look.
Please keep me updated on the situation, and thank you for your assistance.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.