pywb icon indicating copy to clipboard operation
pywb copied to clipboard

A fix for GitHub issue #865

Open lasztoth opened this issue 1 year ago • 8 comments

Description

This PR fixes the issue #865. Specifically, it appears that the bug was introduced (perhaps by accident) by commenting out lines 288-289 from responseloader.py. It appears that uncommenting these lines, i.e., returning from the method if there is already a WARC filename and offset for the record, then the self-redirects work correctly. These lines were commented between versions 2.6.9 and 2.7.0b, which corresponds to the issue description. After this bug fix, self-redirects work correctly once again (on a local test system).

Motivation and Context

Solves #865.

Types of changes

  • [x] Replay fix (fixes a replay specific issue)
  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • [ ] My change requires a change to the documentation.
  • [ ] I have updated the documentation accordingly.
  • [ ] I have added or updated tests to cover my changes.
  • [ ] All new and existing tests passed.

lasztoth avatar Aug 22 '24 07:08 lasztoth

I have a vague memory now of this being commented out in relation to the development of the Vue banner UI, but for the life of me can't remember why. Will try to dig back through my notes from that time!

tw4l avatar Aug 27 '24 17:08 tw4l

Ah, I dug back through our internal Discord conversations and remember now! This was our hacky temporary solution at the time to get pywb to populate the calendar from a remote CDX server of form cdx+https://example.com/webarchive/cdx in pywb 2.6.8, as without these lines commented out we'd receive No such file or directory errors because the actual archive files weren't available locally. It likely got committed as part of the Vue banner work by accident, as the PR we ended up merging at the time for what was very large.

Edit: It seems this is still true in latest main, if you want to load an archive from a remote CDX source and actually be able to view the content, it's still necessary to comment out these lines. But there should be a better fix possible here.

tw4l avatar Aug 27 '24 18:08 tw4l

Thanks a lot @tw4l for taking a look at this!

lasztoth avatar Aug 28 '24 06:08 lasztoth

@tw4l are you looking into a fix that addresses the calendar issue you mentioned and 865?

obrienben avatar Sep 05 '24 03:09 obrienben

Hi @lasztoth and @obrienben, I'm having some health issues that have limited my capacity at the moment. I'll be out of the office next week but will try to prioritize this when I return.

tw4l avatar Sep 05 '24 20:09 tw4l

@tw4l hope you're doing better. Is there any update on this PR?

obrienben avatar Feb 18 '25 00:02 obrienben

Hi, thanks @obrienben! This is in scope for the IIPC-funded pywb work, which is due to be delivered end of March, so we will be working on this in the coming weeks. Thanks for your patience!

tw4l avatar Feb 19 '25 16:02 tw4l

Hi, thanks @obrienben! This is in scope for the IIPC-funded pywb work, which is due to be delivered end of March, so we will be working on this in the coming weeks. Thanks for your patience!

Now is end of May ...? @tw4l Hard to fix?

petsva avatar May 26 '25 08:05 petsva

Closing in favor of #959 which includes this fix but as a conditional to avoid breaking for remote CDX/live web (see PR for more details).

ikreymer avatar Oct 03 '25 20:10 ikreymer