Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

main.py cards: get version from abs URL #2541

Closed
wants to merge 1 commit into from

Conversation

adriendupuis
Copy link
Contributor

@adriendupuis adriendupuis commented Nov 13, 2024

Question Answer
JIRA Ticket
Versions
Edition

When generating card link, get the current version from the absolute URL instead of the canonical URL.

The canonical URL seems to always be the "latest" version. So, previously, version was always "latest" even when on another version (like "master" for example), potentially generating a broken link.

For example,

https://doc.ibexa.co/en/master/users/users/ “Update basic user data from CLI” card is a broken link because the target page doesn't exists on latest, only on master.

Checklist

  • Text renders correctly
  • Text has been checked with vale
  • Description metadata is up to date
  • Redirects cover removed/moved pages
  • Code samples are working
  • PHP code samples have been fixed with PHP CS fixer
  • Added link to this PR in relevant JIRA ticket or code PR

The canonical URL seems to always be the "latest" version.
So, previously, version was always "latest" even when on another version (like "master" for example), potentially generating a broken link.
@adriendupuis adriendupuis marked this pull request as draft November 13, 2024 20:16
@adriendupuis
Copy link
Contributor Author

adriendupuis commented Nov 14, 2024

Wrong track

In ibexa/documentation-user#271, I already noticed that current version can't be obtained this way. See ibexa/documentation-user#288 for other tries to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant