Support

Account

Home Forums Bug Reports ACF not creating underscore fields in the database for translated pages

Helping

ACF not creating underscore fields in the database for translated pages

  • Hello!

    I have a peculiar problem with ACF not working correctly with WPML plugin. Here is the description of the problem:

    The wrong behavior of ACF plugin in tandem with WPML results in repeater fields not being stored correctly in the database, meaning that they cannot be displayed correctly on the front-end. When trying to fetch some information from a repeater field, present on a page, that is a translation (WPML) of another page, the result will not be an expected array of data, but a string which represents the number of rows in the repeater. The problem occurs only on the pages, which are translations of other pages and for all repeater fields, regardless of when it was added. There is one found solution for the problem. If you go to the original page (WPML) and change in any way a repeater, it will get fixed for the translation page as well and start working as expected. But that only works for the repeaters that were edited in any way on the original page. Meaning that the problem lies not in updating the database, but in creating a mandatory record in the first place.

    Example of database info on a broken page:
    https://imgur.com/pc3fNmq (first attachment)

    Example of database info on a correctly working page:
    https://imgur.com/tdOn1kO (second attachment)

    The correct one has an additional “underscore field” _faq_custom that points to the field that holds the data so that it can be fetched.

    Additional information
    If we manually add this “underscore field” (in this case, _faq_custom) to the database, everything starts working fine.

    After saving FAQ fields on the page in the original language we can see the following in the database
    https://imgur.com/b8BHgbf (third attachment)

    It adds not only _faq_custom field, but a bunch of other ones as well, that weren’t properly added before.

  • Forgot to mention the versions:

    ACF PRO Version 5.12.1
    WPML Version 4.5.8
    ACFML (compatibility plugin for ACF and WPML) Version 1.10.3

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

You must be logged in to reply to this topic.