Error Type E_ERROR

Any theory on what is going wrong here? The site never dies, but this error seems to occur once a day.

WordPress version 5.4.1
Current theme: Pro (version 3.2.3)
PHP version 7.4.6

An error of type E_ERROR was caused in line 172 of the file /public_html/wp-content/themes/pro/framework/functions/pro/bars/setup.php. Error message: Uncaught Error: Call to undefined function x_element_decorate() in /public_html/wp-content/themes/pro/framework/functions/pro/bars/setup.php:172

#0 /public_html/wp-content/themes/pro/framework/functions/pro/bars/setup.php(92): x_bars_setup_header_spaces(Array)
#1 /public_html/wp-includes/class-wp-hook.php(287): x_bars_setup_modules(’’)
#2 /public_html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(’’, Array)
#3 /public_html/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
#4 /public_html/wp-content/themes/pro/framework/functions/frontend/view-routing.php(21): do_action(‘x_late_template…’)

Hey @xRae,

It could be due to the PHP version. Would you mind downgrading PHP to PHP 7.2 or 7.0? If that works, you can set the PHP version back to 7.4.6 and disable the display of errors in your site by adding the following code in your wp-config.php file. Just make sure WP_DEBUG is set to true. You can read the full WordPress debugging information here: https://wordpress.org/support/article/debugging-in-wordpress/

  // Enable Debug logging to the /wp-content/debug.log file
  define( 'WP_DEBUG_LOG', true );

  // Disable display of errors and warnings 
  define( 'WP_DEBUG_DISPLAY', false );
  @ini_set( 'display_errors', 0 );

After that, please then give us the following information in a Secure Note so we could check your setup and we’ll try to replicate the issue on our end.

  • WordPress Login URL
  • Admin level username and password
  • FTP access

You can find the Secure Note button at the bottom of your posts.

Thanks.

Used to be on 7.2, which is one reason why the server was upgraded to see if that fixed it. It did not, still happens one time a day.

Hello @xRae,

Please re install your Pro theme. There might be missing files or corrupted file in your current installed theme files. To know more how you can re install the Pro theme, please check out manual installation using FTP in our documentation:

If nothing is helping, provide us access to your site so that we can check your settings. Please create a secure note with the following info:
– Link to your site
– WordPress Admin username / password

We would love to know if this has worked for you. Thank you.

I have, a few times. Also, there is nothing in the debug log. It seems to only happen at log in. Starting to think it might be a conflict with the firewall plugin and White Label.

Hi @xRae,

As mentioned by @ruenel this is most likely a case of files being missing. The function x_element_decorate is in this file: wp-content/themes/pro/cornerstone/includes/elements/helpers.php. If you can confirm that file is present, we know it’s not a missing file. Also, the file should contain this line:

function x_element_decorate( $element, $parent = null ) {

If that’s the case, it is an issue of the file not being loaded in the context where the site is trying to display a header. I’ve not encountered this before, but it could be related to some customizations you’re doing.

Are you using a plugin to customize the login page? If so, perhaps it isn’t fully loading all theme files somehow.

File is there, line 46 that function is there also. I am using ‘White Label’, the built in log in page plugin, although turning it off, the error still appears once a day.

I am pretty sure it is something to do with the firewall plugin, and the specific settings on those two sites conflicting. Thanks for the help. I’ll sort it from here, it’s apparent now that it’s likely not the theme itself.

Hey @xRae,

You are most welcome.
If you need anything else we can help you with, don’t hesitate to open another thread.

Cheers.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.