Skip to content

Fix broken internal xref links in reference docs - #37152

Merged
sbrannen merged 2 commits into
spring-projects:7.0.xfrom
Gabriel-Gerhardt:fix/broken-xref-links
Aug 19, 2026
Merged

Fix broken internal xref links in reference docs#37152
sbrannen merged 2 commits into
spring-projects:7.0.xfrom
Gabriel-Gerhardt:fix/broken-xref-links

Conversation

@Gabriel-Gerhardt

@Gabriel-Gerhardt Gabriel-Gerhardt commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Several xref: links in framework-docs/modules/ROOT/pages point at anchors that don't exist, most likely left over from the 2023 migration to Antora or later content reorganizations. All internal xref: links in the docs module were compared against the anchors actually defined in their target files; these are the ones that don't resolve.

  • testing/resttestclient.adoc: three self-references used hyphenated ids (resttestclient-workflow/-assertj/-json) instead of the dotted ids the file actually defines (resttestclient.workflow/.assertj/.json).
  • web/webflux/config.adoc and web/webmvc/mvc-config/content-negotiation.adoc referenced mvc-ann-requestmapping-suffix-pattern-match, which no longer exists — the section was renamed to mvc-ann-requestmapping-rfd when RFD coverage was added. content-negotiation.adoc had both the stale and current link side by side, so the stale one was dropped.
  • web/webmvc-test.adoc linked to web-reactive.adoc#webflux-test, but that page defines no such anchor; the real target is web/webflux-test.adoc.
  • data-access/transaction/strategies.adoc and core/appendix/xml-custom.adoc referenced appendix anchors with the wrong prefix (missing appendix. in one place, an extra core.appendix. in six others).
  • testing/testcontext-framework/ctx-management/groovy.adoc linked to core/beans/basics.adoc#beans-factory-groovy, but that section now lives in languages/groovy.adoc.
  • core/aop/schema.adoc linked to #aop in xsd-schemas.adoc, which defines the anchor as xsd-schemas-aop.

Docs-only change, no functional code touched.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Aug 19, 2026
@sbrannen sbrannen self-assigned this Aug 19, 2026
@sbrannen sbrannen added type: documentation A documentation task and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Aug 19, 2026
@sbrannen sbrannen added this to the 7.0.10 milestone Aug 19, 2026

@sbrannen sbrannen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Gabriel-Gerhardt,

Good catches, and congratulations on submitting your first PR to the Spring Framework! 👍

Out of curiosity, how did you discover those broken links?

In any case, the build currently fails. So, please make sure you run the build locally (./gradlew antora) before submitting PRs or pushing commits to a PR.

In resttestclient.adoc, it looks like you'll need to include the filenames in addition to the anchors.

For example, xref:testing/resttestclient.adoc#resttestclient.workflow instead of just xref:resttestclient.workflow, and likewise for xref:resttestclient.assertj.

In addition, please base this PR on the 7.0.x branch, so that we can apply it there and forward merge to main. Feel free to "force push" your changes to this PR once you're done.

Cheers,

Sam

@sbrannen sbrannen added the status: waiting-for-feedback We need additional information before we can continue label Aug 19, 2026
Signed-off-by: Gabriel Gerhardt <gabrielgerhardt27@gmail.com>
Signed-off-by: gabrielgerhardt <gabrielgerhardt27@gmail.com>
@Gabriel-Gerhardt

Gabriel-Gerhardt commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

Hi @sbrannen,

Thanks for the review and the warm welcome!

Regarding how I found them, I used an AI-assisted scan to compare every internal xref: link in the docs module against the anchors actually defined in their target files, then verified the mismatches by hand before fixing them.

I've addressed all three points:

  • resttestclient.adoc now uses the full-path form for the self-references, e.g. xref:testing/resttestclient.adoc#resttestclient.workflow and #resttestclient.assertj, matching the pattern already used for #resttestclient.json.
  • Verified ./gradlew antora runs clean locally with no warnings or errors.
  • Force pushed the 2 commits after the rebase.

Let me know if anything else needs adjusting.

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Aug 19, 2026
@sbrannen

Copy link
Copy Markdown
Member

Thanks for the review and the warm welcome!

👍

Regarding how I found them, I used an AI-assisted scan to compare every internal xref: link in the docs module against the anchors actually defined in their target files, then verified the mismatches by hand before fixing them.

Thanks for sharing.

I've addressed all three points:

That looks better now. Thanks.

Let me know if anything else needs adjusting.

Yes, I added a request to rebase on 7.0.x, but you may have missed that since I edited my original comment:

In addition, please base this PR on the 7.0.x branch, so that we can apply it there and forward merge to main. Feel free to "force push" your changes to this PR once you're done.

If you don't have time to do that, I can just manually merge the PR onto 7.0.x, but then GitHub will mark this PR as "closed" instead of "merged". So, it's up to you.

Let me know how you want to proceed.

@sbrannen sbrannen added status: waiting-for-feedback We need additional information before we can continue and removed status: feedback-provided Feedback has been provided labels Aug 19, 2026
@Gabriel-Gerhardt
Gabriel-Gerhardt changed the base branch from main to 7.0.x August 19, 2026 15:41
@Gabriel-Gerhardt

Copy link
Copy Markdown
Contributor Author

Just changed the base branch to 7.0.x as requested, so this should be ready to merge normally now whenever you get a chance. Thanks again for the review!

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Aug 19, 2026
@sbrannen sbrannen removed the status: feedback-provided Feedback has been provided label Aug 19, 2026
@sbrannen
sbrannen merged commit 507406c into spring-projects:7.0.x Aug 19, 2026
5 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Fixed via 507406c

@sbrannen

Copy link
Copy Markdown
Member

This has been merged into 7.0.x and main.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: documentation A documentation task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants