Hi,
Since the latest update I noticed that my header/navigation template breaks when I want to view a page with a post loop when there are no posts in the loop.
It gives a few errors starting with Trying to get property ‘ID’ of non-object followed by a file and a line number.
I already tried deactivating all plugins, expect for the necessary ones to show the page design, but without effect.
What is causing this issue?
Below are the errors and the files they occur in.
These errors only show on pages where a post loop is added to the design, but there are no posts to show, like empty category pages and the search page when there are no search results.
Once there is a post loop without posts, the design of the header template breaks (only cloud template, not default header presets).
If there are posts to show, no errors occur and the header looks normal.
Notice: Trying to get property ‘ID’ of non-object in /home/public/sites/www.simstripes.com/wp-content/plugins/td-composer/includes/tdc_composer_block.php on line 202
Notice: Trying to get property ‘ID’ of non-object in /home/public/sites/www.simstripes.com/wp-content/plugins/td-composer/includes/tdc_composer_block.php on line 202
Notice: Trying to get property ‘ID’ of non-object in /home/public/sites/www.simstripes.com/wp-content/plugins/td-composer/includes/tdc_composer_block.php on line 202
Notice: Trying to get property ‘ID’ of non-object in /home/public/sites/www.simstripes.com/wp-content/plugins/td-composer/legacy/Newspaper/includes/shortcodes/td_block_raw_css.php on line 38
Notice: Trying to get property ‘ID’ of non-object in /home/public/sites/www.simstripes.com/wp-content/plugins/td-composer/legacy/common/wp_booster/td_block.php on line 1554
Notice: Trying to get property ‘ID’ of non-object in /home/public/sites/www.simstripes.com/wp-content/plugins/td-composer/legacy/common/wp_booster/td_block.php on line 1554
Notice: Trying to get property ‘ID’ of non-object in /home/public/sites/www.simstripes.com/wp-content/plugins/td-composer/includes/tdc_composer_block.php on line 202
Notice: Trying to get property ‘ID’ of non-object in /home/public/sites/www.simstripes.com/wp-content/plugins/td-composer/includes/tdc_composer_block.php on line 202
Notice: Trying to get property ‘ID’ of non-object in /home/public/sites/www.simstripes.com/wp-content/plugins/td-composer/legacy/common/wp_booster/td_block.php on line 1554
Notice: Trying to get property ‘ID’ of non-object in /home/public/sites/www.simstripes.com/wp-content/plugins/td-composer/includes/tdc_composer_block.php on line 202
Notice: Trying to get property ‘ID’ of non-object in /home/public/sites/www.simstripes.com/wp-content/plugins/td-composer/legacy/common/wp_booster/td_block.php on line 1554
Notice: Trying to get property ‘ID’ of non-object in /home/public/sites/www.simstripes.com/wp-content/plugins/td-composer/legacy/common/wp_booster/td_block.php on line 1554
Notice: Trying to get property ‘ID’ of non-object in /home/public/sites/www.simstripes.com/wp-content/plugins/td-composer/legacy/common/wp_booster/td_block.php on line 1554
Just saw another post with the same problem.
Deactivating, deleting and reinstalling the TagDiv Composer plugin worked.
My log only shows one notice, but the design of the header is normal again.
Notice that still shows is
Notice: Trying to get property ‘ID’ of non-object in /home/public/sites/www.simstripes.com/wp-content/plugins/td-composer/legacy/Newspaper/includes/shortcodes/td_block_raw_css.php on line 38
Hi,
Please check if the WP-debug is set to false in the WP-config file, then check if the warnings are removed
– https://forum.tagdiv.com/requirements-for-newspaper/
Let us know if there still is a problem after doing this.
Thank you!
I deliberately set the debug mode to true because I was looking for the cause of the issue. There still seems to be a bug in …/td-composer/legacy/Newspaper/includes/shortcodes/td_block_raw_css.php.
Although the header looks a lot better now, there are still some broken styles due to the error in this file.
Will there soon be an update of the composer plugin that solves this issue?
Hello,
That is a notice, not an error or a warning, also, please deactivate the tagDiv Composer plugin, delete and re-install it again from Newspaper plugins => https://www.screencast.com/t/WLy01lbc
Also, I have listed this issue in our list and developers will look to see if it is a problem.
Thank you!