- Issue created by @ravi kant
- Assigned to abhishek_virasat
- 🇮🇳India ravi kant Jaipur
The temporary solution of this issue is if you do make change of "Hide mobile menu" value.
See the attached screenshot for more clarification. - Status changed to Needs review
over 1 year ago 6:40pm 9 October 2023 - 🇺🇸United States DamienMcKenna NH, USA
We're seeing this on a site too.
The problem is in the template - if block_config['hide-mobile-menu'] is not a valid number then it results in an empty string, which leaves faulty JS.
Does this fix the problem for you?
- Status changed to Needs work
over 1 year ago 11:25am 10 October 2023 - 🇮🇳India ravi kant Jaipur
@DamienMcKenna
Getting below error after apply patch tb_megamenu-n3391952-7.patch → . The version of module used by me is 3.0.0-alpha2.
The website encountered an unexpected error. Please try again later. Twig\Error\SyntaxError: Unknown "format_number" filter. in Twig\ExpressionParser->getFilterNodeClass() (line 33 of modules/contrib/tb_megamenu/templates/tb-megamenu.html.twig). Twig\ExpressionParser->parseFilterExpressionRaw(Object) (Line: 547) Twig\ExpressionParser->parseFilterExpression(Object) (Line: 405) Twig\ExpressionParser->parsePostfixExpression(Object) (Line: 288) Twig\ExpressionParser->parsePrimaryExpression() (Line: 177) Twig\ExpressionParser->getPrimary() (Line: 72) Twig\ExpressionParser->parseExpression() (Line: 127) Twig\Parser->subparse(NULL, ) (Line: 83) Twig\Parser->parse(Object) (Line: 491) Twig\Environment->parse(Object) (Line: 519)
- Status changed to Needs review
over 1 year ago 1:21pm 10 October 2023 - 🇺🇸United States DamienMcKenna NH, USA
Yeah, that's a standard Twig filter but for some reason it isn't available. I'm confused by that.
Anyway, this is the patch without the format_number filter.
- Issue was unassigned.
- 🇮🇳India ravi kant Jaipur
The patch " tb_megamenu-n3391952-9-3alpha2.patch → " is working for me. The console error is not displaying now in version 3.0.0-alpha2.
- 🇪🇸Spain AntonioDP
The patch "tb_megamenu-n3391952-9-3alpha2.patch" of #9 work for me.
Thanks! - Status changed to RTBC
about 1 year ago 1:10pm 11 January 2024 - First commit to issue fork.
- 🇺🇸United States euk
This shouldn't be really in the template. Ideally the template should not be concerned with any preprocessing stuff - for that there is the
template_preprocess_tb_megamenu()
hook. Also printing that static value in JS and then checking against it - doesn't make sense.I submitted a merge request with an updated fix.
- Status changed to Needs review
about 1 year ago 6:42pm 16 February 2024 - 🇺🇸United States euk
Don't want to bug anyone, but it would be good to get this reviewed at some point before the issue is closed due to inactivity...
- Status changed to Fixed
about 1 year ago 2:30pm 29 March 2024 -
themodularlab →
committed df91c47f on 3.x authored by
euk →
Issue #3391952 by DamienMcKenna, euk, ravi kant: Uncaught SyntaxError:...
-
themodularlab →
committed df91c47f on 3.x authored by
euk →
-
themodularlab →
committed df91c47f on bugfix/TBMM-3366359 authored by
euk →
Issue #3391952 by DamienMcKenna, euk, ravi kant: Uncaught SyntaxError:...
-
themodularlab →
committed df91c47f on bugfix/TBMM-3366359 authored by
euk →
Automatically closed - issue fixed for 2 weeks with no activity.