Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter lautundsichtbar

    (@lautundsichtbar)

    I 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

    Thread Starter lautundsichtbar

    (@lautundsichtbar)

    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 108
    Thread Starter lautundsichtbar

    (@lautundsichtbar)

    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!

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