Title: PHP-Error in complex situation
Last modified: January 9, 2026

---

# PHP-Error in complex situation

 *  ResolvedModerator [threadi](https://wordpress.org/support/users/threadi/)
 * (@threadi)
 * [4 months, 2 weeks ago](https://wordpress.org/support/topic/php-error-in-complex-situation/)
 * Hi,
 * we have [a case in the German-language forum](https://de.wordpress.org/support/topic/sugar-calendar-lite-kritischen-fehler-in-kalenderuebersicht/)
   where someone is encountering a fatal PHP error related to your plugin in a rather
   complex situation. However, I can reproduce it perfectly on a test system. Here’s
   how:
    - Install and activate the plugin (no further configuration required)
    - Install and activate Elementor (the free version, no further configuration
      required)
    - Install and activate the Astra theme (presumably optional, but it works well)
    - Install and activate Sugar Calendar Lite
    - Go to Events and create a simple event scheduled for the future
    - Go to Settings > Permalinks and save them again (because Sugar Calendar apparently
      doesn’t do this automatically)
    - Go to Events > Calendar and access the only calendar listed there on the frontend
      => you’ll see an incomplete page, as this is when the error occurs.
 * The error:
 *     ```wp-block-code
        PHP Fatal error:  Uncaught Error: Call to a member function is_built_with_elementor() on bool in /var/www/clients/client1/web1/web/wp-content/plugins/embed-privacy/inc/integration/class-elementor.php:134Stack trace:#0 /var/www/clients/client1/web1/web/wp-content/plugins/embed-privacy/inc/integration/class-elementor.php(163): epiphyt\Embed_Privacy\integration\Elementor::is_used()#1 /var/www/clients/client1/web1/web/wp-includes/class-wp-hook.php(341): epiphyt\Embed_Privacy\integration\Elementor::replace_youtube()#2 /var/www/clients/client1/web1/web/wp-includes/plugin.php(205): WP_Hook->apply_filters()#3 /var/www/clients/client1/web1/web/wp-content/plugins/embed-privacy/inc/embed/class-replacement.php(66): apply_filters()#4 /var/www/clients/client1/web1/web/wp-content/plugins/embed-privacy/inc/data/class-replacer.php(129): epiphyt\Embed_Privacy\embed\Replacement->get()#5 /var/www/clients/client1/web1/web/wp-includes/class-wp-hook.php(343): epiphyt\Embed_Privacy\data\Replacer::replace_embeds()#6 /var/www/clients/client1/web1/web/wp-includes/plugin.php(205): WP_Hook->apply_filters()#7 /var/www/clients/client1/web1/web/wp-includes/class-wp-block.php(651): apply_filters()#8 /var/www/clients/client1/web1/web/wp-includes/blocks.php(2383): WP_Block->render()#9 /var/www/clients/client1/web1/web/wp-includes/blocks.php(2466): render_block()#10 /var/www/clients/client1/web1/web/wp-includes/class-wp-hook.php(341): do_blocks()#11 /var/www/clients/client1/web1/web/wp-includes/plugin.php(205): WP_Hook->apply_filters()#12 /var/www/clients/client1/web1/web/wp-includes/post-template.php(256): apply_filters()#13 /var/www/clients/client1/web1/web/wp-content/themes/astra/template-parts/single/content-header.php(37): the_content()#14 /var/www/clients/client1/web1/web/wp-includes/template.php(816): require('...')#15 /var/www/clients/client1/web1/web/wp-includes/template.php(749): load_template()#16 /var/www/clients/client1/web1/web/wp-includes/general-template.php(206): locate_template()#17 /var/www/clients/client1/web1/web/wp-content/themes/astra/inc/template-parts.php(370): get_template_part()#18 /var/www/clients/client1/web1/web/wp-includes/class-wp-hook.php(341): astra_entry_content_single_page_template()#19 /var/www/clients/client1/web1/web/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters()#20 /var/www/clients/client1/web1/web/wp-includes/plugin.php(522): WP_Hook->do_action()#21 /var/www/clients/client1/web1/web/wp-content/themes/astra/inc/core/theme-hooks.php(450): do_action()#22 /var/www/clients/client1/web1/web/wp-content/themes/astra/template-parts/content-page.php(28): astra_entry_content_single_page()#23 /var/www/clients/client1/web1/web/wp-includes/template.php(816): require('...')#24 /var/www/clients/client1/web1/web/wp-includes/template.php(749): load_template()#25 /var/www/clients/client1/web1/web/wp-includes/general-template.php(206): locate_template()#26 /var/www/clients/client1/web1/web/wp-content/themes/astra/inc/class-astra-loop.php(109): get_template_part()#27 /var/www/clients/client1/web1/web/wp-includes/class-wp-hook.php(341): Astra_Loop->template_parts_page()#28 /var/www/clients/client1/web1/web/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters()#29 /var/www/clients/client1/web1/web/wp-includes/plugin.php(522): WP_Hook->do_action()#30 /var/www/clients/client1/web1/web/wp-content/themes/astra/inc/class-astra-loop.php(197): do_action()#31 /var/www/clients/client1/web1/web/wp-content/themes/astra/inc/class-astra-loop.php(174): Astra_Loop->loop_markup()#32 /var/www/clients/client1/web1/web/wp-includes/class-wp-hook.php(341): Astra_Loop->loop_markup_page()#33 /var/www/clients/client1/web1/web/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters()#34 /var/www/clients/client1/web1/web/wp-includes/plugin.php(522): WP_Hook->do_action()#35 /var/www/clients/client1/web1/web/wp-content/themes/astra/inc/core/theme-hooks.php(265): do_action()#36 /var/www/clients/client1/web1/web/wp-content/themes/astra/page.php(32): astra_content_page_loop()#37 /var/www/clients/client1/web1/web/wp-includes/template-loader.php(125): include('...')#38 /var/www/clients/client1/web1/web/wp-blog-header.php(19): require_once('...')#39 /var/www/clients/client1/web1/web/index.php(17): require('...')#40 {main}  thrown in /var/www/clients/client1/web1/web/wp-content/plugins/embed-privacy/inc/integration/class-elementor.php on line 134
       ```
   
 * What’s happening here:
    - Sugar Calendar Lite uses a “Virtual Event ID” with the fixed value 7575000
      in Loader.php.
    - Embed Privacy takes this value in the `is_used()` function in class-elementor.
      php and passes it to Elementor.
    - Elementor doesn’t return an object for this pseudo-ID when using `Plugin::
      $instance->documents->get( \get_the_ID() )` => Error
 * Recommendation:
   You should check if the passed ID is a real one and/or if Elementor
   returns an object before calling `is_built_with_elementor()`.
 * Unfortunately, I’m not aware of any other solutions, which is why the user in
   the forum is a bit stuck here 🙁
 * Feel free to contact me if you have any questions 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Matthias Kittsteiner](https://wordpress.org/support/users/kittmedia/)
 * (@kittmedia)
 * [4 months, 2 weeks ago](https://wordpress.org/support/topic/php-error-in-complex-situation/#post-18780072)
 * Hi [@threadi](https://wordpress.org/support/users/threadi/),
 * since you’ve already created an environment to test it, can you check if changing
   the `is_used` method in `embed-privacy/inc/integration/class-elementor.php` to
   the following resolves the problem?
 *     ```wp-block-code
       	public static function is_used() {		$id = \get_the_ID();				return System::is_plugin_active( 'elementor/elementor.php' )			&& $id			&& Plugin::$instance->documents->get( $id )			&& Plugin::$instance->documents->get( $id )->is_built_with_elementor();	}
       ```
   
 * Best regards,
   Matthias
 *  Moderator [threadi](https://wordpress.org/support/users/threadi/)
 * (@threadi)
 * [4 months, 2 weeks ago](https://wordpress.org/support/topic/php-error-in-complex-situation/#post-18780074)
 * Yes, this works 🙂
 *  Plugin Author [Matthias Kittsteiner](https://wordpress.org/support/users/kittmedia/)
 * (@kittmedia)
 * [4 months, 2 weeks ago](https://wordpress.org/support/topic/php-error-in-complex-situation/#post-18780077)
 * Great, thank you! Will add it to the next update.

Viewing 3 replies - 1 through 3 (of 3 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-error-in-complex-situation%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/embed-privacy/assets/icon.svg?rev=2812349)
 * [Embed Privacy](https://wordpress.org/plugins/embed-privacy/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/embed-privacy/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/embed-privacy/)
 * [Active Topics](https://wordpress.org/support/plugin/embed-privacy/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/embed-privacy/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/embed-privacy/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Matthias Kittsteiner](https://wordpress.org/support/users/kittmedia/)
 * Last activity: [4 months, 2 weeks ago](https://wordpress.org/support/topic/php-error-in-complex-situation/#post-18780077)
 * Status: resolved