Due to #2137201: [META] Regressions in project_release handling of version element fields and release-history XML there are currently 13 release nodes for Drupal core with faulty version element fields, resulting in broken release history XML feeds, which in turn confuse various clients of these feeds (in particular, the Update manager in Drupal core, and parts of Drush).

Here's the query to find the broken releases:

mysql> SELECT n.nid, n.title
FROM node n
INNER JOIN field_data_field_release_version_minor vmin ON n.nid = vmin.entity_id
INNER JOIN field_data_field_release_version_major vmaj ON n.nid = vmaj.entity_id
WHERE vmin.field_release_version_minor_value IS NOT NULL AND vmaj.field_release_version_major_value > 4;
+---------+-------------------+
| nid     | title             |
+---------+-------------------+
| 1168950 | drupal 6.22       | 
| 1890580 | drupal 6.28       | 
| 1922772 | drupal 7.20       | 
| 1935756 | drupal 7.21       | 
| 1960640 | drupal 7.22       | 
| 2026719 | drupal 8.0-alpha2 | 
| 2060023 | drupal 7.23       | 
| 2081595 | drupal 8.0-alpha3 | 
| 2115009 | drupal 8.0-alpha4 | 
| 2138921 | drupal 8.0-alpha5 | 
| 2140343 | drupal 6.29       | 
| 2140383 | drupal 7.24       | 
| 2142291 | drupal 8.0-alpha6 | 
+---------+-------------------+
13 rows in set (0.05 sec)

Once #2145667: project_release_node_presave() should only parse the version string if the version elements are not already set is fixed, we can repair these release nodes by running this query, finding all the effected release nodes, node_load() them, move the version_minor field into version_patch, and node_save(). We might as well make this a drush command so we can run it again regularly until all the other parts of #2137201 are fixed. However, this script won't actually work until #2145667 is done, so for now, this issue is postponed.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dww’s picture

Assigned: Unassigned » dww
Status: Postponed » Active

All the prereqs for this are fixed, so I'm working on this next. Stay tuned for a patch to add a drupalorg_project_update_N() to fix this.

dww’s picture

Status: Active » Needs review
FileSize
3.38 KB

Pretty heavily tested on http://dww7-drupal.redesign.devdrupal.org
Any objections?

drumm’s picture

Status: Needs review » Reviewed & tested by the community

Looks okay on reading the code. We should be sure to test this one last time on staging as it is deployed.

dww’s picture

Status: Reviewed & tested by the community » Fixed

In IRC drumm pointed out I wasn't wrapping all the tables in the query with {}, so I fixed that locally.
Committed and pushed http://drupalcode.org/project/drupalorg.git/commit/16ba280
Merged into BZR, deployed on staging, tested again, and deployed live.

Confirmed that things are now sane in the core release history feeds:

http://updates.drupal.org/release-history/drupal/7.x
http://updates.drupal.org/release-history/drupal/8.x

Status: Fixed » Closed (fixed)

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

  • Commit 16ba280 on 7.x-3.x, 7.x-3.x-dev by dww:
    [#2145679] Repair version element fields on broken core release nodes.