Support

Account

Forum Replies Created

  • also the action “acf/save_post” is never triggered

  • everything you describe point to a problem with your jquery, as you already suspected.

    jquery is accessing the websites DOM. if the DOM is not finished with loading, jquery will fail. this is why is sometimes workes. it means that sometimes the DOM is loaded in time, sometimes it takes split seconds longer and jquery wont find anything.

    solution is: make sure jquery is executed after the DOM is loaded.

    read more here:
    https://learn.jquery.com/using-jquery-core/document-ready/

  • Some more insight.

    This is also the case for acf fields in posts.

    Also the issue that you claim as “fixed” (display fields in high position) is actually not fixed. i can still not see a box if i set position to “after title, before content”

  • i can confirm the issue. i use wp 5.0.2
    yesterday i updated to acf 5.7.9
    my custom fields value (for pages) can not be saved anymore.

    1. i can select the new value from acf field.
    2. my editor page updates accordingly. (js hook works)
    3. i publish the changes.
    4. the field is not updated. it does not reflect in frontend. if i reload backend page, the value in acf field is set back to the old one.

    i do have a custom js hack implemented where i switch some images according to the acf field. this hack still works. so for me its clear that acf has a bug here.
    a MAJOR one.

  • Thx for the wiki lookup on api.
    The details of what it does are not defined by simply using the term api.
    No, you are right. Never the less, a certain expectation is associated with the term. That expectation is formed by the countless api’s out there.

    If you want to use an “api” for syncing inputs… well you found your gem.
    It still does not make sense to me to use and “api” to fetch informations which are already present.

    Also thanks for the link you posted. I appreciate people that point others into the right direction.
    I decided after all to not go with jquery but to use fetch in combination with acf to REST which i can recommend to anybody doing more then syncing inputs.

  • I found out that it is not possible. The field must be present on the page for this js to work. So at the end it is not doing a request to data, but just reading the dom.

    Which is kind of a joke. I don’t need an api to do a document.querySelector() for me.

    Also it should be mentioned in the docs. Simply cause the term “api” will cause wrong expectations here.

  • Same problem here:
    acf.getField('teilnehmer', this.props.selectedPostId, false);

    results in:

    $el: a.fn.init [selector: "", prevObject: a.fn.init(0), context: document]
    cid: "acf28"
    data: {}
    __proto__: acf.Model

    “data” being an empty object.
    so, is this a bug or what did i miss?

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