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

Default ContentFilter Fixes (0 entries fixes) #118

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

GabrielCoetzee
Copy link

@GabrielCoetzee GabrielCoetzee commented Nov 26, 2024

There's been a few issues picked up regarding this package where people are posting "Scheduled job ran but shows 0 entries".
My team and I ran into the same thing and then I realized why when I looked at the default ContentFilter.

Here's some improvements to the default ContentFilter that hopefully makes sense.

1) The first thing I picked up is, we ran into a case where much of our content could not be cast to IVersionable and the logic here assumes that content is unpublished if it can't be cast to IVersionable which is a dangerous assumption but also tricky, as we can't assume the opposite either.

I added an option in SitemapOptions so the consuming party can decide whether this strict check is necessary (If they decide to use the default ContentFilter)

2) The 2nd thing I picked up is that the IsVisibleOnSite check prohibits this package from working in any sort of headless site by default (If using the default ContentFilter).
In addition to the previous prop, I also added a SiteArchitecture enum which defaults to Mvc, but can be set to headless. This just skips the IsVisibleOnSite check if the site architecture is set to headless by the consuming party of this package.

I hope this makes sense, I'm open to suggestions / adjustments.

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

Successfully merging this pull request may close these issues.

1 participant