Tagged: Php error, Shortcodes, Undefined array key
Hi Team,
I noticed a few of our sites are showing the following error:
Warning: Undefined array key “term_rel” in /home/customer/www/domain-name.com/public_html/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/blog/blog.php on line 562
It seems to be when a short code is used to display blog posts or shop categories on a page.
Is this fixed in the upcoming ENFOLD version 5.6.5.?
For now, I’ve hidden the PHP error on the front end of WordPress by adding the following to the wp-config file, just before the /* That’s all, stop editing! Happy publishing. */ line:
ini_set('display_errors','Off');
ini_set('error_reporting', E_ALL );
define('WP_DEBUG', false);
define('WP_DEBUG_DISPLAY', false);
The affected sites are running PHP 8.2.8 with ENFOLD 5.6.4 and WordPress 6.2.2.
The error remains even with all plugins disabled.
Hey Ben,
Thank you for reporting this – and sorry for the problems.
Will be fixed in next release.
Meanwhile you can replace
../enfold/config-templatebuilder/avia-shortcodes/blog/blog.php
with the contents of
Do not forget to make a backup of the original file for a fallback.
Best regards,
Günter
Thank you, Günter, for your rapid response and the fix. Much appreciated!