Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi @ebeliejinfren,

    Are any of your other ACF fields returning data?

    Let me know.

    Thank you,
    Kevin.

    Thread Starter ebeliejinfren

    (@ebeliejinfren)

    Yes , All ACF fields plugin returning null
    other data tag working good

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi @ebeliejinfren,

    I think I’ve found the problem. We have an issue with dealing with dashes in meta field names. I added a test field, rest-api-test, and received the same results as you (i.e. null). I then added a new field, rest_api_test_v2, and the value was accessible in the API. So I renamed rest-api-test to rest_api_test and everything worked.

    Here is a screenshot showing that: https://imgur.com/a/UtEtK

    Is it feasible for you to change your meta field names to use underscores instead of dashes?

    Let me know.

    Cheers,
    Kevin.

    Thread Starter ebeliejinfren

    (@ebeliejinfren)

    thank you, yes by changing dash to underline problem solved.
    an extra info : filed that name have dash auto change dash to underline and return null Like : “artist-en” in api show “artist_en”

    new problem about acf filed that type are file, those fields not shown in module even

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi @ebeliejinfren,

    What type of save are you doing for files? File Object, File URL, or File ID?

    I added a file field (File Object), renamed the REST API field, and am seeing results in the REST API (appears to be the file ID – "rest_api_test_file":"36",).

    Thread Starter ebeliejinfren

    (@ebeliejinfren)

    i use file url for file and i dont find it in module

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    I just set up a field with the file URL and it seems like it’s still saving the ID but the data is definitely accessible in the API.

    Do you mean the field is not in the list of fields our plugin shows? We only show fields that have a value so if you need our field to show up try adding an image to your CPT and save it.

    Cheers,
    Kevin.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘ACF Meta callback Null’ is closed to new replies.