Update context scope plugin manage link/url/route functionality
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3578114. --> Reported by: [erichomanchuk](https://www.drupal.org/user/299489) Related to !90 >>> <p>[Tracker]<br> <strong>Update Summary: </strong>[One-line status update for stakeholders]<br> <strong>Check-in Date: </strong>MM/DD/YYYY<br> <strong>Blocked by: </strong>[#XXXXXX] (New issues on new lines)<br> <strong>Additional Collaborators: </strong> @username1, @username2<br> <em>Metadata is used by the <a href="https://www.drupalstarforge.ai/" title="AI Tracker">AI Tracker.</a> Docs and additional fields <a href="https://www.drupalstarforge.ai/ai-dashboard/docs" title="AI Issue Tracker Documentation">here</a>.</em><br> [/Tracker]</p> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>This was originally report as a bug specifically for the language link but this is a more general issue for scope plugin manage links. See original bug report below.</p> <p>We want to have manage links for extra configuration related to scope plugins. Sometimes these rely on additional modules being installed. One approach would be to not allow the plugin to be enabled if the modules are not installed. I created this issue for that:</p> <p><span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/ai_context/-/work_items/3579235" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/ai_context/-/work_items/3579235</a></span></p> <p>Since that work may not get done for this sprint and we are going to release a beta1 this week and would like to not have any outstanding bugs before that, I think we should still do this issue. Plus, just because a module is enabled, doesn't mean the manage link route is still valid as things can change, so this is a failsafe.</p> <p><strong>Original bug report:</strong></p> <p>When adding context scope to a context item (new context item) in the Languages section on a site there is a "Manage Languages" link that is displayed. When clicking on the link I am taken to a 404 Page not Found. The issue is I do not have the Language module installed so it is pointing to a route that does not exist</p> <p><strong>Language link</strong><br> <img src="https://www.drupal.org/files/issues/2026-03-09/language-link.png" alt="Language link"></p> <p><strong>Page not Found</strong><br> <img src="https://www.drupal.org/files/issues/2026-03-09/mangage-language-page.png" alt="Page not found"></p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Restructure the link/url/route logic so that the scope plugin provides and route and parameters. Then, the base class can check if that route exists and show the link, if so, or hide, if not.</p> <p>I also tacked on this issue here since it's easier to do at the same time:</p> <p><span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/ai_context/-/work_items/3579234" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/ai_context/-/work_items/3579234</a></span></p>
issue