Problem/Motivation
When calling Url::fromRoute($someroute) in a update hook, the generated URL contains the prefix /update.php/.
Proposed resolution
Make sure the generated base URL filters update.php (by default, it could be optional as proposed in https://www.drupal.org/node/2548095).
Comments
Comment #10
jnicola commentedFound this issue linked from another similar issue. Working around this was simple enough:
$entered_url = \Drupal\Core\Url::fromUserInput($menu_link_internal_path, ['base_url' => '']);
Passing the option in for base_url resolved the issue for me!
Comment #12
init90It's a duplicate of #2956953: Link not properly generated on update.php
This issue was created earlier but #2956953: Link not properly generated on update.php has more followers, so I closed this one.