elementor / elementor/elementor
⌛ 📚 Kits Manager throws a Warning if get_the_ID() returns FALSE (bool) instead of an OBJECT (integer)
- Dominant language
- PHP
- Stars
- 7.1k
- Forks
- 1.6k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 193
Description
### Prerequisites
- [x] I have searched for similar issues in open and closed tickets and cannot find a duplicate.
- [ ] I have troubleshooted my issue, and it still exists against the latest stable version of Elementor.
### Description
When using Elementor version 3.28.3 alongside the Digits plugin (Builder Version 0.9.8), I encounter the following warning:
```log
Warning: Attempt to read property "ID" on bool in /wp-content/plugins/elementor/core/kits/manager.php on line 422
```
This issue arises because `get_the_ID()` returns false, leading to a `boolean` being passed where an `object` is expected.
**Additional Context:**
This issue does not occur when the Digits plugin is deactivated.
**The Solution that worked**
```txt
/wp-content/plugins/elementor/core/kits/manager.php
```
Current Lines 420–423
```php
if ( $recent_edited_post->post_count ) {
$posts = $recent_edited_post->get_posts();
$document = Plugin::$instance->documents->get( reset( $posts )->ID );
}
```
Changed to:
```php
if ( $recent_edited_post->post_count ) {
$posts = $recent_edited_post->get_posts();
$first_post = reset( $posts );
if ( $first_post && is_object( $first_post ) && isset( $first_post->ID ) ) {
$document = Plugin::$instance->documents->get( $first_post->ID );
}
}
```
It got rid of the error message
### Steps to reproduce
- Install and activate Elementor 3.28.3.
- Install and activate Digits Plugin Builder Version 0.9.8 by UnitedOver
- Navigate to a page where the admin bar is displayed.
- Observe the warning message as described above.
### Expected behavior
Elementor should handle cases where `get_the_ID()` returns false without throwing warnings.
### Isolating the problem
- [ ] This bug happens when only the Elementor (and Elementor Pro) plugins are active.
- [ ] This bug happens with the Hello Elementor theme active.
- [ ] I can reproduce this bug consistently by following the steps I described above.
### Elementor System Info
Click to reveal
````txt
== Server Environment ==
Operating System: Linux
Software: Apache/2.4.63 (Debian)
MySQL version: mariadb.org binary distribution v10.6.21
PHP Version: 8.2.27
PHP Memory Limit: 512M
PHP Max Input Vars: 10000
PHP Max Post Size: 100M
GD Installed: Yes
ZIP Installed: Yes
Write Permissions: All right
Elementor Library: Connected
== WordPress Environment ==
Version: 6.8
Site URL: http://127.0.0.1
Home URL: http://127.0.0.1
WP Multisite: No
Max Upload Size: 100 MB
Memory limit: 40M
Max Memory limit: 512M
Permalink Structure: /%postname%/
Language: en_US
Timezone: America/New_York
Debug Mode: Inactive
== Theme ==
Name: BuddyBoss Theme
Version: 2.8.20
== User ==
Role: administrator
WP Profile lang: en-US
== Active Plugins ==
Advanced Database Cleaner PRO
Version: 3.2.11
Author: Younes JFR.
BuddyBoss Platform
Version: 2.8.30
Author: BuddyBoss
BuddyBoss Platform Pro
Version: 2.6.90
Author: BuddyBoss
DIGITS: Builder
Version: 0.9.8
Author: UnitedOver
DIGITS: WordPress Mobile Number Signup and Login
Version: 8.4.6.1
Author: UnitedOver
Elementor
Version: 3.28.3
Author: Elementor.com
Elementor Pro
Version: 3.28.3
Author: Elementor.com
Essential Addons for Elementor
Version: 6.1.10
Author: WPDeveloper
Essential Addons for Elementor - Pro
Version: 6.2.1
Author: WPDeveloper
Gravity Forms
Version: 2.9.6.1
Author: Gravity Forms
Gravity Forms User Registration Add-On
Version: 5.4.0
Author: Gravity Forms
Gravity PDF
Version: 6.12.4
Author: Blue Liquid Designs
Paid Memberships Pro
Version: 3.4.4
Author: Paid Memberships Pro
Paid Memberships Pro - BuddyPress & BuddyBoss Add On
Version: 1.5.1
Author: Paid Memberships Pro
Ultimate Addons for Elementor Pro
Version: 1.39.3
Author: Brainstorm Force
UpdraftPlus - Backup/Restore
Version: 2.25.4.0
Author: TeamUpdraft, DavidAnderson
WPCode Lite
Version: 2.2.7
Author: WPCode
WP Mail SMTP
Version: 4.4.0
Author: WP Mail SMTP
WPS Hide Login
Version: 1.9.17.2
Author: WPServeur, NicolasKulka, wpformation
== Must-Use Plugins ==
BuddyBoss Performance API
Version: 1.0.0
Author: BuddyBoss
== Elements Usage ==
container : 0
container : 18
header-bar : 3
heading : 6
icon-list : 9
image : 2
section : 1
eael-divider : 1
image : 1
login-only : 1
text-editor : 3
wp-page : 4
container : 6
eael-divider : 2
heading : 1
html : 1
login-only : 2
text-editor : 8
== Settings ==
cpt_support: post, page, digits-forms-popup, digits-forms-page
allow_tracking: yes
unfiltered_files_upload: 1
font_display: swap
== Features ==
Custom Fonts: 0
Custom Icons: 0
== Integrations ==
recaptcha: Active
== Elementor Experiments ==
Inline Font Icons: Active by default
Additional Custom Breakpoints: Active by default
Container: Active by default
Optimized Markup: Inactive by default
Load Google Fonts locally: Active by default
Default to New Theme Builder: Active by default
Nested Elements: Active by default
Editor Top Bar: Active by default
Pages Panel: Inactive by default
Element Caching: Inactive by default
Elementor Home Screen: Active by default
Elementor Editor Events: Inactive by default
Atomic Widgets: Inactive by default
Global Classes: Inactive by default
Launchpad Checklist: Inactive by default
Cloud Library: Inactive by default
Menu: Inactive by default
== Log ==
Log: showing 20 of 382025-03-10 13:30:14 [info] Elementor data updater process has been queued. [array (
'plugin' => 'Elementor Pro',
'from' => '3.27.4',
'to' => '3.27.6',
)]
2025-03-31 12:50:08 [info] Elementor data updater process has been queued. [array (
'plugin' => 'Elementor',
'from' => '3.27.6',
'to' => '3.28.2',
)]
2025-03-31 12:50:10 [info] elementor::elementor_updater Started
2025-03-31 12:50:10 [info] Elementor/Upgrades - _on_each_version Start
2025-03-31 12:50:11 [info] Elementor/Upgrades - _on_each_version Finished
2025-03-31 12:50:11 [info] Elementor data updater process has been completed. [array (
'plugin' => 'Elementor',
'from' => '3.27.6',
'to' => '3.28.2',
)]
2025-03-31 12:50:13 [info] Elementor data updater process has been queued. [array (
'plugin' => 'Elementor',
'from' => '3.27.6',
'to' => '3.28.2',
)]
2025-03-31 13:00:46 [info] elementor-pro::elementor_pro_updater Started
2025-03-31 13:00:46 [info] Elementor Pro/Upgrades - _on_each_version Start
2025-03-31 13:00:46 [info] Elementor Pro/Upgrades - _on_each_version Finished
2025-03-31 13:00:46 [info] Elementor data updater process has been completed. [array (
'plugin' => 'Elementor Pro',
'from' => '3.27.6',
'to' => '3.28.2',
)]
2025-04-10 13:24:08 [info] elementor::elementor_updater Started
2025-04-10 13:24:08 [info] Elementor/Upgrades - _on_each_version Start
2025-04-10 13:24:09 [info] Elementor/Upgrades - _on_each_version Finished
2025-04-10 13:24:09 [info] Elementor data updater process has been completed. [array (
'plugin' => 'Elementor',
'from' => '3.28.2',
'to' => '3.28.3',
)]
2025-04-16 12:36:56 [info] Elementor data updater process has been queued. [array (
'plugin' => 'Elementor Pro',
'from' => '3.28.2',
'to' => '3.28.3',
)]
2025-04-16 12:36:57 [info] elementor-pro::elementor_pro_updater Started
2025-04-16 12:36:57 [info] Elementor Pro/Upgrades - _on_each_version Start
2025-04-16 12:36:57 [info] Elementor Pro/Upgrades - _on_each_version Finished
2025-04-16 12:36:57 [info] Elementor data updater process has been completed. [array (
'plugin' => 'Elementor Pro',
'from' => '3.28.2',
'to' => '3.28.3',
)]
PHP: showing 4 of 4PHP: 2025-02-26 17:34:42 [warning X 6][../elementor/includes/controls/base-multiple.php::87] Undefined array key "top" [array (
'trace' => '
#0: Elementor\Core\Logger\Manager -> shutdown()
',
)]
PHP: 2025-03-31 12:45:43 [warning X 95][../elementor/core/kits/manager.php::422] Attempt to read property "ID" on bool [array (
'trace' => '
#0: Elementor\Core\Logger\Manager -> shutdown()
',
)]
PHP: 2025-04-16 17:19:05 [error X 7][../elementor/core/kits/manager.php::450] syntax error, unexpected token "public" [array (
'trace' => '
#0: Elementor\Core\Logger\Manager -> shutdown()
',
)]
PHP: 2025-04-16 18:07:47 [error X 1][../elementor-digits-safe-admin-bar/elementor-digits-safe-admin-bar.php::26] Uncaught Error: Class "Elementor\Core\Base\Utils" not found in ../elementor-digits-safe-admin-bar/elementor-digits-safe-admin-bar.php:26
Stack trace:
#0 ../wp-includes/class-wp-hook.php(324): {closure}()
#1 ../wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#2 ../wp-includes/plugin.php(565): WP_Hook->do_action()
#3 ../wp-includes/admin-bar.php(97): do_action_ref_array()
#4 ../wp-includes/class-wp-hook.php(324): wp_admin_bar_render()
#5 ../wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#6 ../wp-includes/plugin.php(517): WP_Hook->do_action()
#7 ../wp-includes/general-template.php(3224): do_action()
#8 ../wp-content/themes/buddyboss-theme/header.php(23): wp_body_open()
#9 ../wp-includes/template.php(810): require_once('...')
#10 ../wp-includes/template.php(745): load_template()
#11 ../wp-includes/general-template.php(48): locate_template()
#12 ../wp-content/themes/buddyboss-theme/buddypress.php(10): get_header()
#13 ../wp-includes/template-loader.php(106): include('...')
#14 ../wp-blog-header.php(19): require_once('...')
#15 ../index.php(17): require('...')
#16 {main}
thrown [array (
'trace' => '
#0: Elementor\Core\Logger\Manager -> shutdown()
',
)]
== Elementor - Compatibility Tag ==
Elementor Pro: Compatible
Essential Addons for Elementor: Compatible
Essential Addons for Elementor - Pro: Compatible
Ultimate Addons for Elementor Pro: Compatible
== Elementor Pro - Compatibility Tag ==
Essential Addons for Elementor: Compatible
Essential Addons for Elementor - Pro: Compatible
Ultimate Addons for Elementor Pro: Compatible
````
### Agreement
- [x] I agree that my issue may be closed without action if it doesn't meet all the requirements.
Contributor guide
Assessment
This issue has not been assessed yet.