news records disappear after a time without clearing the cache - typo3

I'm struggling with a strange behavior.
I use News 8.3.0 and TYPO3 9.5.18. It is a TYPO3 instance with many micro-sites and its own news, which can also be displayed on other pages, depending on the category.
This works for a while but at some point (a few days) no more news are displayed. (List / detail) If I clear all cache it works again. Is such behavior known? Or do you have a hint for troubleshooting?
The extension eventnews is also used and on the page, the plugin is available twice with the action News-> list. Maybe multiple use of the action on the same site is the problem.
Both list-views use the widget n:widget.paginate

Related

How can I avoid duplicate content with TYPO3 v9 when having a news entry with multiple categories

I am working on a TYPO3 v10 LTS website with integration of the news extension v8.3.0. Many news are assigned to multiple categories and they are displayed on different detail pages according to their assigned categories. Now I would like to define one categories as master and use this category for the generation of canonical links to avoid duplicate content problems. On an older version of the website (TYPO3 v7 LTS) I used the solution explained here: https://www.typo3.net/forum/thematik/zeige/thema/116056/
I'm not so experienced with TYPO3 v9/v10 LTS yet, but I think that there must be a solution with routeEnhancers.
Any hints are welcome.
You need no route enhancer, just use the basic configuration of EXT:news.
one solution would be: for detail-view (show) always use one page. in this way each news will have a unique url. (problem: you can't ´return´ to the former list view with a hard link[1], as you don't know from which list you came)
2nd: configure a show-page with your news-categories: this page will be preferred for detail view (it always will be the first category) and each news will always be shown on this category detail page. (no ´return´ to the original list as above)
[1] you can't use a page as link target, but you can use javascript:history.back()

How to prevent tx_news plugin render single view for arbitrary news records?

I have a page with multiple news plugins. Each plugin should only render news list and single view for a given category. This is accomplished via "Single-view page for news from this category" and the TyposScript setting detailPidDetermination. Furthermore I have plugins with "List of selected items". This all works fine.
Now my problem: I have no clue how that could happen, but Google has now some news twice in the index. Once with the correct path to the single view and once with the path to any other plugin. This leads to duplicate content problems.
So it seems that any news plugin can render the single view for any record. Is there any way to prevent that? Especially when I use the plugin with "List of selected items", I expect it to render list and single view only for those selected records.
TYPO3 8.7
EXT:news 7.3.1
The only optional check is currently for the storage pid which can be enabled with settings.detail.checkPidOfNewsRecord = 1.
If you need further checks you need to use the signalSlot detailAction. However it will be very hard to know on the detail page if this news record is allowed or not as the detail view knows nothing from the list plugin.

tx_news: Detail view always renders the article first viewed

T3 8.7.15 with latest versions of tx_news and realurl. All was running just fine. Out of a sudden the following happens:
Click the link of a news article from a list view and it renders the detail view and displays everything correctly, as expected. When I then go back and click (any) another article it will again display the article I just view previously and will only display this article anymore, no matter which other I article I choose. It is always the first article rendered that is being displayed (until cache is emptied).
The links are correct according to the article chosen, by the way. However always the first viewed article is displayed, no matter what.
Have deactivated realurl but behavior is same. Clearing all caches did not help either.
Related to news and realurl there is a special page in the manual of news: RealURL configuration, the advanced configuration includes also some settings related to chache.
Additional you might have to adjust some general cache-setting.
Another point is that you've to clean the cache of realurl perhaps after having adjusted some settings.
Furthermore there have been some changes related to cache in core and viewhelpers too, I'm just not sure if they apply to news in general or to your individual new-templates:
Remove option cHashIncludePageId from cHash calculation
Make cHash configurable in Fluid Widget Links
Concerning this issue you've to verify your templates if they use any applying viewhelper.
If all hints never help to remove the undesired caching-behavior the simplest workaround is to disable the cache on the news-pages completely till a solution is found. I will update this answer if I find further information. Here is how to disable the page cache for a single page:
Open the page-settings of the page(s) where the news-plugin is resided
Navigate to the tab "Behavior"
Adjust the cache-settings

TYPO3: tx_news: separate pagination between plugins

I'm using TYPO3 7.6 with the latest tx_news release from TER.
I want to show two news plugins at one page: one is configured to show all news from storage folder "A"; the other one is configured to show only the latest record from storage folder "B".
Now, once the first plugin paginates, the second one renders empty content since it tries to paginate as well (which doesn't make sense since it should display only the latest record).
So, my question is: How can I separate the pagination between both plugins?
In TYPO3 7.6 there is no solution to your issue, sorry. Workarounds include adding manual pagination for the second plugin or overriding the second widget with one that forces a different ID.
In TYPO3 8.6+ you can override the ID of each widget which causes the URL scope to change so you can isolate parameters for each widget. More information can be found on https://docs.typo3.org/typo3cms/extensions/core/8.7/Changelog/8.6/Feature-47006-ExtendTheWidgetIdentifierWithCustomString.html
I tweaked the fluid template to totally avoid the pagination in this case (based on "settings.templateLayout"
In the meantime (I don't know whether it was in place three years ago) there is an option Hide the pagination in the news plugin. You will find it in the tab Additional.
So if you place more than one list view on one page, you can disable pagination for all lists, which should not get paginated.

How to manually order Typo3 news articles in the list view?

I am using the news plugin to simulate the classic page content elements but with previews. Now I would like to be able to manually set the order of the articles just as I would in the page module for the standard elements. But there seems to be no such option in the list module. How would I achieve such functionality?
There is an extension that adds a sorting field to tt_news so you can order the news entries in the list view. It has not been maintained for quite some time, but since it works on TCA and FlexForm level, it should still work with never versions. Check it out:
http://typo3.org/extensions/repository/view/mpossnewssorting