Problem/Motivation
I'm working on upgrading my site to Drupal 10, and I'm required to upgrade tb_megamenu from 8.x-1.x to 3.x. Given that there are major changes between the 8.x-1x and 3.x and given that 8.x-1.7 shows up as the recommended version by the maintainer on the project page (3.x is still on alpha), I would like to request an 8.x-1.x version compatible with Drupal 10.
Steps to reproduce
- Upgrade tb_megamenu from version 8.x-1.7 to 3.0.0-alpha2.
- Verify that your mega menu still works. In my case, I have to write extensive CSS to fix my main menu.
Proposed resolution
- Provide a 8.x-1.x version compatible with Drupal 10 so users like me can have more time to upgrade tb_megamenu.
Remaining tasks
- Create MR
- Update MR to be compatible with latest Drupal 8.x.
User interface changes
- None
API changes
- None
Data model changes
- None
Issue fork tb_megamenu-3383939
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 #3
themodularlab@mmenavas,
Thanks for submitting this. Some background on this. We took over maintaining TB a few years ago. The 8.x branch is the legacy version of the module while the 2.x and 3.x are our versions. The 8.x is really only the "recommended" version because we don't yet have an official release for 2.x (d9) and 3.x (d10) yet. I'm not opposed to making 8.x Drupal 10 compatible as long as it still works for 8 and 9. At this point, we're really only supporting bug fixes and security issues for the 8.x branch.
Another issue you will run into. In https://git.drupalcode.org/project/tb_megamenu/-/blob/8.x-1.x/src/Contro... on line 88, There's an issue where the usage of
getContentTypeFormat()isn't compatible with Symfony 6. You have to usegetContentType()instead. See https://git.drupalcode.org/project/tb_megamenu/-/commit/072b8dd984d98314.... That's the primary reason that we now have a 2.x and a 3.x branch, sadly.I'm happy to consider merging this and making 8.x compatible with 8, 9, and 10 but it will have to work for all those versions.
One thing you could consider using is the Drupal Lenient to solve the D10 dependency issue, then you can rely on patches to address the remaining items until you are ready to move to the 3.x branch, which is WAY better by the way. :)
Comment #4
mmenavas commentedComment #5
mmenavas commented@themodularlab: Thanks for the background info. Sorry I updated the status of this issue before seeing your comment. I think it makes sense to make the release compatible with Drupal 8 since the branch name is 8.x-1.x. Should the code be compatible with PHP 7.4 too?
Comment #6
mmenavas commentedComment #7
themodularlabHmm good question. I think you have to be on 9 to use php 8. Might need to reconsider any support of 8.x at this point since it's been EOL for a bit now.
Comment #8
mmenavas commentedThanks for pointing out that D10 compatible modules should use getContentTypeFormat instead of getContentType. I pushed a commit to my MR to resolve this issue (the fixed is based on https://www.drupal.org/project/drupal/issues/3306886), Unfortunately my patch makes use of PHP 8 features that are not available in PHP 7, so that makes my patch only compatible with D9 and D10. Feel free to close the issue if you think any development/reviewing effort should be spent on making the 3.x stable. As you pointed out before, tb_megamenu users who still wish to use the 8.x-1.x branch on D10 sites can use the lenient composer plugin along with my patch.
Comment #9
ruslan piskarovVersion 3.x has totally different html mockup and we aren't ready to refactor more 50 projects. We definitely need a patch for working 8.x-1.x with Drupal 10.
Comment #10
themodularlabHi Ruslan Piskarov,
See Comment #3 on this issue. If you use the Drupal Lenient composer package and then create patches to fix the issue referenced on #3 as well as patching the info file to allow for Drupal 10, then you should be good. That issue though currently prevents us from just setting the version requirements to 8, 9, and 10.
Comment #11
shenron_segamag commentedHi,
I'm a little confused. Is it actually planned to release a patch to make 8.1-1.x with Drupal 10 ?
Comment #12
bertvivie commentedHi somewhat confused too, I upgraded to drupal 10 on my dev machine and got almost everything working so almost ready to bring it to production
I Installed tb_megamenu 3.x alpha2 because the 8.x version was not compatible with drupal 10.
But with the 3.x version tb_megamenu on a normal screen works fine, only have to do some css to change background colors, but on an small (mobile) device it is very ugly and not working as supposed:
Hovering and collapsing the submenu's doesn't work, the main menu's are much to high and on a mobile you can't scroll down so you only see the firste 2 items and not possible to collaps.
My question: is 8.x ported to drupal 8, then I can reinstall version 8 again and install 3.x when it is production ready.
Used tb_megamenu for over 10 yrs now from drupal 8 until drupal 9, do not like to leave this excelent menu system.
See www.redcaps.nl on how It should work (a drupal 9.5 site with tb_megamenu 8.x) especialy on a mobile device.
Comment #14
themodularlab