Support

Account

Home Forums General Issues Display fields in front

Solving

Display fields in front

  • Hello All,

    I have a problem.
    For a customer, i’ve deleted 2 ACF fields. (wordpress – article pages)
    Finally, he comes back on this.

    I have (re)edited the 2 ACF fields.
    I can see the fields with there datas in the back-office,
    But I can’t see the content on the front.

    To see them, i have to “update” and save post-articles.

    Is there someone here to advise me ?

    Thanks by advance.
    D

  • The reason that this has happened is that you deleted the fields and when you added the fields back in the field keys are now different. There is no easy solution. One possibility would be to look in the table in the database and see if you can figure out what the old field key was. There will be an entry in the table where meta_key will equal `”_{$field_name}”… your field name preceded by an underscore. The meta_value will be the field_key. Find a post where the field has not been updated and you will probably be looking at the old field key. Replace this meta_value with the new field key in the entire table.

    I should not need to say this, but I will anyway, back up your database before attempting to do this.

  • Hello John,

    Many thanks to having take time to answer.

    So i am not so “easy” with DB but… I am going to Try your solution…

    Many thanks 😉

    Daniel

  • Hello,

    I dont want to take your time, and please can you give me précisions :

    SELECT * FROM wp_postmeta WHERE meta_key LIKE ‘chapo’ ORDER BY post_id ASC

    In the post_meta table, :
    > i found in the “meta_key” column = chapo (without underscore) = “_{$field_name}” (?)

    > In the “meta_value” = content of field (an introduction text)

    SO “The meta_value will be the field_key” > No

    My question : What is the key_field :

    I can not find a common key between the contents with “chapo” as “meta_key”, they all have the same name … I can not therefore differentiate the contents by a specific “id” field.

    Could you have an idea ?

    Many thanks,

    Daniel

  • 
    SELECT * FROM wp_postmeta WHERE meta_key = '_chapo'
    
  • OK ok ok…

    Many thanks again. It works, now I understand 😉
    Now i have to find difference beetween Old and New “_chapo” field

    Best regards

    D.

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

You must be logged in to reply to this topic.