• Resolved darkstar123456

    (@darkstar123456)


    Hello,

    First of all, in the field “Link to the page you need help with:” this is not my website.
    I already apply a quick fix on the site where I noticed the error and I don’t show errors anyway. I picked the first website I saw on Google in the 2 pages of results with this error.

    From what I see, you are using acf_get_setting() function but it is not defined yet at this stage. I think this is strange since plugins are loaded in alphabetical order.

    For the mooment I have added function_exists('acf_get_setting') in every condition but the result is that all code located in acf.php is simply not executed
    Quick fix : if (function_exists('acf_get_setting') && acf_get_setting('enqueue_google_maps')) {

    Best regards,

    Here is the complete stack trace :

    [Thu Feb 04 08:03:40.183872 2021] [fcgid:warn] [pid 3074] [client 81.241.4.104:56802] mod_fcgid: stderr: PHP Fatal error:  Uncaught Error: Call to undefined function acf_get_setting() in /wp-content/plugins/complianz-gdpr/integrations/plugins/acf.php:7, referer: https://www.mydomain.tld/
    [Thu Feb 04 08:03:40.183903 2021] [fcgid:warn] [pid 3074] [client 81.241.4.104:56802] mod_fcgid: stderr: Stack trace:, referer: https://www.mydomain.tld/
    [Thu Feb 04 08:03:40.183910 2021] [fcgid:warn] [pid 3074] [client 81.241.4.104:56802] mod_fcgid: stderr: #0 /wp-includes/class-wp-hook.php(287): cmplz_acf_script(), referer: https://www.mydomain.tld/
    [Thu Feb 04 08:03:40.183916 2021] [fcgid:warn] [pid 3074] [client 81.241.4.104:56802] mod_fcgid: stderr: #1 /wp-includes/plugin.php(212): WP_Hook->apply_filters(), referer: https://www.mydomain.tld/
    [Thu Feb 04 08:03:40.183922 2021] [fcgid:warn] [pid 3074] [client 81.241.4.104:56802] mod_fcgid: stderr: #2 /wp-content/plugins/complianz-gdpr/class-cookie-blocker.php(133): apply_filters(), referer: https://www.mydomain.tld/
    [Thu Feb 04 08:03:40.183943 2021] [fcgid:warn] [pid 3074] [client 81.241.4.104:56802] mod_fcgid: stderr: #3 /wp-content/plugins/complianz-gdpr/class-cookie-blocker.php(41): cmplz_cookie_blocker->replace_tags(), referer: https://www.mydomain.tld/
    [Thu Feb 04 08:03:40.183949 2021] [fcgid:warn] [pid 3074] [client 81.241.4.104:56802] mod_fcgid: stderr: #4 [internal function]: cmplz_cookie_blocker->filter_buffer(), referer: https://www.mydomain.tld/
    [Thu Feb 04 08:03:40.183953 2021] [fcgid:warn] [pid 3074] [client 81.241.4.104:56802] mod_fcgid: stderr: #5 /wp-includes/functions.php(4755): ob_end_flush(), referer: https://www.mydomain.tld/
    [Thu Feb 04 08:03:40.183958 2021] [fcgid:warn] [pid 3074] [client 81.241.4.104:56802] mod_fcgid: stderr: #6 /wp-includes/class-wp-hook.php(287): wp_ob_end_flush_all(), referer: https://www.mydomain.tld/
    [Thu Feb 04 08:03:40.183963 2021] [fcgid:warn] [pid 3074] [client 81.241.4.104:56802] mod_fcgid: stderr: #7 /wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(), referer: https://www.mydomain.tld/
    [Thu Feb 04 08:03:40.183968 2021] [fcgid:warn] [pid 3074] [client 81.241.4.104:56802] mod_fcgid: stderr: #8 /wp-includes/plugin.php(484): WP_Hook->do_action(), referer: https://www.mydomain.tld/
    [Thu Feb 04 08:03:40.183973 2021] [fcgid:warn] [pid 3074] [client 81.241.4.104:56802] mod_fcgid: stderr: #9 /wp-includes/load.php(1052): do_action(), referer: https://www.mydomain.tld/
    [Thu Feb 04 08:03:40.183978 2021] [fcgid:warn] [pid 3074] [client 81.241.4.104:56802] mod_fcgid: stderr: #10 [ in /wp-content/plugins/complianz-gdpr/integrations/plugins/acf.php on line 7, referer: https://www.mydomain.tld/

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Aert Hulsebos

    (@aahulsebos)

    Hi @darkstar123456,

    We will test it and come back to you,

    regards Aert

    Plugin Contributor Rogier Lankhorst

    (@rogierlankhorst)

    @darkstar123456,

    I just tested this by enabling the Advanced Custom Fields plugin, and loading the front-end. The act_get_settings function returned a value without issues.

    The act_get_settings us defined on load of the php file. The function is called when the cookie blocker loads, on the ‘wp’ hook, which is after the plugins_loaded hook.

    As we can expect this code to be loaded on the plugins_loaded hook it should not cause any issues on the wp hook.

    As I can’t reproduce your issue, there has to be some specific configuration on your site which causes the problem.

    Do you use actually use the Advanced Custom Fields plugin on your site? Possibly another plugin or theme is using the class or function ‘ACF’, which might cause it to load, even though the ACF plugin isn’t there.

    in that case, disabling the integration should resolve the issue. We can change the detection flag from ‘ACF’ to ‘ACF_VERSION’, which should be unique to this plugin (I hope), which should prevent Complianz from detecting Advanced Custom Fields incorrectly.

    Thread Starter darkstar123456

    (@darkstar123456)

    Hello Aert and Rogier,

    Thank you for your time.
    I think this one is on me.

    For an unknown reason ACF was simply not updated and don’t want to be updated.
    I duplicate the website on another domain and there, the update appeared. I was very very surprised since update everything is always the first thing I do when I notice an error.

    I saw a few other websites on the internet having the same error appearing, I suppose it’s the same cause as me.

    For information, the runing version of ACF is 4.4.12. Now I have to find why it doesn’t want to be updated (no update displayed)

    Thank you again for your help and time.

    Best regards

    Plugin Contributor Mathieu Paapst

    (@paapst)

    Hi @darkstar123456

    Great to hear that your issue is resolved! Could you tell us what you think of the plugin or the support by casting your Review here? We’d love to hear your feedback!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Call to undefined function acf_get_setting()’ is closed to new replies.