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

Respect tx_news:Parameters "timeRestriction" and "timeRestrictionHigh" #177

Closed
kbenyedder opened this issue Aug 7, 2023 · 3 comments
Closed

Comments

@kbenyedder
Copy link
Contributor

kbenyedder commented Aug 7, 2023

Dear team,

I would like to address the issue regarding the news-Indexer in Typo3 [11.5] Ke-Search Extension Version 5.0.2 with php 8.0.

There are two typoscript parameters called "timeRestriction" and "timeRestrictionHeigh" in the news Extension.

When these parameters are set, news articles in the future or past are supposed to be hidden.
However, it seems that the News Indexer does not take these parameters into consideration, resulting in these articles being displayed in the search results, which is not the desired behavior.

I kindly request your assistance in resolving this issue by ensuring that the News Indexer properly considers the timeRestriction parameters and hides the corresponding news articles in the search results.

Thank you for your attention to this matter.

Best regards,
Kamel Ben Yedder

@kbenyedder
Copy link
Contributor Author

Please check hier
https://github.com/tpwd/ke_search/pull/181/commits

@kbenyedder kbenyedder changed the title Issue with News Indexer Parameters Issue with News-Indexer tx_news:Parameters Aug 7, 2023
@kbenyedder
Copy link
Contributor Author

@christianbltr could you please take care of this

@christianbltr christianbltr changed the title Issue with News-Indexer tx_news:Parameters Respect tx_news:Parameters "timeRestriction" and "timeRestrictionHeigh" Aug 25, 2023
@christianbltr christianbltr changed the title Respect tx_news:Parameters "timeRestriction" and "timeRestrictionHeigh" Respect tx_news:Parameters "timeRestriction" and "timeRestrictionHigh" Aug 25, 2023
@christianbltr
Copy link
Member

@kbenyedder

Thank you for pointing to this issue and for the patch proposal.

But from my point of reading the TypoScript configuration for news would not be the best way to configure the behaviour of the indexer. For example it may be possible that you have a page where you want to show news records in a time restricted way (e.g. show only the news from the last 7 days) and on another page you want to show all news (like an archive). If ke_search would take the the time restriction into account it would falsely not index all news shown in the archive.

Also I think it would be in-transparent to use the news TypoScript setting to configure ke_search.

But if that is the desired behaviour in your project, you could easily use a hook for the news indexer to skip the news which don't match the time restriction.

I think such a feature could be useful for ke_search in general, but it should not take the configuration from TypoScript but from the indexer configuration, like the other options.

An idea for the implementation would be:

  • Add Two date fields in the indexer configuration ("timeRestrictionLow", "timeRestrictionHigh")
  • Adopt each indexer to check if the date of an indexed element falls into the time restriction
  • Update documentation
  • Update ke_search_hooks to show how to use this new option

I'm closing this and opened #184 instead. If you are interested in providing a patch in a more general way which does not use TypoScript for configuration please go ahead and I will merge it.

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