• I use ACF Extended plugin.

    I just discovered that with this plugin enabled, ACF-E forms are no longer able to see my ACF field groups. Now, that is a real show-stopper for me that will prevent me from using your plugin.

    Any idea why this is happening ? I have looked through developer tools, and cannot see anything obvious. Debug logging is also enabled, but nothing is showing up in the logs.

    Just to be sure, there is absolutely no doubts about this … I just did a simple test of disabling your plugin … refreshing ACF-E form settings; then re-enabling your plugin and refreshing again. Multiple times, and the results are consistently the same.

    • This topic was modified 3 years, 8 months ago by laymonk.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author shehabulislam

    (@shehabulislam)

    Hi @laymonk

    Extremely sorry for this problem. We will check and try to give you the solution.

    Thank you

    Thread Starter laymonk

    (@laymonk)

    Thanks a million for responding … Hoping for a solution asap.

    Hello,

    ACF Extended developer here. After some investigations, it looks like Document Embedder hijack the global $post object during ajax requests (and probably during other situations too).

    Also note that this problem occurs without ACF Extended (only with ACF). Here are the instructions to reproduce the problem:

    – Install WordPress + Blank Theme
    – Install ACF + Document Embedder
    – Create a new “Test Document” in Document Embedder
    – Create an ACF Field Group with one simple Text field called my_text
    – Set the field as “Required”
    – Set the Field Group to be displayed on the post type “Page”
    – Add the following code in the functions.php file:

    add_action('acf/validate_value/name=my_text', 'my_acf_validate_field', 10, 4);
    function my_acf_validate_field($valid, $value, $field, $input_name){
    
        acf_log(get_post());
        acf_log(get_the_ID());
        // You can also use print_r() instead of acf_log()
        
        return $valid;
        
    }
    

    – Create a new Page, the “my_text” field will be displayed
    – Leave the field empty and save the page. A validation error will be shown
    – Check logs, get_post() get_the_ID() will return the “Test Document” from Document Embedder (when it should return nothing).

    This weird behavior makes me think that Document Embedder hijack the $post in others situations too which is probably the root of the problem.

    Hope it helps!

    Regards.

    Thread Starter laymonk

    (@laymonk)

    Thanks for chipping in your feedback here, Konrad.

    Hopefully, that provides enough insight to help isolate the issues …

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘This plugin breaks ACF-Extended plugin’ is closed to new replies.