-
-
Notifications
You must be signed in to change notification settings - Fork 197
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
Caching breaks proofing of internal links #640
Comments
browser hit "enter" before I was ready; I'm still editing… Edit: done |
I haven't been able to reproduce this. Is it still occurring for you? |
Yes. For now, I am using a workaround to remove all the internal links from the cache before testing. I inserted a step (number 4) that should help in reproducing. I am still investigating myself why this is affecting internal links, specifically. I suspected that it might happen when I change the slug on a post, but I don't think that's it. I am digging now and will post an update if I get one. Edits: I moved the script file, so I fixed that path in the steps to reproduce. I tested this again on my local machine and got the same error. I am thinking through what other machine from which I can test to isolate anything environment-specific, if that's the problem. |
I believe I have narrowed this down to the error being with the internal links that include query parameters. So, for example, when I remove all internal links except the following from {
"/assets/favicons/apple-touch-icon-114x114.png?v=2020-12-10-1": {
"time": "2021-01-01 12:00:22 -0600",
"filenames": [
a,
bunch,
of,
paths,
],
"status": 200,
"message": ""
}
} Note the When I remove that link or change the date to be after the cache cutoff (i.e. still valid in the cache), the error goes away. Doing this for the other internal links that have no query string does not produce the error. |
I still can't reproduce this. Here's my test case. Basically, I:
Everything works as expected. What am I missing? |
Hmm… I will investigate further and let you know. Thanks for the update. |
The next version of HTMLProofer has completely rewritten the cache and I don't believe this is a problem any more. I am going to close this issue out, as I'm just one person and can't maintain both the 3.x and 4.x features. ✌️ 4.x should release within the month. |
The output I'm getting
For SEO purposes, the main error output is:
The command I'm running:
The contents of my
tmp/.htmlproofer/cache.log
I have not been able to isolate the error to a particular link or set of links. I believe that I did not get this error when I ran the script within the specified timeframe but I did after. (As in: I ran the command a bunch on the first day then started getting errors on the third or fourth day after the first run.)
Possible steps to reproduce
git clone https://github.com/CarterPape/moab.news.git
(the project from which I'm working. It has a few large files, so you can just download this.zip
of it instead.)git-lfs
-related password (ifclone
ing), provide GitHub username and a token that solely grants read-only access to public repositories. Revoke the token later if you want; I'm not saving it. This part is just a WIP.bundle install
./scripts/moab.news test
time
attribute on any cached internal link with a query parameter (e.g."/assets/favicons/apple-touch-icon-114x114.png?v=2020-12-10-1"
) intmp/.htmlproofer/cache.log
to be more than two days ago (e.g."time":"2021-01-01 17:14:27 -0600"
). See note below for shortcut../scripts/moab.news test
againAs I mentioned in a comment, I have narrowed the problem down to being with cached internal links that contain query parameters (i.e. ends with
?something=something
, emphasis on?
).So, at step 4 above, you could just run this command to do what I described:
Note that, if you're on MacOS,
sed
is notgnu-sed
, and I don't have the patience to figure out how they're different. I usegsed
from Homebrew.The text was updated successfully, but these errors were encountered: