Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
if ($release = drupalorg_drush_find_release_node($project_data)) {
$release_nid = basename($release['release_link']);
$release_data = array(
'nid' => $release_nid,
);
This uses the release link from update status XML, like http://drupal.org/node/1727916. When the release node is aliased, like http://drupal.org/drupal-7.17-release-notes, basename() no longer gets the nid.
Instead, project_package or drupalorg's release packagers should use other data to find the nid in Drupal.org's database. I think the version number string will have to be added to the metadata json.
Comments
Comment #1
dwwWhacky. While it's good to be defensive in the clients in case of exceptions, I think the real solution here is that the release history XML generation should always print the release link as the unaliased node/N link (which can never change and would always work), not honoring path aliasing.
Comment #2
dwwp.s. the release history XML does already include the version string (
<version>
) (and current node title (<name>
)):http://updates.drupal.org/release-history/drupal/7.x
But, I still think it's better to always publish
<release_link>
as node/N and ignore path aliases in here. Not just because of this problem, but because aliases can change and be invalidated, while once you get a nid, it's yours forever. Then we don't have to worry about all the terrible (basically intractable) cache invalidation problems for this data if/when aliases are added/changed.Comment #3
drummComment #4
jonhattanDrush itself is also affected by this. See #1839378: Fatal call to asXML
Comment #5
jonhattandrush pm-updatecode --notes
breaks because of this.It would be very convenient to have a fix --revert to node/nid in
<release_link>
-- before the next drupal 7 release (assuming it will continue to provide an aliased url for the release notes). Otherwise drush should release a new version before the scheduled date (TBD).