mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-04-25 17:16:00 +03:00
[GH-ISSUE #483] Bugfix: docker iframe adds /data/ to url incorrectly #3336
Labels
No labels
expected: maybe someday
expected: next release
expected: release after next
expected: unlikely unless contributed
good first ticket
help wanted
pull-request
scope: all users
scope: windows users
size: easy
size: hard
size: medium
size: medium
status: backlog
status: blocked
status: done
status: idea-phase
status: needs followup
status: wip
status: wontfix
touches: API/CLI/Spec
touches: configuration
touches: data/schema/architecture
touches: dependencies/packaging
touches: docs
touches: js
touches: views/replayers/html/css
why: correctness
why: functionality
why: performance
why: security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ArchiveBox#3336
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @poblabs on GitHub (Sep 24, 2020).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/483
Describe the bug
Using the docker-compose.yml instructions, adding a URL works fine. When accessing that URL I get a 404 within the iframe.
Steps to reproduce
Screenshots or log output
It looks like the iframe is trying to go to
http://server/data/archive/1600957105.659589/site/index.htmlwhen the data folder doesn't exist as a web entity.Browsing to http://server/archive/1600957105.659589/site/index.html works. (note: without the /data/ folder)
How can I get the iframe working correctly?
Software versions
Latest docker-compose.yml
@cdvv7788 commented on GitHub (Sep 24, 2020):
I will give this a check. This may be related to some changes we made to calculate the path to
wget.@poblabs commented on GitHub (Sep 24, 2020):
Also worth noting that clicking this icon here, brings me to this very long incorrect URL.
http://server/archive/1600958844.850607//data/archive/1600958844.850607/site/index.html/@pirate commented on GitHub (Sep 24, 2020):
It's probably a
str(Path(...))that's expanding out to the full path now instead of the old relative path.@cdvv7788 commented on GitHub (Sep 24, 2020):
Yes, that is the issue. I fixed the static index, but it seems this one persists. I will take care of this.
@cdvv7788 commented on GitHub (Sep 25, 2020):
@poblabs https://github.com/pirate/ArchiveBox/pull/486 This should fix the issue.
@poblabs commented on GitHub (Sep 25, 2020):
@cdvv7788 Will I be able to build a new docker image from your
cdvv7788:wget-pathbranch?@cdvv7788 commented on GitHub (Sep 25, 2020):
Yes, it should be possible. If you are getting any issue, please let me know and I will check it.
@poblabs commented on GitHub (Sep 25, 2020):
@cdvv7788 It failed.
docker build . -t archivebox --no-cache@cdvv7788 commented on GitHub (Sep 25, 2020):
Weird. I just tried building it and it didn't fail. The automated tests were able to build it too. Can you check if there are no modified files in your local copy? (git status). It looks like the
package.jsonhas issues.@poblabs commented on GitHub (Sep 25, 2020):
Strange. I downloaded the zip file into a new directory, ran the docker build and it still failed. I'll try from master and merge your changes to see if I can get that to build.
@poblabs commented on GitHub (Sep 25, 2020):
That worked, and the fix worked. Thanks!
@poblabs commented on GitHub (Sep 25, 2020):
Actually, looks like there is still a minor problem.
Clicking this icon adds a trailing slash which messes up the CSS resources. Removing the trailing slash fixes it.
@cdvv7788 commented on GitHub (Sep 25, 2020):
Hmmm...it seems this is unrelated. wget is using relative paths (
src="../www.google.com/images/branding/googlelogo/1x/googlelogo_white_background_color_272x92dp.png")...it fails to interpret it correctly when there is a trailing slash (the../actually points to the current folder instead of moving up 1 level). This is definitely an issue. I will open a new github issue to track it.@poblabs commented on GitHub (Sep 25, 2020):
@cdvv7788 I found it. Remove the trailing slash from this line.
So it looks like:
<a href="/{}/{}" ....@cdvv7788 commented on GitHub (Sep 25, 2020):
Yes, it is added in there. However, a trailing slash should not (ideally) break anything at all. I will remove it from that line, but I will leave https://github.com/pirate/ArchiveBox/issues/487 open to find a more permanent solution. Thanks!