• I have a couple ACF fields that are not being pulled into Notification via merge tags when I use the trigger “Story Published” (Custom Post Type). The Select field one will work if I unpublish the Story and then republish again. The text area field never shows up though.

    {acf {story_ID} feedback} <– feedback is a text area
    {acf {story_ID} status} <– status is a select field

    Not sure if this is related to your note: “ACF field has to be resolved to string value. You can use field name or field key.”

    Any ideas on what to do?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Kuba Mikita

    (@kubitomakita)

    Hmm, is this the flow?

    1. You have the Story published trigger set up with both {acf ...} merge tags
    2. You go to add new story via wp-admin
    3. You fill all the fields
    4. You publish the Story

    If yes, are you sure the feedback key is correct?

    Thread Starter amateurhr

    (@amateurhr)

    I just reperformed the test by creating in wp-admin (previously I was creating via Formidable) and here is my repro:
    1. Have Story published trigger setup with {acf …} merge tags
    2. Create new story via wp-admin
    3. Fill out all the fields (there are ~10 of all varieties by mainly text)
    4. Publish to trigger notification
    5. Notice all the fields besides Title are blank: https://screencast.com/t/9o7UMmJBto
    6. Unpublish the story
    7. Change nothing and republish (I fixed my title in the example but ignore)
    8. Notice all the fields show up: https://screencast.com/t/ErqRkitO8Q8

    I believe that somehow it’s not picking up the additional ACF fields until after the first publish.

    Thread Starter amateurhr

    (@amateurhr)

    I switched to using Story Update as the trigger, with a true/false flag in an ACF field to indicate if we want the webhook to fire. I noticed if I do 2 Story updates in a row within a few minutes to test out the events firing, the data being sent over to Notifications will be outdated.

    But all of these issues I’m reporting may be a caching issue with ACF that they’re in the middle of figuring out: https://github.com/AdvancedCustomFields/acf/issues/125

    Didn’t occur to me to question ACF since they have millions of installations but they’re the most likely culprit. We should resolve this ticket but I wanted to make sure you were aware of ACF issues.

    Plugin Author Kuba Mikita

    (@kubitomakita)

    Oh this is very valuable finding!

    Just to confirm, you are using ACF PRO beta, right?

    Thread Starter amateurhr

    (@amateurhr)

    I’m just using free ACF, but when I was googling I came across that post for Pro, I thought the issue might affect both versions since the developer was talking about refactoring ACF to solve this caching issue.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Custom Post published requires unpublish/republish to bring in ACF fields’ is closed to new replies.