πŸ‡«πŸ‡· β‘ β‘’ UTC+2
Account created on 6 September 2012, over 11 years ago
#

Merge Requests

More

Recent comments

πŸ‡«πŸ‡·France gabesullice πŸ‡«πŸ‡· β‘ β‘’ UTC+2

gabesullice β†’ made their first commit to this issue’s fork.

πŸ‡«πŸ‡·France gabesullice πŸ‡«πŸ‡· β‘ β‘’ UTC+2

Converted your patch to a merge request ^

I didn't make any changes. Let's let a maintainer review this.

πŸ‡«πŸ‡·France gabesullice πŸ‡«πŸ‡· β‘ β‘’ UTC+2

gabesullice β†’ created an issue.

πŸ‡«πŸ‡·France gabesullice πŸ‡«πŸ‡· β‘ β‘’ UTC+2

Took a swing at this and updated the IS

πŸ‡«πŸ‡·France gabesullice πŸ‡«πŸ‡· β‘ β‘’ UTC+2
πŸ‡«πŸ‡·France gabesullice πŸ‡«πŸ‡· β‘ β‘’ UTC+2

gabesullice β†’ made their first commit to this issue’s fork.

πŸ‡«πŸ‡·France gabesullice πŸ‡«πŸ‡· β‘ β‘’ UTC+2

For those looking for a simple workaround to fix their kernel tests, the following additions to my kernel test class suppressed the exception.

I imported Drupal\Tests\user\Traits\UserCreationTrait and added that trait to my kernel test class with use UserCreationTest. Then I added $this->setUpCurrentUser() in my class's setUp method. In my case, I didn't need to call that method any optional arguments.

πŸ‡«πŸ‡·France gabesullice πŸ‡«πŸ‡· β‘ β‘’ UTC+2
πŸ‡«πŸ‡·France gabesullice πŸ‡«πŸ‡· β‘ β‘’ UTC+2

Thanks @zrpnr!

πŸ‡«πŸ‡·France gabesullice πŸ‡«πŸ‡· β‘ β‘’ UTC+2

A gaunt hand breaks through the damp earth of the cemetery grounds, once dead, the zombie (issue) rises to torment us again.

heh, jokes aside. I stumbled in here because I came across a similar need. @tim.plunkett, you're right that you can make this work with the form system as-is, but one needs to customize the validateForm method and call setValueForElement() method. So yes, it's already possible, but only if you have a deep enough understanding of the form API to understand what's going on in FieldStorageAddForm and are willing to set data during the validation step.

I think it's a reasonable feature request to make this part of the machine name form element API via a #value_prefix property or similar. Perhaps as a #process callback. I guess that's why this issue hasn't ever been closed.

Maybe this bump will breath new life into the idea ;)

πŸ‡«πŸ‡·France gabesullice πŸ‡«πŸ‡· β‘ β‘’ UTC+2

Thank you so so so much for all the heart and soul you've poured into our little internet outpost. We're all better for it and we'll honestly never be able to repay it entirely.

Thank you from the bottom of my heart.

We'll always love ya and we'll never forget ya!

#12++

πŸ‡«πŸ‡·France gabesullice πŸ‡«πŸ‡· β‘ β‘’ UTC+2

I'm trying to do that in MenuLinkTree, but I'm running into a hiccup because, at some point in the process of building a menu link tree, a particular item may not have any visible children even though one will be added later. Thus, my current code is removing items that it shouldn't because it doesn't "know" about the child that doesn't exist yet. I think I just have to spend more time with Xdebug to figure out where these missing child links are added.

To follow up on this: the issue was in the toolbar module. It does a quirky thing where it only loads the top level of the admin menu, then it loads the subtree of each of those top level items separately, rather than loading the whole tree at once. This explains why I wasn't seeing any children when I was step-debugging the first load of the admin menu (it was only loading a shallow depth).

Needs work to update the toolbar tests, which makes sense.

To clarify: it makes sense because I'm fiddling with the menu and the toolbar tests probably make some assumptions that don't hold any longer.

