I am getting following error in my logs. I am using Drupal 9.2.6 /PHP 8+

Deprecated: Required parameter $menu_config follows optional parameter $theme_name in public_html/modules/contrib/we_megamenu/src/WeMegaMenuBuilder.php on line 549

Deprecated: Required parameter $child_item follows optional parameter $theme_name in /public_html/modules/contrib/we_megamenu/src/WeMegaMenuBuilder.php on line 549

Deprecated: Required parameter $menu_config follows optional parameter $theme_name in /public_html/modules/contrib/we_megamenu/src/WeMegaMenuBuilder.php on line 696

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

santhoshabraham created an issue. See original summary.

alancunha’s picture

Assigned: Unassigned » alancunha

alancunha’s picture

Status: Active » Needs review
alancunha’s picture

Assigned: alancunha » Unassigned

Edited to not assigned so the community can review.

santhoshabraham’s picture

Thank You, It works beautifully.

alancunha’s picture

Status: Needs review » Reviewed & tested by the community
kburakozdemir’s picture

Everything works fine. Thank you.

jsidigital’s picture

StatusFileSize
new5.06 KB

Currently running Drupal Mega Menu 8.x-1.13 and got these errors after upgrading to php8.1

See attached patch file for fix.

tonytosta’s picture

Thank you very much for this patch.

sidgrafix’s picture

After adding patch https://www.drupal.org/files/issues/2022-08-12/we_megamenu-3296290-5.patch - and then switching to dev version of this module because even tho patch applied to non-dev it didn't fix the Deprecated function reset() however that patched worked with dev version fine.

I then got this error with different lines (552 and 699 "but figured it was the same, and was") as this patch fixed those.

This should definitely be merged for Drupal 9/10 my current version Drupal 9.5.2, PHP 8.1.13

cybercoda’s picture

I'm experiencing the same problem. Tried the patch referenced in #9 and #11 on both module 1.13 and dev version but patch fails to apply in both cases. I'm running Drupal 9.5.2, PHP 8.1.13

alex.bukach’s picture

StatusFileSize
new2.23 KB

Here's the corrected patch.

vinaygawade’s picture

Thank you @alex-bukach, Your given patch from #13 is applied properly and removed all mentioned errors.

onejam’s picture

Same. The patch in comment #13 fixed all the deprecated errors.

Running Drupal 9.5.4 with PHP 8.1.16

Thank you

  • Alex Bukach authored ce2a7d47 on 8.x-1.x
    Issue #3239043 by alancunha, jsidigital, Alex Bukach, santhoshabraham,...
rjjakes’s picture

Status: Reviewed & tested by the community » Fixed

Patch mostly duplicates https://www.drupal.org/project/we_megamenu/issues/3300703

Merged the remaining diff to 8.x-1.x

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

trevorbradley’s picture

Looks like this was broken as part of

commit dba69e001b93d96e546b8b6627b1e691ec03d1d5 (tag: 8.x-1.14-rc1)
Author: Bao Tran
Date: Mon Aug 14 16:19:55 2023 +0700

Various revert & fixes

ce2a7d47 got reverted as part of this update 3 days ago.