5

The site drupalcontrib.org, used in almost 800 posts (and 70 posts on Stack Overflow) is now used for selling steroids in the United Kingdom. From a quick search, it looks like some (but not all) of the content is hosted at https://api.drupal.org/, often in a slightly different way. It's also mentioned on the Drupal forum.

For example, the link in this post, http://drupalcontrib.org/api/drupal/contributions!views!docs!views.api.php/function/hook_views_pre_render/7, seems now to be at https://api.drupal.org/api/drupal/core%21modules%21views%21views.api.php/function/hook_views_pre_render/9.3.x (and does not even exist for version 7).

There are a couple of options to replace these links:

  • Staff members have a script which can be used to mass-update links without bumping the question; the edit is attributed to the Community user. All HTTP links to Stack Exchange sites have been rewritten to HTTPS in this way. The downside is that this only can do a simple find & replace, e.g. if all content would now be hosted on drupalcontrib.com, with the same URL structure.

  • Users can manually update links. This will bump questions to the homepage, so it needs to be done in moderation. The upside is that other things in the post can be improved as well; the downside is that it takes a lot of effort.

  • I have a Java-based script that can do more advanced URL rewrites than the one used by staff. It can also scrape websites (e.g. search results pages) to find the right link. If that is not available, it can also query the Wayback Machine for snapshots. It will also fix other broken links in the post, if any. The edits suggested by the script also bump posts, but they need to be reviewed in the Suggested Edits queue.

Here is a list of replacements the script would make (yes, that link might be broken in the future, but it's too large to fit in a Stack Exchange post ...) There are thirty URLs for which no snapshot was found; these are listed here.

2
  • Except for those links that are available for the projects listed on https://api.drupal.org/api/projects, a Wayback Machine link is probably preferable. The only difficult part is probably checking which pages are available on https://api.drupal.org.
    – apaderno Mod
    Jul 18, 2022 at 10:45
  • For example, http://drupalcontrib.org/api/drupal/contributions!views!docs!views.api.php/function/hook_views_pre_render/7 should be replaced with https://api.drupal.org/api/views/views.api.php/function/hook_views_pre_render/7.x-3.x, but a link that points to a documentation page for a different branch would not have a matching page in api.drupal.org.
    – apaderno Mod
    Jul 18, 2022 at 10:48

1 Answer 1

2

DrupalContrib was the equivalent of https://api.drupal.org/ for user contributed modules. That is why your example link does not have a match. In Drupal 7 it was a contrib module, and in Drupal 8+ is is a core module.

Because of the complexities of the the Drupal ecosystem, between contrib/core and supported/non-supported versions of core, I suggest rewriting all of the URLs to point to https://www.drupal.org/docs/contributed-modules

This is not ideal, as there isn't a 1-to-1, but I think the end-user impact will be low.

1
  • api.drupal.org contains also the documentation for four contributed projects, which are listed in api.drupal.org/api/projects. For the other projects, there isn't another site that could be used.
    – apaderno Mod
    Jul 13, 2022 at 14:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .