Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Port the module to Drupal 8.
Comment | File | Size | Author |
---|---|---|---|
#12 | 2848327-10.patch | 4.79 KB | stefan.r |
| |||
#10 | 2848327-10.patch | 4.79 KB | webflo |
#7 | 2848327-6.patch | 62.41 KB | webflo |
#6 | 2848327-6.interdiff.txt | 957 bytes | webflo |
#2 | 2848327-menu-link-weight-d8.patch | 63.27 KB | tstoeckler |
Comments
Comment #2
tstoecklerSince a lot of the related code in core - in particular the form-related code - that this module interacts with is (almost) unchanged I've pretty much performed a straight port so the patch should be at least somewhat reviewable.
I couldn't quite get the test to pass, but posting here already since the module does seem to be working quite well. I will try to finish the test soon.
Comment #3
rutiolmaGreat!
I just noticed that selecting a "Parent item" doesn't update the "Menu link weight items" (and throws an error), which means that link weight is working only for the menu root. It's also impossible to save the node when selecting the parent, throwing an error.
On both cases the error is "Drupal\Component\Plugin\Exception\PluginNotFoundException: Plugin ID 'menu_link_content' was not found. in Drupal\Core\Menu\MenuLinkManager->getDefinition() (line 208 of /core/lib/Drupal/Core/Menu/MenuLinkManager.php)."
Comment #4
tstoecklerThanks for trying this out. I did test this locally and it did work for me, maybe I managed to break something afterwards. Will try to investigate soon. Thanks!
Comment #5
tijsdeboeckGreat! Love this module!
We also started on a D8 port, but will give your version a try, and if we find anything, we'll add it.
Comment #6
webflo CreditAttribution: webflo at UEBERBIT GmbH commentedLook great, here is a fix for the issue @rmarques mentioned in comment #3.
Comment #7
webflo CreditAttribution: webflo at UEBERBIT GmbH commentedAnd the full patch.
Comment #8
webflo CreditAttribution: webflo at UEBERBIT GmbH commentedSorry, i changed the condition accidentally. I will fix it with the next patch. Currently, working on the tests.
Comment #9
stefan.r CreditAttribution: stefan.r commented#7 is now 8.x-1.x-dev (without the accidentally removed return statement), as soon as @webflo finishes this we can tag a beta.
Ideally I'd also like to port #2784555: Simplify access checks and allow modules to override to 8.x
Comment #10
webflo CreditAttribution: webflo at UEBERBIT GmbH commentedLets fix the test first. All tests should pass with this patch.
@stefan.r Could you enable Automatic testing? Thanks
Comment #11
tstoecklerInterdiff in #6 looks perfect, totally makes sense.
Re #10:
Wow, that's amazing.
I tried to get the test to pass myself, but couldn't figure out why the values weren't being submitted correctly.
Thanks!
Interesting, I guess that is needed due to the static cache in the test process itself?
So looks great to me, will post an updated patch. I also added a Browser Test to test the no-JS fallback button thingy.
Thanks a lot @webflo!
Comment #12
stefan.r CreditAttribution: stefan.r commentedreuploading to trigger tests
Comment #14
webflo CreditAttribution: webflo at UEBERBIT GmbH commentedHmm, maybe the old info file causes a issue with d.o composer thingy?
@stefan.r You could delete menu_link_weight.info, menu_link_weight.install.orig, menu_link_weight.install.rej, menu_link_weight.module.orig from the repo?
Comment #16
stefan.r CreditAttribution: stefan.r commentedTagged a beta2 release:
https://www.drupal.org/project/menu_link_weight/releases/8.x-1.0-beta2