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
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | we_megamenu-php8-3239043-13.patch | 2.23 KB | alex.bukach |
| #9 | we_megamenu_deprecated.patch | 5.06 KB | jsidigital |
Issue fork we_megamenu-3239043
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
Comment #2
alancunha commentedComment #4
alancunha commentedComment #5
alancunha commentedEdited to not assigned so the community can review.
Comment #6
santhoshabraham commentedThank You, It works beautifully.
Comment #7
alancunha commentedComment #8
kburakozdemir commentedEverything works fine. Thank you.
Comment #9
jsidigital commentedCurrently running Drupal Mega Menu 8.x-1.13 and got these errors after upgrading to php8.1
See attached patch file for fix.
Comment #10
tonytosta commentedThank you very much for this patch.
Comment #11
sidgrafix commentedAfter 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
Comment #12
cybercoda commentedI'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
Comment #13
alex.bukach commentedHere's the corrected patch.
Comment #14
vinaygawadeThank you @alex-bukach, Your given patch from #13 is applied properly and removed all mentioned errors.
Comment #15
onejam commentedSame. The patch in comment #13 fixed all the deprecated errors.
Running Drupal 9.5.4 with PHP 8.1.16
Thank you
Comment #17
rjjakes commentedPatch mostly duplicates https://www.drupal.org/project/we_megamenu/issues/3300703
Merged the remaining diff to 8.x-1.x
Comment #19
trevorbradley commentedLooks 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.