Support

Account

Home Forums Bug Reports Error when saving field groups.

Solving

Error when saving field groups.

  • I upgraded to the latest version of ACF (5.3.2.2) today and after saving a field group, I noticed that the groups weren’t loading when I viewed one of my edit pages. I dug into the issue and it looks like the operator parameter for the rules was set to an empty string. I jumped into the database and set the operator string to == and my field groups came back.

    Then after fixing the issue, I went to the edit page for one of the field groups and if I view the values in the rule operator drop-down the “is equal to” option has a value of an empty string again. So I’m not sure where along the lines this issue breaks the field group, but this seems like a good start.

  • You might want to try reinstalling. Deactivating other plugins. Switching themes. I’m not seeing this type of error on my test site. If the problem persists you may want to submit a new support ticket http://support.advancedcustomfields.com/new-ticket/

  • I am getting this same error/issue.

    Edit: I do have the Deluxe version, as well. So it seems for certain that this plugin is the issue?

  • I am still not able to recreate this problem. Have you tried deactivating other plugins and switching themes?

    I’m not the developer but there’s only a couple of reasons that think of for this happening.

    The first is that something is wrong with your installation of ACF.

    The second is that there is something that’s modifying the post content for acf field groups. The field group settings are stored as a JSON encoded string in the post content fields.

    The third reason is that there is a filter of function somewhere that’s messing with the operator value of the location rule.

  • I found my problem to be a conflicting plugin that caused this error. Namely, Woo Commerce Store Exporter – by Visser Labs. Disabling that plugin allowed me to create/edit fields and have the groups display on the backend editor.

    To check this issue quickly, I would disable a plugin, then edit a field group, export that group to json, open it up, and search to see if operator: “” showed up. If it did, I would disable another plugin, and edit the field group again, and export, view, etc. When I arrived at operator: “==”, I knew I found my culprit.

    Edit: Store Exporter Deluxe is the plugin.

  • I have that same plugin and can confirm that this is indeed the issue. Now how it’s hijacking a field like this seems a little odd.

  • Does this happen for all field groups for all post type location rules or just some post type location rules?

  • You’re going to hate me, but… I have a test site that I keep around for testing WooCommerce stuff. It has

    – WP 4.3.1
    – ACF 5.3.2.2
    – WooCommerce 2.4.10

    and I installed WooCommerce – Store Exporter 1.8.3

    I’m not saying that it’s not going away when deactivating this plugin, but with just these 3 plugins I’m not seeing an issue.

    What other plugins do you each have installed on the site, there must be something else in common.

    (Also, just a side note, the store exporter is not compatible with ACF5, only ACF4. Meaning it won’t export custom fields created with ACF5.)

  • Here’s my list of active plugins. I have the Deluxe version of the store exporter. Maybe that’s the difference. I can zip that up and send it over for testing is needed.

    – Advanced Custom Fields Pro: by elliot condon – 5.3.2.2
    – AJAX Thumbnail Rebuild: by junkcoder – 1.12
    – Enable Media Replace: by Måns Jonasson – 3.0.3
    – Gravity Forms + Custom Post Types: by Brad Vincent – 3.0.1
    – Gravity Forms: Notification Attachments: by Timothy Wood (@codearachnid) – 1.5
    – Groups WooCommerce: by itthinx – 1.9.1
    – LearnDash WooCommerce Integration: by LearnDash – 1.2
    – Peter’s Login Redirect: by Peter Keung – 2.9.0
    – Post Types Order: by Nsp Code – 1.8.5
    – Redirection: by John Godley – 2.4.3
    – LearnDash LMS: by LearnDash – 2.1.5
    – Smart Manager: by Store Apps – 3.9.10
    – SumoMe: by SumoMe – 1.10
    – Twitter Widget Pro: by Aaron D. Campbell – 2.8.0
    – Visser Labs Updater: by Visser Labs – 1.2
    – WooCommerce – Autocomplete Order: by Mirko Grewing – 1.1.1
    – WooCommerce Deposits: by Abdullah Ali – 1.5
    – WooCommerce Dynamic Pricing: by Lucas Stark – 2.10.5
    – Follow-Up Emails: by 75nineteen Media LLC – 4.4.7
    – WooCommerce Moneris Gateway: by WooThemes / SkyVerge – 2.3.4
    – WooCommerce Google Analytics Integration: by WooThemes – 1.3.0
    – WooCommerce Product Add-ons: by WooThemes – 2.7.12 – 2.7.13 is available
    – WooCommerce Purolator: by Guillaume Prieur – 2.1.9
    – WooCommerce – Store Exporter Deluxe: by Visser Labs – 2.0.3
    – WooCommerce Subscriptions: by Prospress Inc. – 2.0.6
    – WooCommerce: by WooThemes – 2.4.10
    – WP Crontrol: by John Blackbourn & Edward Dale – 1.3
    – WP Instagram Widget: by Scott Evans – 1.8.1
    – WP Super Cache: by Automattic – 1.4.6
    – Gravity Forms: by rocketgenius – 1.9.14
    – Gravity Forms MailChimp Add-On: by rocketgenius – 3.7.1
    – Post Duplicator: by Metaphor Creations – 2.12
    – Groups: by itthinx – 1.9.0
    – Multisite User Management: by Brent Shepherd – 1.1
    – WooThemes Helper: by WooThemes – 1.5.9
    – iThemes Security Pro: by iThemes – 2.0.2
    – BuddyPress Community Stats: by rich @etiviti – 0.5.4
    – Advanced Custom Fields Pro: by elliot condon – 5.3.2.2
    – WP Super Cache: by Automattic – 1.4.6
    – Yoast SEO: by Team Yoast – 3.0.3
    – wpMandrill: by Mandrill – 1.33
    – Network Plugin Auditor: by Katherine Semel – 1.9.1

  • I can’t look at the code for the deluxe version of the plugin, so that’s probably why I’m not seeing the error. There is supposed to be compatibility with ACF. At this point I’m going to say that you’re best bet at getting help with the issue would be to contact the author of that plugin.

  • I dug into this one more and found the culprit. The Store Exporter Deluxe plugin adds a “attribute_escape” filter, which ends up overriding the esc_attr call that ACF makes when it outputs the value of a field. The filter specifically removes the equals symbol from the value, which explains why we’re getting an empty string for the “is equals to” value. This filter is applied in the /plugins/woocommerce-store-exporter-deluxe/includes/formatting.php file. I commented out the filter for now and ACF is back to working as expected. I’ll reach out to the other developer to see if he can clean up this issue, though maybe there’s something that ACF can do to prevent other plugins from overriding the esc attributes like this.

  • That’s the nature of using a hook and filter system. Anyone can override what you’ve done. The best suggestion is to contact the other developer and see if he can alter his code so that it does not run when it doesn’t need to, for example, when the post type is acf-group or acf-field. At any rate, an export plugins shouldn’t be altering anything that’s being saved, somehow that doesn’t sound like what and exporter should be doing, but I don’t know much about the plugin.

  • Hi guys, yup *head smack*, that’s an old WordPress Filter I’d forgotten about that was being applied globally, have moved it to conditional use for our export engine only in the 2.0.4 Plugin update going out today.

    The free Store Exporter Plugin is not affected as it does not use this WordPress Filter.

Viewing 13 posts - 1 through 13 (of 13 total)

The topic ‘Error when saving field groups.’ is closed to new replies.