• Resolved robwent

    (@robwent)


    Hi,

    Elementor version: 3.8.1
    Elementor Pro Version: 3.8.0

    Error message:

    
    PHP Fatal error:  Uncaught Error: Call to a member function is_built_with_elementor() on bool in \wp-content\plugins\happy-elementor-addons\classes\cache-manager.php:50
    Stack trace:
    #0 \wp-content\plugins\happy-elementor-addons\classes\cache-manager.php(56): Happy_Addons\Elementor\Cache_Manager::is_built_with_elementor(-1)
    

    Is this a known problem or can I provide any further information?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter robwent

    (@robwent)

    I’ve had a look through the code.

    The website generates some pages dynamically from a feed.
    It’s checking 6 different values for $post_id, to of them are -1 which are the virtual post IDs.

    I’m sure there’s a better place to do this but for now I’ve fixed it by checking the post_id is greater than 0.

    	public static function is_built_with_elementor( $post_id ) {
    		if ( $post_id <= 0 ) {
    			return false;
    		}
    		return ha_elementor()->documents->get( $post_id )->is_built_with_elementor();
    	}
    Plugin Support Md. Anower Hossain

    (@anowerhossain16)

    Hi @robwent,

    Thanks for reaching out.

    I would like to inform you that we have checked with the latest version of the Elementor (v3.8.1) & Elementor Pro (v3.8.1). We haven’t found any error similar to this. For your acknowledgment, we have tested with the latest version of HappyAddons.

    On the other hand, glad to know that you have already fixed the issue on your site by customizing the code. You can apply the changes to your website’s child theme.

    Apart from that, for any help, you can directly contact our support from here.
    Moreover, you can get any pro plugin related support there.

    Thank you so much.

    Thread Starter robwent

    (@robwent)

    Hi,

    I had to modify the plugin code as I couldn’t see a way to do this in a theme.

    How would I go about preventing the error through the theme?

    Thanks

    Plugin Support Md. Anower Hossain

    (@anowerhossain16)

    Hi @robwent,

    As per your situation, the details of the workflow are missing, and we haven’t found the issue on our plugin. There might be an issue on your site as well.

    In order to take care of that would you please lead me to the reproduction process? It can be a conflicting theme or plugin. I believe that you have already checked the plugin or theme conflict.

    As this community forum is very restrictive regarding any deep investigation of the site so for more detail, you can directly contact our support from here.

    I am looking forward to hearing from you.
    Thanks

    Thread Starter robwent

    (@robwent)

    One conflict is with a plugin from a company called yatco which displays items on a site from their API.

    The posts don’t exist within the WordPress database, they create a posts type and then intercept the calls for those pages and set up a virtual post object populated with information from the API.
    It passes a post ID as -1 so as to not conflict with any existing posts (Since a negative post ID would never exist by default).

    The function to check if a page was made with Elementor produces a fatal error when passed a negative number.
    This didn’t happen before the last update so I assume something related to this function has changed?

    I know of one other plugin that spoofs posts in this way. Both are specialist plugins and not available in the WordPress directory.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Fatal error after update to 3.7.1’ is closed to new replies.