languagetool-org/languagetool · error · PageNotFoundException
No content but redirect found at '" + url + "'
Error message
No content but redirect found at '" + url + "'
What it means
Content guard in WikipediaQuickCheck.checkPage: the page has no direct content but the API returned a redirect, meaning the article lives under a different title; the caller should follow the redirect link given in the message.
Source
Thrown at languagetool-wikipedia/src/main/java/org/languagetool/dev/wikipedia/WikipediaQuickCheck.java:142
}
/**
* @since 2.6
*/
public MarkupAwareWikipediaResult checkPage(URL url, ErrorMarker errorMarker) throws IOException, PageNotFoundException {
validateWikipediaUrl(url);
String xml = getMediaWikiContent(url);
if (xml.length() > maxSizeBytes) {
throw new RuntimeException("Sorry, the content at " + url + " is too big - this process has been limited to " + maxSizeBytes +
" bytes, but the content is " + xml.length() + " bytes");
}
MediaWikiContent wikiContent = getRevisionContent(xml);
String content = wikiContent.getContent();
if (content.trim().isEmpty()) {
throw new PageNotFoundException("No content found at '" + url + "'");
}
if (content.toLowerCase().contains("#redirect")) {
throw new PageNotFoundException("No content but redirect found at '" + url + "'");
}
return checkWikipediaMarkup(url, wikiContent, getLanguage(url), errorMarker);
}
MarkupAwareWikipediaResult checkWikipediaMarkup(URL url, MediaWikiContent wikiContent, Language language, ErrorMarker errorMarker) throws IOException {
SwebleWikipediaTextFilter filter = new SwebleWikipediaTextFilter();
PlainTextMapping mapping = filter.filter(wikiContent.getContent());
MultiThreadedJLanguageTool lt = getLanguageTool(language);
List<AppliedRuleMatch> appliedMatches = new ArrayList<>();
List<RuleMatch> matches;
try {
matches = lt.check(mapping.getPlainText());
} finally {
lt.shutdown();
}
int internalErrors = 0;
for (RuleMatch match : matches) {
SuggestionReplacer replacer = errorMarker != null ? View on GitHub (pinned to 2e990059ce)
Solutions
- Re-run the check against the redirect target URL
- Resolve redirects server-side before calling checkPage
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at languagetool-wikipedia/src/main/java/org/languagetool/dev/wikipedia/WikipediaQuickCheck.java:142 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of languagetool-org/languagetool@2e990059ce (2026-09-06).
Data as JSON: /api/errors/129a51db80164e5b.
Report an issue: GitHub.