Forums Forums Search & Filter Pro Duplicate post_meta when creating posts using frontend forms

Viewing 10 posts - 1 through 10 (of 12 total)
  • Anonymous
    #268226

    P.S. I’m using Oxygen Builder

    Trevor
    #268229

    As you are using a plugin to submit the posts, you may need to talk with that plugin developer to find out how you can use this ‘action’ after each submit:

    https://searchandfilter.com/documentation/action-filter-reference/#update-cache-for-a-particular-post

    Anonymous
    #268233

    Thanks Trevor. Am I right in thinking that the cache gets rebuilt when new posts are published? I am currently using the ACF frontend form to create draft posts, so am publishing them manually. Also, I rebuilding the cache manually does not seem to have removed the duplicate post_meta checkbox.

    Trevor
    #268237

    When a Post is created or edited, and the Update button is pressed, WordPress triggers a hook/function (save_post() I think) that our plugin sees and updates the cache for just that post, not all posts. Some import tools do not trigger that function, hence the problem. Other search tools have similar issues, such as Relevanssi, which needs a similar action to update its cache.

    Anonymous
    #268241

    Thanks for the explanation! Should this be fixed when I rebuild the cache manually or not? Or will that have no effect?

    Trevor
    #268247

    Yes, you can rebuild the cache manually, but that is a quite inefficient use of server resources. If it is one post, you could edit/open it in the admin and simply hit update.

    Anonymous
    #268250

    That’s the thing, this doesn’t resolve the issue. Neither editing and updating or rebuilding the cache removes the duplicate post_meta checkbox. When I check the checkbox field in the post, the duplicate disappears, when I uncheck it, the duplicate reappears…

    Anonymous
    #268262

    Hmm, I just added a post manually and the same thing happens. If the True/False field isn’t checked it gets added to the ‘duplicate’ (FALSE) post_meta checkbox on the frontend.

    Anonymous
    #268273

    Just following up again (sorry for bombarding) and I think the plugin is doing what it’s meant to do, which is display options to either show posts where the value is TRUE and where it is FALSE, but I confused myself regarding ‘duplicates’ because I added an :after pseudo element to display the label I wanted attached to the TRUE field. I guess I’ll just have to hide the FALSE checkbox with CSS? Thanks for your help.

Viewing 10 posts - 1 through 10 (of 12 total)