Archived topic
Uncaught ValueError after PHP 8 upgrade
3 replies · Started by Daniel on March 1, 2022
I am experiencing the same error after upgrading to PHP 8. I have tickets open with TranslatePress and Elementor as well.
If I switch to 2022 theme, the TranslatePress language switcher works. With GP/GP Premium active, it does not. Switching themes is not a solution.
My site has German (DE) language as default, then French and Italian – these two cause the exception. I was able to change the slug name for Italian (it to itl) and it worked. But French continues to throw exceptions.
https://xpelswiss.wpengine.com/
[Tue Mar 01 17:18:59.586769 2022] [php:error] [pid 20526] [client 70.123.182.51:0]
PHP Fatal error: Uncaught ValueError: Unknown format specifier "(" in /nas/content/live/xpelswiss/wp-content/plugins/elementor-pro/modules/nav-menu/widgets/nav-menu.php:330Stack trace:
#0 /nas/content/live/xpelswiss/wp-content/plugins/elementor-pro/modules/nav-menu/widgets/nav-menu.php(330): sprintf('#!trpst#trp-get...', 'Mobile', '>', 767)
#1 /nas/content/live/xpelswiss/wp-content/plugins/elementor/includes/base/controls-stack.php(2249): ElementorPro\\Modules\\NavMenu\\Widgets\\Nav_Menu->register_controls()
#2 /nas/content/live/xpelswiss/wp-content/plugins/elementor/includes/base/controls-stack.php(494): Elementor\\Controls_Stack->init_controls()
#3 /nas/content/live/xpelswiss/wp-content/plugins/elementor/includes/base/widget-base.php(175): Elementor\\Controls_Stack->get_stack()
#4 /nas/content/live/xpelswiss/wp-content/plugins/elementor/includes/base/controls-stack.php(300): Elementor\\Widget_Base->get_stack()
#5 /nas/content/live/xpelswiss/wp-content/plugins/elementor/includes/base/controls-stack.php(2336): Elementor\\Controls_Stack->get_controls()
#6 /nas/content/live/xpelswiss/wp-content/plugins/elementor/includes/base/controls-stack.php(1095): Elementor\\Controls_Stack->sanitize_settings(Array)
#7 /nas/content/live/xpelswiss/wp-content/plugins/elementor/includes/base/controls-stack.php(2083): Elementor\\Controls_Stack->get_data('settings')
#8 /nas/content/live/xpelswiss/wp-content/plugins/elementor/core/base/base-object.php(142): Elementor\\Controls_Stack->get_init_settings()
#9 /nas/content/live/xpelswiss/wp-content/plugins/elementor/core/base/base-object.php(40): Elementor\\Core\\Base\\Base_Object->ensure_settings()
#10 /nas/content/live/xpelswiss/wp-content/plugins/essential-addons-elementor/includes/Extensions/EAEL_Tooltip_Section.php(376): Elementor\\Core\\Base\\Base_Object->get_settings('eael_tooltip_se...')
#11 /nas/content/live/xpelswiss/wp-includes/class-wp-hook.php(307): Essential_Addons_Elementor\\Pro\\Extensions\\EAEL_Tooltip_Section->before_render(Object(ElementorPro\\Modules\\NavMenu\\Widgets\\Nav_Menu))
#12 /nas/content/live/xpelswiss/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array)
#13 /nas/content/live/xpelswiss/wp-includes/plugin.php(474): WP_Hook->do_action(Array)
#14 /nas/content/live/xpelswiss/wp-content/plugins/elementor/includes/base/widget-base.php(600): do_action('elementor/widge...', Object(ElementorPro\\Modules\\NavMenu\\Widgets\\Nav_Menu))
#15 /nas/content/live/xpelswiss/wp-content/plugins/elementor/includes/base/widget-base.php(750): Elementor\\Widget_Base->render_content()
#16 /nas/content/live/xpelswiss/wp-content/plugins/elementor/includes/base/element-base.php(447): Elementor\\Widget_Base->print_content()
#17 /nas/content/live/xpelswiss/wp-content/plugins/elementor/includes/base/element-base.php(741): Elementor\\Element_Base->print_element()
#18 /nas/content/live/xpelswiss/wp-content/plugins/elementor/includes/base/element-base.php(447): Elementor\\Element_Base->print_content()
#19 /nas/content/live/xpelswiss/wp-content/plugins/elementor/includes/base/element-base.php(741): Elementor\\Element_Base->print_element()
#20 /nas/content/live/xpelswiss/wp-content/plugins/elementor/includes/base/element-base.php(447): Elementor\\Element_Base->print_content()
#21 /nas/content/live/xpelswiss/wp-content/plugins/elementor/core/base/document.php(1529): Elementor\\Element_Base->print_element()
#22 /nas/content/live/xpelswiss/wp-content/plugins/elementor-pro/modules/theme-builder/documents/theme-document.php(406): Elementor\\Core\\Base\\Document->print_elements(Array)
#23 /nas/content/live/xpelswiss/wp-content/plugins/elementor/includes/frontend.php(1092): ElementorPro\\Modules\\ThemeBuilder\\Documents\\Theme_Document->print_elements_with_wrapper(Array)
#24 /nas/content/live/xpelswiss/wp-content/plugins/elementor/core/base/document.php(1051): Elementor\\Frontend->get_builder_content(14, false)
#25 /nas/content/live/xpelswiss/wp-content/plugins/elementor-pro/modules/theme-builder/documents/theme-document.php(150): Elementor\\Core\\Base\\Document->get_content(false)
#26 /nas/content/live/xpelswiss/wp-content/plugins/elementor-pro/modules/theme-builder/documents/theme-document.php(165): ElementorPro\\Modules\\ThemeBuilder\\Documents\\Theme_Document->get_content()
#27 /nas/content/live/xpelswiss/wp-content/plugins/elementor-pro/modules/theme-builder/classes/locations-manager.php(308): ElementorPro\\Modules\\ThemeBuilder\\Documents\\Theme_Document->print_content()
#28 /nas/content/live/xpelswiss/wp-content/plugins/elementor-pro/modules/theme-builder/theme-support/generate-press-theme-support.php(31): ElementorPro\\Modules\\ThemeBuilder\\Classes\\Locations_Manager->do_location('header')
#29 /nas/content/live/xpelswiss/wp-includes/class-wp-hook.php(307): ElementorPro\\Modules\\ThemeBuilder\\ThemeSupport\\GeneratePress_Theme_Support->do_header('')
#30 /nas/content/live/xpelswiss/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array)
#31 /nas/content/live/xpelswiss/wp-includes/plugin.php(474): WP_Hook->do_action(Array)
#32 /nas/content/live/xpelswiss/wp-content/themes/generatepress/header.php(47): do_action('generate_header')
#33 /nas/content/live/xpelswiss/wp-includes/template.php(770): require_once('/nas/content/li...')
#34 /nas/content/live/xpelswiss/wp-includes/template.php(716): load_template('/nas/content/li...', true, Array)
#35 /nas/content/live/xpelswiss/wp-includes/general-template.php(48): locate_template(Array, true, true, Array)
#36 /nas/content/live/xpelswiss/wp-content/plugins/elementor/modules/page-templates/templates/header-footer.php(9): get_header()
#37 /nas/content/live/xpelswiss/wp-includes/template-loader.php(106): include('/nas/content/li...')
#38 /nas/content/live/xpelswiss/wp-blog-header.php(19): require_once('/nas/content/li...')
#39 /nas/content/live/xpelswiss/index.php(17): require('/nas/content/li...')
#40 {main} thrown in /nas/content/live/xpelswiss/wp-content/plugins/elementor-pro/modules/nav-menu/widgets/nav-menu.php on line 330, referer: https://xpelswiss.wpengine.com/
Hi Daniel,
Can you try disabling Essential addons for Elementor and Elementor Pro and then see if the error goes away?
Also, any chance you can copy the site to a staging site and let us have temporary backend access? So we can do some tests on it.
Let us know. :D
https://xpelswiss.wpengine.com/
- this is a staging environment
I can create a temporary login, if you send me an email address to use.
Deactivating EA for Elementor resulted in no changes, the exceptions still occurred.
Deactivating Elementor Pro: French (FR) language still threw the exception, but switching to Italian (IT) worked. There's something about that FR slug which is causing a conflict, I think. But, changing the FR slug has not worked, either.
- the site cannot function without Elementor Pro active.
[Wed Mar 02 14:09:49.678012 2022] [php:error] [pid 31771] [client 70.123.182.51:0]
PHP Fatal error: Uncaught ValueError: Unknown format specifier "#" in /nas/content/live/xpelswiss/wp-content/themes/generatepress/inc/defaults.php:94
Stack trace:
#0 /nas/content/live/xpelswiss/wp-content/themes/generatepress/inc/defaults.php(94): sprintf('#!trpst#trp-get...', '2')
#1 /nas/content/live/xpelswiss/wp-content/themes/generatepress/inc/theme-functions.php(21): generate_get_defaults()
#2 /nas/content/live/xpelswiss/wp-content/themes/generatepress/inc/theme-functions.php(44): generate_get_option('layout_setting')
#3 /nas/content/live/xpelswiss/wp-content/themes/generatepress/inc/markup.php(21): generate_get_layout()
#4 /nas/content/live/xpelswiss/wp-includes/class-wp-hook.php(309): generate_body_classes(Array)
#5 /nas/content/live/xpelswiss/wp-includes/plugin.php(189): WP_Hook->apply_filters(Array, Array)
#6 /nas/content/live/xpelswiss/wp-includes/post-template.php(836): apply_filters('body_class', Array, Array)
#7 /nas/content/live/xpelswiss/wp-includes/post-template.php(595): get_body_class(Array)
#8 /nas/content/live/xpelswiss/wp-content/themes/generatepress/header.php(20): body_class()
#9 /nas/content/live/xpelswiss/wp-includes/template.php(770): require_once('/nas/content/li...')
#10 /nas/content/live/xpelswiss/wp-includes/template.php(716): load_template('/nas/content/li...', true, Array)
#11 /nas/content/live/xpelswiss/wp-includes/general-template.php(48): locate_template(Array, true, true, Array)
#12 /nas/content/live/xpelswiss/wp-content/plugins/elementor/modules/page-templates/templates/header-footer.php(9): get_header()
#13 /nas/content/live/xpelswiss/wp-includes/template-loader.php(106): include('/nas/content/li...')
#14 /nas/content/live/xpelswiss/wp-blog-header.php(19): require_once('/nas/content/li...')
#15 /nas/content/live/xpelswiss/index.php(17): require('/nas/content/li...')
#16 {main} thrown in /nas/content/live/xpelswiss/wp-content/themes/generatepress/inc/defaults.php on line 94, referer: https://xpelswiss.wpengine.com/
Hi there,
This sounds like there's some sort of error in the Elementor Pro translation file.
Just to confirm:
1. The error goes away if Elementor Pro is deactivated
2. The error goes away with Elementor Pro activated if the language is changed from French
Is that correct?