On d.o., there are a couple of issue pages on which the breadcrumb looks strange (example).
The example issue belonged to the "Simple Sitemap"-project, which has been removed (related: #350112: Removal of deleted projects directories). I don't know how it was removed (since when I remove a project in my test environment, the issues are also removed), but the issues themselves are still accessible via search / user track pages / etc. While I do suspect that unorthodox methods might have been used to remove the project, I think project_issue should still render a valid breadcrumb in this scenario (especially since this happens on d.o.)
Since these issues have effectively been orphaned, I feel that the breadcrumb should no longer try to reference the project/parent. An alternative would be to display something like "<missing>" (not linked) where the project name/link used to go.
Attached is a stab at a patch that renders a breadcrumb on an issue page for a missing project as
Home > Projects
instead of
Home > Projects > > Issues (linked to /project/issues)
To test this patch I had to remove the project-record from the node-table via SQL.
Comment | File | Size | Author |
---|---|---|---|
#3 | breadcrumbs.jpg | 16.61 KB | mr.baileys |
#1 | project_issue_breadcrumbs.patch | 785 bytes | mr.baileys |
Comments
Comment #1
mr.baileysand why set something to CNR when you forget to attach the patch... Here it is... On a related note, deleting a project in a way described in this issue also causes the "project name"-field to be blank in the issues-table & metadata-table. Not sure this is worth fixing though...
Comment #2
mr.baileysBesides the broken breadcrumbs, it is also impossible to close existing issues (or make any other change for that matter) once the project has been removed. I tried to close #310963: Publish a Simple Sitemap release but this failed because no valid project was selected from the project drop-down.
Comment #3
mr.baileysOops. In my rush to be helpful, I decided to close the issue I used as an example when posting this issue. To do this, I changed the project to "Drupal.org infrastructure", which means there no longer is an example on d.o. that demonstrates the problem. Is it possible to run a query against the d.o. database to figure out if there are any more examples of this?
Attached is a screenshot of the breadcrumbs on my installation, after deleting the project from the node table.
Comment #4
mr.baileysFound another example of this bug on d.o.: #51148: Invalid argument in 4.7.b4 (note the breadcrumb on this page)
Comment #5
drummStill relevant on D7, #2424277: Deleting sandbox project lead to database error on its issues pages.
Comment #6
drummI think we should prevent deletion of projects with associated issues. See also #142957: Prevent project deletion when releases are present.
Comment #7
drummI was wrong in my last comment 4 years ago. Projects do get deleted sometimes, like sandbox projects on Drupal.org.
Comment #9
drumm