Skip Navigation

[Resuelto] After updating to WP 6.6 the Layouts Menu Cell breaks

This support ticket is created hace 4 meses. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

Este tema contiene 3 respuestas, tiene 2 mensajes.

Última actualización por Minesh hace 4 meses.

Asistido por: Minesh.

Autor
Mensajes
#2708532

I am trying to: update a site built with Toolset Layouts to WordPress 6.6

Link to a page where the issue can be seen: dev site, visible on all pages as it happens in the main menu

I expected to see: functioning dropdowns in the menu

Instead, I got: no dropdowns appear in the menu

Until recently I have built a lot of sites with Toolset Layouts on the Toolset Starter Theme built by Beda.
So I still have several customers whose website run on this theme with Toolset Layout based builds.
One of those sites I updated yesterday to WordPOress 6.6 and this broke the Menu cell providing the main menu. The main menu is multy level. The top level menu items that have children don't show their sub-menus anymore.
Looking in the page source I see the whole ul class=ddl-dropdown-menu is missing there.
I reverted the live site back to WordPress 6.5.5 which brought back the sub-menus.
I have a copy of the site on a dev server that I want to use to debug this issue.

I can grant Toolset Support access to this dev site.

#2708582

Additional info 1: Reading the release notes of WordPress 6.6 I saw the update contains an update of jQuery UI to version 1.13. As the menu problem looks like a Javascript issue I thought I'd drop this here as a possible clue.

Additional info 2: I have also seen this effect of the update to WP 6.6 on a site built with the Minimax theme (that was the one Beda built) with Toolset Layouts. Same issue: dropdown menu's not opening. Reverted to WP 6.5.5 fixed the issue for now.

#2708876

Minesh
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I checked and able to see the issue and I've escalated the issue in front of our next level support.

Please hold on until further updates. I will get in touch with you as soon as I have any updates on this issue.

#2708987

Minesh
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

I got the update on this.

The problem arises because of a very modest change in core WP, using a === comparison where it used to have a == comparison, such that the comparison now fails because a string ("0") is being compared with 0.

The change is in wp-includes/class-wp-walker.php:150:

// Descend only when the depth is right and there are children for this element.
		if ( ( 0 === $max_depth || $max_depth > $depth + 1 ) && isset( $children_elements[ $id ] ) ) {

We can't change the core file, but we will apply the change where we call this code, in layouts/inc/cell_types/wpddl.cell_menu.class.php:320, so that we force the $max_depth argument to be an integer.

So you can open the file layouts/inc/cell_types/wpddl.cell_menu.class.php:320 and navigate to line #320 and replace the existing line of code with the following line:

parent::display_element($element, $children_elements, (int) $max_depth, $depth, $args, $output);

We will try to add this fix to our next hotfix release.

Please check the following errata:
- https://toolset.com/errata/layouts-menu-cell-stops-displaying-child-items-with-wp-6-6/

#2709313

Thank you Minesh for your quick response and hotfix. I tested the fix and it works as you said. I will now apply this to all other sites that I manage that use the Layouts Menu Cell, and I will keep an eye on the next Layouts update.