Skip to main content

When Good Links Go Bad: How AI Cut Link Verification in Drupal’s Metatag Module from Hours to Minutes

Photo of Sammy Gituko
Sammy Gituko - Software Engineer | Drupal developer
March 4, 2026

At Tag1, we believe in proving AI within our own work before recommending it to clients. This post is part of our AI Applied content series, where team members share real stories of how they're using AI and the insights and lessons they learn along the way. Here, Sammy Gituko, Software Developer, explores how AI supported improvements to the Metatag module by speeding up the discovery, verification, and replacement of broken documentation links across 30+ plugin files from hours to minutes.

A Small Fix That Wasn’t So Simple

My first contribution to the Drupal Metatag module started with what looked like a simple issue: fixing broken external documentation links. The task was logged as Issue #3559765 Fix broken links in the Meta tags section , and at first, it seemed like a quick cleanup job. But the deeper I looked, the more it revealed about the fragility of open source documentation, and how AI can speed up the repetitive parts of technical contribution work while still requiring careful human judgment.

Broken links may not sound exciting, but they highlight a widespread challenge in open source maintenance. Documentation links age fast. Websites vanish. URL structures change without warning. And because the Metatag module contains dozens of plugin files pointing to different sources, even a small fix meant a lot of detail work.

How AI Accelerated the Research Phase

To begin, I scanned the src/Plugin/metatag/Tag/ directory, which contains over 30 plugin files. This was where AI added real value, not by writing code, but by making the background research faster and more structured. I found six that had broken or unreliable links:

  • SetCookie.php: Link to metatags.org was returning 404
  • Rating.php: Link to metatags.org was broken, though the RTA link worked
  • Google.php: Google webmasters link returned 404
  • Expires.php: Link to csgnetwork.com calculator had connection errors
  • Standout.php: Google News documentation was broken (404)
  • NewsKeywords.php: Google News documentation was broken (404)

For each broken link, I needed to verify the issue, find a reliable replacement from an authoritative source, confirm it worked and was stable, then update it in the code without disrupting formatting or introducing linting errors.

Finding Every Link

Checking each file manually would have been tedious. Using AI, I generated efficient grep patterns for discovering URLs across the whole directory, like this suggestion that matched multiple URL styles: https?://|www\. That one line let me identify every external link across 30+ plugin files in minutes.

Verifying What Was Broken

The next challenge was figuring out which links actually worked. Instead of opening them one by one, AI recommended using a simple curl command to automatically test HTTP status codes:

curl -s -o /dev/null -w "%{http_code}" "https://example.com"

This approach let me quickly categorize links as 200 (working), 404 (broken), or 301 (redirects), giving me a precise list of which needed attention.

Finding Better Sources

When replacing links, AI helped search for credible alternatives, suggesting sources like MDN, W3C, IETF, or Google Search Central. It also helped compare multiple options and recommend the best one.

When AI Needed a Human Touch

Despite its efficiency, AI couldn’t make every decision. Some choices depended on contextual understanding, deciding whether a replacement even made sense.

Google News Documentation

Two plugin files, Standout.php and NewsKeywords.php, both referenced Google News documentation that no longer existed. AI surfaced generic help pages, but none were relevant. Since the tags were already marked @deprecated, I chose to remove the links entirely. This was a judgment call informed by understanding the code’s context and the importance of avoiding misleading or obsolete references.

Content Rating (RTA) Documentation

In Rating.php, the existing RTA link technically worked but wasn’t reader-friendly. The AI proposed a few options, but ultimately, I picked Wikipedia’s page on content rating systems. It included the RTA standard, offered better context, and felt more accessible, a human decision about user experience, not just URL accuracy.

What This Taught Me

Several clear themes came out of this contribution:

  • Third-party documentation is fragile. Even long-established sources like metatags.org and csgnetwork.com can disappear or restructure, breaking countless references.
  • Redirects can cause silent problems. A 301 redirect still “works,” but introduces slower load times and unnecessary chains. Direct links are cleaner.
  • AI excels at repetitive verification. Checking and verifying dozens of URLs took minutes instead of hours.
  • Context remains human. AI found replacements but couldn’t know when removing links made more sense or why accessibility might matter more than originality.
  • Authoritative sources reduce maintenance. Linking to MDN, IETF, or W3C means fewer headaches for future maintainers and reviewers.

The Outcome

The final patch replaced or removed all broken documentation links:

Fixed with authoritative replacements:

  • SetCookie: MDN documentation
  • Google: Google Search Central
  • Expires: IETF RFC 1123
  • Rating: Wikipedia

Removed (no suitable or relevant replacements):

  • Standout : Google News documentation removed
  • NewsKeywords: Google News documentation removed

The workflow became smoother, faster, and easier to reproduce. Using AI to handle repetitive validation tasks allowed me to focus my attention on decisions that actually required human reasoning.

A Better Way Forward

This contribution showed how AI can accelerate contribution workflows without replacing the thoughtful judgment that open source development depends on. By blending AI-assisted discovery with context-aware decision-making, contributors can move faster and still produce work that’s accurate, accessible, and maintainable.

Maintaining external documentation links might never be glamorous, but it’s a perfect example of how AI can make quality improvements faster and more sustainable, one verified link at a time.

This post is part of Tag1’s AI Applied content series, where we share how we're using AI inside our own work before bringing it to clients. Our goal is to be transparent about what works, what doesn’t, and what we are still figuring out, so that together, we can build a more practical, responsible path for AI adoption.

Bring practical, proven AI adoption strategies to your organization, let's start a conversation! We'd love to hear from you.

Work With Tag1

Be in Capable Digital Hands

Gain confidence and clarity with expert guidance that turns complex technical decisions into clear, informed choices—without the uncertainty.