Critical Error after Updating PRO

Good Morning,

after Updating PRO from 3.2.3 to 4.0.11 my frontend crashes, I get the following error:

Fatal error : Uncaught Error: Call to undefined function x_is_portfolio_item() in /html/wordpress/wp-content/themes/pro/framework/functions/frontend/content.php:45 Stack trace: #0 /html/wordpress/wp-content/themes/pro/framework/functions/frontend/classes.php(100): x_get_content_layout() #1 /html/wordpress/wp-includes/class-wp-hook.php(289): x_body_class(Array) #2 /html/wordpress/wp-includes/plugin.php(212): WP_Hook->apply_filters(Array, Array) #3 /html/wordpress/wp-includes/post-template.php(836): apply_filters(‘body_class’, Array, Array) #4 /html/wordpress/wp-content/plugins/WP_Estimation_Form/includes/lfb-core.php(912): get_body_class() #5 /html/wordpress/wp-includes/class-wp-hook.php(289): LFB_Core->conditionally_add_scripts_and_styles(Array) #6 /html/wordpress/wp-includes/plugin.php(255): WP_Hook->apply_filters(Array, Array) #7 /html/wordpress/wp-includes/class-wp-query.php(3190): apply_filters_ref_array(‘the_posts’, Array) #8 /html/wordpress/wp-includes/class-wp-query.php(3448): WP_Query->get_posts() #9 /html/wordpres in /html/wordpress/wp-content/themes/pro/framework/functions/frontend/content.php on line 45

Backend works perfect.
WP is 5.6, all plugins are up do date.

What can i do to update without crashing?

Best regards

Uli

Hey Uli,

Thanks for writing in! Did you updated the theme using the Automatic Updates or by manually uploading the files? To better assist you with your issue, kindly 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
– WP login URL
– WP username
– WP password
– WP Administrator Role

To know how to create a secure note, please check this out: How The Forum Works

Best Regards.

Hi ruenel,
I did use the automatic update in the WP backend.
Credentials see secure note …
Best regards
Uli

Hi Uli,

Please update again your website to the latest version of Pro and after that please do the plugin conflict to find the culprit because one of your plugins is causing your issue.

Hope that helps and let us know how it goes.

Thank you.

Hi Marc,

are you shure, that one of my plugins is causing the error? The Error-Message says:

x_is_portfolio_item() in /html/wordpress/wp-content/themes/pro/framework/functions/frontend/content.php

So as the file is in the pro theme’s folder, it can’t belong to another plugin, I guess …

Sorry for asking, but I can’t do a plugin-conflict-text in a live environment, so I want to be shure, before spending a lot of time for creating an staging environment and acrivating and deactivating plugins …

Best regards

Uli

Hi again,
to keep things going, I now did create a staging environment. I had to add a new pro license (unlimited). But no there is no update link for the theme in the wordpress backend. See screencast in secure note.
Best regards
Uli

Hi Uli,

I was able to update your theme to the latest version on your staging area and when I disable all the plugins, the issue was gone.

Plugins Activated:

Plugins not activated:

Hope that helps.

Thank you.

Hi marc_a,
it seems Contact Form 7 causes (at least part of) the problem. Deactivating it, the frontpage is shown again. But if debug-mode is enabled, I get the following errors shown between the header and the content:

**Notice** : Trying to get property 'ID' of non-object in  **/html/wordpress-staging/wp-includes/class-wp-query.php**  on line  **4027**

**Notice** : Trying to get property 'post_title' of non-object in  **/html/wordpress-staging/wp-includes/class-wp-query.php**  on line  **4029**

**Notice** : Trying to get property 'post_name' of non-object in  **/html/wordpress-staging/wp-includes/class-wp-query.php**  on line  **4031**

**Notice** : Trying to get property 'post_type' of non-object in  **/html/wordpress-staging/wp-includes/post-template.php**  on line  **649**

**Notice** : Trying to get property 'post_parent' of non-object in  **/html/wordpress-staging/wp-includes/post-template.php**  on line  **707**

**Notice** : Trying to get property 'post_type' of non-object in  **/html/wordpress-staging/wp-includes/class-wp-query.php**  on line  **4179**

**Notice** : Trying to get property 'post_type' of non-object in  **/html/wordpress-staging/wp-includes/class-wp-query.php**  on line  **4179**

Update:
If I also deactivate WP Cost Estimation & Payment Forms Builder, there is no error left.

Update 2:
Wordpress did send me the following mail according to the error:

Wenn du Hilfe bei diesem Problem suchst, wirst du möglicherweise nach einigen der folgenden Informationen gefragt:
    WordPress-Version 5.6
    Aktuelles Theme: Pro – Child Theme (Version 1.0.0)
    Aktuelles Plugin:  (Version )
    PHP-Version 7.2.29

Fehler-Details
    ==============
    Ein Fehler vom Typ E_ERROR wurde in der Zeile 45 der Datei /html/wordpress-staging/wp-content/themes/pro/framework/functions/frontend/content.php verursacht. Fehlermeldung: Uncaught Error: Call to undefined function x_is_portfolio_item() in /html/wordpress-staging/wp-content/themes/pro/framework/functions/frontend/content.php:45
    Stack trace:
    #0 /html/wordpress-staging/wp-content/themes/pro/framework/functions/frontend/classes.php(100): x_get_content_layout()
    #1 /html/wordpress-staging/wp-includes/class-wp-hook.php(289): x_body_class(Array)
    #2 /html/wordpress-staging/wp-includes/plugin.php(212): WP_Hook->apply_filters(Array, Array)
    #3 /html/wordpress-staging/wp-includes/post-template.php(836): apply_filters('body_class', Array, Array)
    #4 /html/wordpress-staging/wp-content/plugins/WP_Estimation_Form/includes/lfb-core.php(912): get_body_class()
    #5 /html/wordpress-staging/wp-includes/class-wp-hook.php(289): LFB_Core->conditionally_add_scripts_and_styles(Array)
    #6 /html/wordpress-staging/wp-includes/plugin.php(255): WP_Hook->apply_filters(Array, Array)
    #7 /html/wordpress-staging/wp-includes/class-wp-query.php(3190): apply_filters_ref_array('the_posts', Array)
    #8 /html/wordpress-stagi

So what can I do?

Uli

Hi Uli,

I would suggest you try once by deactivating and deleting the Pro by activating any other theme and re-install the Pro again. I would also suggest deleting the erroneous plugin and re-install it through Pro > Validation once again.
Please let us know if you still find the issue exists.

Thanks

Hi tristup,
will all settings and orders still be there after reinstalling the WP Cost Estimation & Payment Forms Builder?
best regards
Uli

Hi Uli,

Yes, if you temporarily deactivate the plugin, all data are still intact. It is saved in the database. By the way, I have checked your staging site and disabled the debug mode already. I also temporarily deactivated your Autoptimize and W3 Total Cache plugin. The issue should be resolve. Please check your staging site now.

Thanks.

Hi ruenel,

  1. I know, that deactivating the plugin keeps all data intact. But you asked me to delete and reinstall the plugin. Will everything be working aufter reinstalling? And will the stored orders still be there (very important!)?

  2. Of course the error-messages dissapear when switching off debug mode - but closing the eyes does not solve the problem (most times ;-). I’d prefer to get rid of the error in /wp-includes/class-wp-query.php
    So i did set debug to true again.
    As the plugin that seems to cause the problem is part of the PRO license and you will find a way to have both of them working together as before the update.

  3. Did you deactivate cache / autooptimise cause they are causing problems? Or just for debugging reasons?

  4. I did delete and reinstall the PRO Theme: Nothing changed.

  5. If I go to a subpage (see secure note), the error in /wp-includes/class-wp-query.php is not there.

Best regards
Uli

Hello Uli,

1.) The safest way to delete a plugin is to do it manually. You will have to log in to your FTP and browse to the plugins folder, wp-content/plugins. Find the plugin folder and delete it. You can then go back to your WP dashboard and re-install the plugin. All the data should still be intact including your orders.

2.) We have added this to your issue tracker so that our developers can investigate further to this.

3.) Yes, temporarily deactivating the caching plugins helps you determine which plugin is causing it. When they are active, it will be difficult because the caching plugin will only load the cache version of the page.

4.) This means that the issue is not with the Pro theme. It has to be from the plugin.

5.) Yes, because the PHP notices will only appear on where you have added the WP Cost Estimation & Payment Form or the homepage.

Hope this helps.

Hi Ruenel, thank you for your detailed answer:
1.) I did delete the plugin via FTP and reinstalled it. While trying to activate, I got an error, the “details” button at the error shows just a blank popup. See screencast in secure-note. But the plugin seems to be running and the php-error is gone. My orders are still there!
2.) OK, thank you.
3.) OK, so the plugins do not cause the problme, perfect.
4.) OK.
5.) That’s what I thought also. But it’s the other way round - the plugin was NOT used on the startpage (wich showed the error), but on the subpage (wich didn’t show the error).

I’ll now going to create a new staging environment (as there are new orders in the live page), do the delete / reinstall again and hope, it will also work there, so I can switch the stating to live.

Best regards

Uli

Hi Uli,

Please let us know when your Staging site is ready for access.

Thanks

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