πŸ‡«πŸ‡·France gabesullice πŸ‡«πŸ‡· β‘ β‘’ UTC+2

Needs work to update the toolbar tests, which makes sense.

πŸ‡«πŸ‡·France gabesullice πŸ‡«πŸ‡· β‘ β‘’ UTC+2

Okay, I added code to update the database schema on existing sites. I was expecting to write an update hook to do this, but it seems like the default menu tree storage service handles its own schema changes, so I made my changes in there instead. This probably needs special attention.

Needs review for tests.

πŸ‡«πŸ‡·France gabesullice πŸ‡«πŸ‡· β‘ β‘’ UTC+2

Needs work for an update hook to add the transitive column to existing sites.

πŸ‡«πŸ‡·France gabesullice πŸ‡«πŸ‡· β‘ β‘’ UTC+2

I spent some time trying to get this working by adding an additional access check to all of the routes which use the SystemController::systemAdminMenuBlockPage controller, but I don't think that's going to be a fruitful approach. It's difficult to check access to menu links from that controller and after digging in, it felt a little hacky.

Instead, I think it might be more useful and generally useful to add a new flag to menu items to indicate whether it should or shouldn't be shown if doesn't have children. Tentatively, I'm naming this flag transitive with a default value of FALSE. The idea is that menu links like People and Development can be marked "transitive" since their only purpose is to transit users from the root page to a child page. Thus, if they have no visible child links, they can be safely elided.

I'm trying to do that in MenuLinkTree but I'm running into a hiccup because at some point in the process of building a menu link tree, a particular item may not have any children but will have one added later. So, my current code is removing items that it shouldn't because it doesn't have a way to "know" about the child that doesn't exist yet. I think I just have to spend more time with Xdebug.

The drawback of the menu link tree based approach is that the system menu block pages would still be accessible, even without any links, if a user visited the right URL directly. That feels like a separate issue that could be handled in a follow-up though. All we'd need to do would be to throw a 403 or 404 HTTP exception in the controller instead of printing out the message.

πŸ‡«πŸ‡·France gabesullice πŸ‡«πŸ‡· β‘ β‘’ UTC+2

Failing test.

πŸ‡«πŸ‡·France gabesullice πŸ‡«πŸ‡· β‘ β‘’ UTC+2

I was able to reproduce this on the tip of the 9.5.x branch and I updated the issue description with steps to reproduce this bug from a clean installation.

πŸ‡«πŸ‡·France gabesullice πŸ‡«πŸ‡· β‘ β‘’ UTC+2

+1 to UpperCamel casing for enum names.

πŸ‡«πŸ‡·France gabesullice πŸ‡«πŸ‡· β‘ β‘’ UTC+2

The current approach is not workable because it is a significant feature regression.

@xjm, I think there's a legitimate bug here, but the issue went a little off track by mixing in performance and scalability concerns.

What's the bug?

In short, if I'm on the /admin/structure/menu/manage/main/add route (note the main route param), I shouldn't be able to create a new menu link in the footer menu, but I can.

To expand on that: imagine if you're editing the and you follow the button. Now also imagine that you probably have a menu link with the same name in both the and menu. On the create form, you accidentally choose the link in the menu because you (understandably) assumed that you're adding a link to the . Worse, after you click save, you'll be redirected back to the overview and you'll be presented with a green status message saying "The menu link has been saved," however you will not see your newly created menu link since it was actually added to the menu.b

πŸ‡«πŸ‡·France gabesullice πŸ‡«πŸ‡· β‘ β‘’ UTC+2

gabesullice β†’ made their first commit to this issue’s fork.

πŸ‡«πŸ‡·France gabesullice πŸ‡«πŸ‡· β‘ β‘’ UTC+2

Thank you @Wim Leers! I'm going to go ahead and make you a maintainer since I know you have some critical deps on this module. This change looks good to me!

Production build https://api.contrib.social 0.61.6-2-g546bc20