• Resolved Filozofer

    (@filozofer)


    Hello,

    I’ve been facing an issue on one of my site which using the plugins AdvancedCustomField (ACF) and ThreeWP-Broadcast.

    How to reproduce the issue:

    • Get 2 blog on the same wordpress installation (Blog A & Blog B for exemple)
    • Get 2 custom types (Event & News for exemple)
    • Broadcast an event from Blog B to Blog A call Event 1
    • Broadcast a news from Blog A to Blog B call News 1
    • Have an ACF field “list of news” (relationship) on Event 1
    • Then assign News 1 to this field on Event 1. Update Event 1.
    • You will end up with 2 News call “News 1” on Blog A after this manipulation. A clone is born !

    What happened ?

    When updating Event 1, the plugin check the existance of a child post for News 1 on Blog A. BUT the plugin did not check if News 1 is a child of a post from Blog A (or in others words: if News 1 have a parent post on Blog A).

    Is that a bug ?
    Maybe. I don’t know. Probably ?

    How did I fix it ?
    Here’s myfix:
    https://gist.github.com/anonymous/1f31054848d16f355e26
    File is locate here : threewp-broadcast/src/equivalent_posts.php
    Fix start at line “Start FIXING” and end at “End FIXING”.

    Feel free to comment or contact me. I hope my fix is not introducing any regression !
    https://www.ads-software.com/plugins/threewp-broadcast/

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[ACF] Clone post issue’ is closed to new replies.