Support » Plugin: Redux - Gutenberg Blocks Library & Framework » Uncaught Error: Call to undefined function current_time()

  • Resolved casethemes



    I have used the Redux Lite plugin with the Consultio theme sold on ThemeForest. My client has encountered this problem. I have been unable to fix the problem. So I hope you can examine this for me. I sincerely thank you.

    Fatal error: Uncaught Error: Call to undefined function current_time() in /var/www/html/wp-includes/functions.php:2428 Stack trace: #0 /var/www/html/wp-includes/functions.php(2287): _wp_upload_dir() #1 /var/www/html/wp-content/plugins/redux-framework/redux-core/class-redux-core.php(263): wp_upload_dir() #2 /var/www/html/wp-content/plugins/redux-framework/redux-core/class-redux-core.php(170): Redux_Core->init() #3 /var/www/html/wp-content/plugins/redux-framework/redux-core/framework.php(29): Redux_Core::instance() #4 /var/www/html/wp-content/plugins/redux-framework/class-redux-framework-plugin.php(149): require_once(‘/var/www/html/w…’) #5 /var/www/html/wp-content/plugins/redux-framework/class-redux-framework-plugin.php(86): Redux_Framework_Plugin->includes() #6 /var/www/html/wp-content/plugins/redux-framework/redux-framework.php(40): Redux_Framework_Plugin::instance() #7 /var/www/html/wp-settings.php(382): include_once(‘/var/www/html/w…’) #8 /var/www/html/wp-config.php(80): require_once(‘/var/www/html/w…’) #9 /var/ww in /var/www/html/wp-includes/functions.php on line 2428

    There has been a critical error on your website.

    Learn more about debugging in WordPress.

    Thanks a lot!

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Dōvy Paukstys


    Ok, that’s a really weird bug. If the fix I just put into the code doesn’t work, just delay the load of your plugin until after plugins_loaded, or possibly setup theme.

    Long story short, wp_upload_dir() is called in the core, which calls the current_time() function. For whatever reason it hasn’t been loaded at that time. So… I included it.

    We’ll see if that works. Let me know!

    I can send you the site information. Can you check the problem for me. Thanks!

    Plugin Author Dōvy Paukstys




    I’ve also encountered this issue on my server. The problem is that I disabled the plugins witht he command mv plugins/ plugins-bkp

    But still no luck, it seems the error comes from core WP. I didn’t have this problem previously, just yesterday I tried to go to my blog and the problem appeared. If I restart Apache, it does’t appear for the first time, but still nothing shows in the page, and after the second time I get this stacktrace:

    Fatal error: Uncaught Error: Call to undefined function current_time() in /var/www/wordpress/wp-includes/functions.php:2428 Stack trace: #0 /var/www/wordpress/wp-includes/functions.php(2287): _wp_upload_dir() #1 /var/www/wordpress/wp-includes/functions.php(2241): wp_upload_dir() #2 /var/www/wordpress/wp-includes/post.php(503): wp_get_upload_dir() #3 /var/www/wordpress/wp-includes/post.php(6221): get_attached_file() #4 /var/www/wordpress/wp-includes/post.php(6272): wp_attachment_is() #5 /var/www/wordpress/wp-includes/media.php(193): wp_attachment_is_image() #6 /var/www/wordpress/wp-includes/media.php(955): image_downsize() #7 /var/www/wordpress/wp-includes/media.php(1119): wp_get_attachment_image_src() #8 /var/www/wordpress/wp-includes/general-template.php(929): wp_get_attachment_image_url() #9 /var/www/wordpress/wp-includes/general-template.php(970): get_site_icon_url() #10 /var/www/wordpress/wp-includes/general-template.php(3256): has_site_icon() #11 /var/www/wordpress/wp-includes/class-wp-hook.php(287): wp_site_icon() # in /var/www/wordpress/wp-includes/functions.php on line 2428

    I cannot understand why it doesn’t find the function, it’s there in functions.php

    Can you help me please?


    Plugin Author Dōvy Paukstys


    So what we’ve found is this is a manifested permissions error. Long story short Redux isn’t able to read this file because either Redux or the WP core are under the wrong permissions.

    I would love to try and fix this though, because perhaps I can find a way to make sure that Redux does things as it should. Would you be willing to provide me wp-admin access?

    If you’d prefer not, the best bet is to follow a guide like this to fix your permissions.

    If you’re more tech savy, here’s a bash script:

    I hope that helps!

    I’ve ran the bash script, but with no luck. I mention I didn’t install the redux plugin at all. This is very weird, the wordpress installation was working just fine, but all of a sudden it stopped…

    It seems that I’ve solved the issue. I took the newest version of WP and I copied all files from wp-includes to my blog and now it works

    Plugin Author Dōvy Paukstys


    WordPress couldn’t read the file and it manifested by saying that function didn’t exist. 😉

    Glad to hear it was solved! Best of luck to you.

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.