Timeline-integration leads to critical error since latest yootheme updates
-
Hello,
for two of our customers’ websites we have been getting a critical error from Herzog Dupont timeline integration with the latest yootheme updates. The error only occurs specifically on the pages where the Herzog Dupont Timeline is active. Every other page loads as it should.
Could you please check this issue und get back to us? Thank you.
Best regards
Benedikt
The page I need help with: [log in to see the link]
-
Hi,
what’s the error you get and how can I reproduce it? I see that you are using YOOtheme Pro v5.0.15. Which version of Herzog Dupont for YOOtheme Pro are you running? Make sure it’s at least 1.8.0.
Best regards
Error 500 with the WordPress error message “Es gab einen kritischen Fehler auf Ihrer Website.”. It comes up only on the site where the timeline feature ist installed (https://www.bkw-elektro.de/ueber-uns/). We have the latest versions of YooTheme and Herzog Dupont installed on our site but I had to disable the timeline feature over the weekend, so the customers site would at least load properly (without the timeline of course). I have reactivated the feature for you to debug it (if possible).
Thanks for your help!
The HTTP
500 Internal Server Errorserver error response status code only indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. This error is a generic “catch-all” response to server issues, indicating that the server cannot find a more appropriate error to respond with. Please check your PHP error log for more specific information on this error and enable WP_DEBUG mode.Please also state how I can reproduce the error and which version of Herzog Dupont for YOOtheme Pro you are running.
Best regards
We are running version 1.8.1 of Herzog Dupont for YOOtheme Pro. With WP_DEBUG mode enabled, this is the error message I get when trying to load the site [ redundant link deleted ] where the timeline is active:
Fatal error: Uncaught TypeError: YOOtheme\Str::length(): Argument #1 ($string) must be of type string, null given, called in /home/www/wordpress/wp-content/plugins/herzog-dupont/includes/modules/elements/elements/hd-timeline_item/element.php on line 21 and defined in /home/www/wordpress/wp-content/themes/yootheme/packages/utils/src/Str.php:108 Stack trace: #0 /home/www/wordpress/wp-content/plugins/herzog-dupont/includes/modules/elements/elements/hd-timeline_item/element.php(21): YOOtheme\Str::length(NULL) #1 /home/www/wordpress/wp-content/themes/yootheme/packages/builder/src/Builder.php(302): YOOtheme\Configuration\Resolver->YOOtheme\{closure}(Object(stdClass), Array) #2 /home/www/wordpress/wp-content/themes/yootheme/packages/builder/src/Builder.php(290): YOOtheme\Builder->applyTransforms('render', Object(stdClass), Array) #3 /home/www/wordpress/wp-content/themes/yootheme/packages/builder/src/Builder.php(290): YOOtheme\Builder->applyTransforms('render', Object(stdClass), Array) #4 /home/www/wordpress/wp-content/themes/yootheme/packages/builder/src/Builder.php(290): YOOtheme\Builder->applyTransforms('render', Object(stdClass), Array) #5 /home/www/wordpress/wp-content/themes/yootheme/packages/builder/src/Builder.php(290): YOOtheme\Builder->applyTransforms('render', Object(stdClass), Array) #6 /home/www/wordpress/wp-content/themes/yootheme/packages/builder/src/Builder.php(290): YOOtheme\Builder->applyTransforms('render', Object(stdClass), Array) #7 /home/www/wordpress/wp-content/themes/yootheme/packages/builder/src/Builder.php(106): YOOtheme\Builder->applyTransforms('render', Object(stdClass), Array) #8 /home/www/wordpress/wp-content/themes/yootheme/packages/builder/src/Builder.php(123): YOOtheme\Builder->load('{"type":"layout...', Array) #9 /home/www/wordpress/wp-content/themes/yootheme/packages/builder-wordpress/src/Listener/RenderBuilderPage.php(56): YOOtheme\Builder->render('{"type":"layout...', Array) #10 /home/www/wordpress/wp-content/themes/yootheme/packages/view/src/View/SectionHelper.php(45): YOOtheme\Builder\Wordpress\Listener\RenderBuilderPage->YOOtheme\Builder\Wordpress\Listener\{closure}(NULL) #11 [internal function]: YOOtheme\View\SectionHelper->YOOtheme\View\{closure}(NULL, Object(Closure)) #12 /home/www/wordpress/wp-content/themes/yootheme/packages/view/src/View/SectionHelper.php(43): array_reduce(Array, Object(Closure)) #13 /home/www/wordpress/wp-content/themes/yootheme/packages/builder-wordpress/src/Listener/RenderBuilder.php(20): YOOtheme\View\SectionHelper->get('builder') #14 /home/www/wordpress/wp-content/themes/yootheme/packages/container/src/Container.php(229): YOOtheme\Builder\Wordpress\Listener\RenderBuilder->handle('') #15 /home/www/wordpress/wp-content/themes/yootheme/packages/platform-wordpress/src/FilterLoader.php(28): YOOtheme\Container->call('YOOtheme\\Builde...', Array) #16 /home/www/wordpress/wp-includes/class-wp-hook.php(341): YOOtheme\Wordpress\FilterLoader->YOOtheme\Wordpress\{closure}('') #17 /home/www/wordpress/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array) #18 /home/www/wordpress/wp-includes/plugin.php(522): WP_Hook->do_action(Array) #19 /home/www/wordpress/wp-includes/general-template.php(3229): do_action('wp_body_open') #20 /home/www/wordpress/wp-content/themes/yootheme/header.php(111): wp_body_open() #21 /home/www/wordpress/wp-includes/template.php(814): require_once('/home/www/wordp...') #22 /home/www/wordpress/wp-includes/template.php(749): load_template('/home/www/wordp...', true, Array) #23 /home/www/wordpress/wp-includes/general-template.php(48): locate_template(Array, true, true, Array) #24 /home/www/wordpress/wp-content/themes/yootheme/page.php(10): get_header() #25 /home/www/wordpress/wp-includes/template-loader.php(125): include('/home/www/wordp...') #26 /home/www/wordpress/wp-blog-header.php(19): require_once('/home/www/wordp...') #27 /home/www/wordpress/index.php(17): require('/home/www/wordp...') #28 {main} thrown in /home/www/wordpress/wp-content/themes/yootheme/packages/utils/src/Str.php on line 108I was curious about the error message, so I gave it to Chat-GPT and I managed to find and (temporarily) fix the exact issue:
After the latest updates (YOOtheme + WordPress environment), we encountered a critical fatal error related to the hd-timeline_item element.
Error message:
Fatal error: Uncaught TypeError: YOOtheme\Str::length():
Argument #1 ($string) must be of type string, null given
Triggered in:
/wp-content/plugins/herzog-dupont/includes/modules/elements/elements/hd-timeline_item/element.php on line 21
Stack trace shows the error originates from:
YOOtheme\Str::length(NULL)
Cause
The issue occurs when the title field of a timeline item is empty.
If the title is not set, null is passed to YOOtheme\Str::length(), which now enforces strict typing and expects a string.
This results in a fatal TypeError and breaks the page rendering completely.
Temporary workaround
Adding any value to the title field resolves the issue immediately.
Suggested fix
To prevent this error, the variable passed to Str::length() should be safeguarded against null, for example:
Str::length($variable ?? ”)
or
Str::length((string) $variable)
This ensures compatibility with stricter type handling in recent YOOtheme versions and PHP 8+ environments.
I hope this helps.
Best regards-
This reply was modified 1 month, 2 weeks ago by
lautundsichtbar.
Thank you, this will be fixed. As a quick fix, you can try the following:
- access your webspace via FTP
- edit the file
/wp-content/plugins/herzog-dupont/includes/modules/elements/elements/hd-timeline_item/element.php - replace lines 20–26 by
// Don't render element if content fields are empty
return $node->props['title'] != '' ||
$node->props['meta'] != '' ||
$node->props['content'] != '' ||
$node->props['image'] ||
$node->props['video'] ||
$node->props['icon'];-
This reply was modified 1 month, 2 weeks ago by
forrestkirby.
Fixed in 1.8.2
-
This reply was modified 1 month, 2 weeks ago by
You must be logged in to reply to this topic.