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

Publishing a page generates a job which ignores urlsToCache function #98

Open
elkebe opened this issue Nov 21, 2018 · 3 comments
Open

Comments

@elkebe
Copy link

elkebe commented Nov 21, 2018

Setting up

public function urlsToCache()
    {
		return [];
    }

via specific page classes or via an extension works for SilverStripe-StaticPublishQueue-Task-StaticCacheFullBuildTask, but not for jobs queued due to publishing specific pages. Eg. if you want to exclude a UserDefinedForm page from being cached, as soon as it is published it is still added to the queue.

@dhensby
Copy link
Contributor

dhensby commented May 20, 2021

interesting, this could still be a bug?

@lars-lemon8
Copy link
Contributor

What I'm noticing in the latest version is that after you publish an excluded page, it does create a new generate static page job, but it contains no publishable urls. So it does not publish excluded page.

See this screenshot:
image

This still is a bug though -> the entire job should not be created.

@elkebe
Copy link
Author

elkebe commented Apr 17, 2024

This is happening in 5.3.0

Pages that were previously excluded (via urlsToCache) appear to be added back in to the full cache build job once a page has been edited and made live in the CMS. There then seems to be no way to remove the page again and it in turn creates a memory timeout as it results in passing null to str_replace.

[2024-04-17 15:52:47][INFO] [1;31mERROR [Deprecated]: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated
IN GET dev/tasks/ProcessJobQueueTask
[0m[31mLine 121 in /Users/ebraunelwert/Sites/nzmgaSS4/vendor/silverstripe/staticpublishqueue/src/Publisher.php

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

No branches or pull requests

4 participants