- Issue created by @Rajab Natshah
- Merge request !672Issue #3499406: Fix fallback logic for empty $source in browse() method to ensure config validation with improved fallback logic β (Open) created by Rajab Natshah
- π―π΄Jordan Rajab Natshah Jordan
Attached a static file
project_browser--2025-01-13--3499406--mr-672.patch
file form MR672
To be used with Composer Patches - π¬π§United Kingdom dunx
I've just raised https://www.drupal.org/project/project_browser/issues/3499630 π Some mandatory parameters are missing ("source") to generate a URL for route "project_browser.browse" Active which is a different error message experienced on a fresh D11.1 install, which looks to be related to project_browse.browse
- πΊπΈUnited States tim.plunkett Philadelphia
I think this is a duplicate of π WSOD when using settings to limit sources to recipes Active
Or at least they are different approaches to the same underlying problem - πΊπΈUnited States phenaproxima Massachusetts
Closing as a duplicate of π WSOD when using settings to limit sources to recipes Active , which has a more complete and robust fix. It should not be possible to access /admin/modules/browse without a source plugin ID.
- π―π΄Jordan Rajab Natshah Jordan
Thanks for following up! Moving to follow with the better logic.
- π―π΄Jordan Rajab Natshah Jordan
Still running into this error even after the release of project_browser 2.0.0-alpha8 β , which includes π WSOD when using settings to limit sources to recipes Active .
Anyone else seeing this?
Symfony\Component\Routing\Exception\MissingMandatoryParametersException: Some mandatory parameters are missing ("source") to generate a URL for route "project_browser.browse". in Drupal\Core\Routing\UrlGenerator->doGenerate() (line 187 of core/lib/Drupal/Core/Routing/UrlGenerator.php).
Not sure whatβs wrong with my setup
just using the default under Drupal 10.4.1
Is Project Browser now only for Drupal 11? - π―π΄Jordan Rajab Natshah Jordan
Attached a static
project_browser--2025-01-30--3499406-10.patch
file as a TEMP
To use with Composer PatchesHaving
project_browser.browse: path: '/admin/modules/browse/{source}' defaults: _controller: '\Drupal\project_browser\Controller\BrowserController::browse' _title: 'Browse projects' source: Drupal\project_browser\Plugin\ProjectBrowserSourceInterface requirements: _permission: 'administer modules' options: parameters: source: project_browser.source: true
And
public function browse(ProjectBrowserSourceInterface $source): array { // If $source is not set, determine a default source. if (!isset($source)) { // Retrieve the list of enabled sources from project browser admin settings. $enabled_sources = $this->config('project_browser.admin_settings')->get('enabled_sources') ?? []; // If at least one enabled source exists, use the first one as the default. if (!empty($enabled_sources) && isset($enabled_sources[0])) { $source = $enabled_sources[0]; } } return [ '#type' => 'project_browser', '#source' => $source, ]; }