Page MenuHomeSoftware Heritage

misc/iframe: Fix archive link when there is no snapshot context
ClosedPublic

Authored by anlambert on Wed, Nov 24, 11:40 AM.

Details

Summary

When the input SWHID to browse in an iframe does not have any snapshot
related qualifiers, the generated link to browse the object in the
main archive website was invalid and was leading to HTTP errors.

For instance, in that directory view, clicking on the View in the archive link leads to a 404 error.

Diff Detail

Repository
rDWAPPS Web applications
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build has FAILED

Patch application report for D6681 (id=24273)

Rebasing onto 2a646e0e19...

Current branch diff-target is up to date.
Changes applied before test
commit 20a9d185592917d1092a86df295352ef2d000957
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Wed Nov 24 11:35:10 2021 +0100

    misc/iframe: Fix archive link when there is no snapshot context
    
    When the input SWHID to browse in an iframe does not have any snapshot
    related qualifiers, the generated link to browse the object in the
    main archive website was invalid and was leading to HTTP errors.

Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1243/
See console output for more information: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1243/console

Harbormaster returned this revision to the author for changes because remote builds failed.Wed, Nov 24, 11:59 AM
Harbormaster failed remote builds in B25148: Diff 24273!

Build is green

Patch application report for D6681 (id=24273)

Rebasing onto 2a646e0e19...

Current branch diff-target is up to date.
Changes applied before test
commit 20a9d185592917d1092a86df295352ef2d000957
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Wed Nov 24 11:35:10 2021 +0100

    misc/iframe: Fix archive link when there is no snapshot context
    
    When the input SWHID to browse in an iframe does not have any snapshot
    related qualifiers, the generated link to browse the object in the
    main archive website was invalid and was leading to HTTP errors.

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1244/ for more details.

This revision is now accepted and ready to land.Wed, Nov 24, 3:05 PM