Skip to content
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

additional URLs don't work #197

Open
joyously opened this issue Sep 29, 2022 · 3 comments
Open

additional URLs don't work #197

joyously opened this issue Sep 29, 2022 · 3 comments

Comments

@joyously
Copy link
Contributor

https://github.com/leonstafford/static-html-output/blob/10cf1af363a07c90d1bec426f7db99f40cadfff9/src/Exporter.php#L36-L74

This code gets the additional URLs into the $inclusion_candidates variable, which is then never used. The code gets the Exclusions into the $inclusions variable (why?) and then the loop duplicates any entries that are in the CrawlLog. Then those exclusions (with duplicates) are added to the CrawlLog and CrawlQueue.

What is supposed to be happening here?

@joyously
Copy link
Contributor Author

I changed lines 62 and 64 like this, and it seems to work.

    //        $exclusions = Exclusions::getAll();

            foreach ( $inclusion_cadidates as $inclusion ) {

I'm not sure if something was supposed to be done with the exclusions.

@leonstafford
Copy link
Contributor

Thanks @joyously!

Definitely looks like an issue with the inclusions, but perhaps commenting out that Exclusions line will have some adverse effects.

May need a bit more work to ensure that both exclusions and inclusions work when set (ie, excluding a whole dir, then including a specific path from within that dir - IIRC, that's why intention was to run exclusions before inclusions).

@joyously
Copy link
Contributor Author

joyously commented Oct 2, 2022

perhaps commenting out that Exclusions line will have some adverse effects.

Yes, well it used to say $inclusions = Exclusions::getAll(); and that just didn't seem correct. So, once I changed it to use the $exclusions variable, I could see that it was only adding to the log and queue, which shouldn't happen for exclusions, so I commented it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants