• Resolved corbinfraser

    (@corbinfraser)


    Hey, terrific work on the oembed repeater! I’ve been testing it locally and it was working like a charm. When I pushed up to a staging server it was spitting out a fatal error:

    Warning: require_once(__DIR__/oembed-ajax.php) [function.require-once]: failed to open stream: No such file or directory in /###/###/public_html/###/wp-content/plugins/advanced-custom-fields-oembed-field/acf-oembed.php on line 41

    Fatal error: require_once() [function.require]: Failed opening required ‘__DIR__/oembed-ajax.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /###/###/public_html/###/wp-content/plugins/advanced-custom-fields-oembed-field/acf-oembed.php on line 41

    I was able to fix the problem by editing acf-oembed.php in the __consrtuct() function.

    Replace Line 41:

    //register ajax handler
    require_once( __DIR__ . '/oembed-ajax.php' );

    with:

    //register ajax handler
    require_once(dirname(__FILE__) . '/oembed-ajax.php' );

    That should solve that little bug, hope that helps!

    https://www.ads-software.com/plugins/advanced-custom-fields-oembed-field/

Viewing 1 replies (of 1 total)
  • Plugin Author edwardtownend

    (@edwardtownend)

    Oops, sorry I didn’t spot this sooner!

    Thanks very much for reporting this Corbin, I’ve incorporated your change and pushed a new version.

Viewing 1 replies (of 1 total)
  • The topic ‘Fatal Error caused by require_once()’ is closed to new replies.