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

raw source browse invalid link #2564

Closed
inphobia opened this issue Jul 9, 2021 · 2 comments · Fixed by #2567
Closed

raw source browse invalid link #2564

inphobia opened this issue Jul 9, 2021 · 2 comments · Fixed by #2567

Comments

@inphobia
Copy link

inphobia commented Jul 9, 2021

seems only to be an issue on the main page for a module.
example: https://metacpan.org/dist/Dist-Zilla

image

Browse links to https://metacpan.org/dist/Dist-Zilla/source
(raw) links to https://metacpan.org/source?raw=1

i think it should link to https://metacpan.org/dist/Dist-Zilla/source?raw=1
(which then redirects to https://fastapi.metacpan.org/source/RJBS/Dist-Zilla-6.023)

while i'm not familiar with the metacpan-web codebase i had a look around and suspect the issue could be found here:

<li><a href="[% $release_base %]/source"><i class="fa fa-fw fa-folder-open black"></i>Browse</a> (<a href="[% $source_base %]/source?raw=1">raw</a>)</li>

i'm guessing this should be changed from:
<li><a href="[% $release_base %]/source"><i class="fa fa-fw fa-folder-open black"></i>Browse</a> (<a href="[% $source_base %]/source?raw=1">raw</a>)</li>

to:
<li><a href="[% $release_base %]/source"><i class="fa fa-fw fa-folder-open black"></i>Browse</a> (<a href="[% $release_base %]/source?raw=1">raw</a>)</li>
($source_base -> $release_base)

this is only an issue on the main module page, on the pod pages the links (source, source (raw), browse, browse (raw)) all work fine:
https://metacpan.org/pod/Dist::Zilla

image

@inphobia
Copy link
Author

inphobia commented Jul 9, 2021

while investigating further https://metacpan.org/dist/Dist-Zilla/source?raw=1 redirects to https://fastapi.metacpan.org/source/RJBS/Dist-Zilla-6.023 , which does not contain a trailing slash & causes metacpan/metacpan-api#1032

not sure if this is a metacpan-web or metacpan-api thing, mentioning it to be complete.

@inphobia
Copy link
Author

confirmed fixed, thx.

and even more thx for metacpan.org!

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 a pull request may close this issue.

1 participant