-
Notifications
You must be signed in to change notification settings - Fork 259
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
Missing some zip links #739
Comments
Hi @cdeadspine, Thanks for trying it out and glad it worked for you, besides those Ah, yep, here it is. There would have been a reason to exclude compressed archives at some point. WP2Static aims to be overridable/more extensible than the earlier versions, so right below that, you can see: $file_extensions_to_ignore =
apply_filters(
'wp2static_file_extensions_to_ignore',
$file_extensions_to_ignore
); Which exposes a filter you can use to modify that list. You can put something in your theme's functions.php, like: add_filter( 'wp2static_file_extensions_to_ignore', 'cdeadspine_allow_zips', 10, 1 );
function cdeadspine_allow_zips( $extensions ) {
$extension_exclusions_without_zip = somefunctiontotransform( $extensions );
return $extension_exclusions_without_zip;
} I just pseudo-coded that, so you'd need to add some logic to remove that |
Basically, it's a function that has an input (the exclusions) and an output (the modified exclusions) and you add some magic in between to modify the array that WP2Static exposes. |
The options for files to ignore are now in the advanced crawling add-on, and I think we're fine there since advanced options are out-of-scope for the main plugin. Opened elementor/wp2static-addon-advanced-crawling#5 for some further refinement, but closing this since the fix is merged. |
Very nice plugin, I am surprised at how well it works on a very old website, except for one strange exception: 6 .zip file downloads from a single page are not crawled or "cached" or generated or "post processed"
(the .zip links are not present in any of these results)
There are many other downloads such as .pdf and .mov and picture files that are all crawled and in the generated site perfectly
The links to the zips are on a page that requires "login", the given login is the wordpress admin (put into wp2static -> options), and works for other pdf links on the same page.
The generated html that links to the files seems very normal, I don't know why they wouldn't be crawled properly?
I wonder if it is something about compression or the mention of "multiple documents compressed"? Regardless I have to manually download from the running wordpress
/wp-content/uploads/2017/11/Patient-Awareness-Kit.zip
and place it into my static copy, and everything works fine
There are exactly 6 .zip files not crawled, all from the same index.html statically generated
Plugins (i dont see how this could matter because there is just a blatent a-href link to a seemingly static file not being crawled?)
I can not find out from the documentation or internet searches where the WP2static logs files are, there is a bunch of results about "advanced tab -> debug" but I don't see that tab anywhere on my wordpress dashboard with this 7.1.6 version?
I am quite sure that these 6 zip downloads are in fact the only problem. I have done my own crawling of the entire static generation result and I can see all of the internal and external broken links, all of the /wp-json /feed /comments /xmlrpc /wp.me that can be ignored.
My best guess at what to look at is that actually the /wp-content/uploads/2017/11/Patient-Awareness-Kit.zip url is not protected by basic authentication, but the page that links to it did require basic authentication. (However other pdf links on the same page were crawled successfully)
So if it was a WP2static basic authentication problem, perhaps somehow it found the pdf files through another means other than crawling the basic-auth required index.html ? Is there some special file finding functionality other than brute force crawling all pages from the home page through links?
The text was updated successfully, but these errors were encountered: