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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mr.baileys’s picture

and 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...

mr.baileys’s picture

Title: Missing breadcrumbs after project deletion » Issue wonkiness after project deletion

Besides 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.

mr.baileys’s picture

FileSize
16.61 KB

Oops. 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.

mr.baileys’s picture

Found another example of this bug on d.o.: #51148: Invalid argument in 4.7.b4 (note the breadcrumb on this page)

drumm’s picture

Version: 5.x-2.x-dev » 7.x-2.x-dev
Issue summary: View changes
Status: Needs review » Needs work
drumm’s picture

I think we should prevent deletion of projects with associated issues. See also #142957: Prevent project deletion when releases are present.

drumm’s picture

Assigned: Unassigned » drumm

I was wrong in my last comment 4 years ago. Projects do get deleted sometimes, like sandbox projects on Drupal.org.

  • drumm committed 1fecb6b on 7.x-2.x
    Issue #361971: Fix issue wonkiness after project deletion
    
drumm’s picture

Status: Needs work » Fixed
Issue tags: +affects drupal.org

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.