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

news record missing from output when using pagination #2601

Open
tntrpsw opened this issue Jan 10, 2025 · 1 comment
Open

news record missing from output when using pagination #2601

tntrpsw opened this issue Jan 10, 2025 · 1 comment

Comments

@tntrpsw
Copy link

tntrpsw commented Jan 10, 2025

Bug Report

Current Behavior
We have the problem that when using the pagination, a single news record is always removed from the output and not beeing displayed.
The removed item is the last news record on the first page. At its place the first record from the second page is displayed. When going to the second page, that record is also displayed.

We have used the default Templates and partials from the "news" extension. Getting the "news" variable within the template and doing a "debug", all records are listed, including the missing record.
But when looping through the "pagination.paginator.paginatedItems" items with the "for" ViewHelper, the missing record is indeed missing.

We have tried to debug the process of the instantiation of the "$paginator" variable within the "NewsController" class:
The news records from "$event->getAssignedValues()['news']" contains the missing record, but after the pagination process is completed, the missing record is also missing here.
We are not using workspaces or any custom domain models that would extend the default "news" model in our installation.

When deactivating the pagination, all records are displayed including the missing one.
We have tried to play around with various settings within the content element (e.g. "offset"), but only with the result, that instead of the missing element, the record coming after is is instead missing.

What we found out is, that the Problem disappears when setting the "archiveRestriction" to "active". That's nice, but the problem is, that within the otherwise missing record there is no archive date set.
So setting "archiveRestriction" to no restrictions let the record disappear, but setting it to "active" shows that record.

We are using news "12.1.0" under TYPO3 12.4.24 (legacy installation; extension "numbered_pagination" not installed) and have also tried to downgrade to news "12.0.0", as well as using the extension "numbered_pagination" but to no avail.

Expected behavior/output
A clear and concise description of what you expected to happen.

Environment

  • TYPO3 version(s): 12.4.24
  • news version: 12.1.0, 12.0.0
  • Is your TYPO3 installation set up with Composer (Composer Mode): no
  • OS: Windows 10

Possible Solution

Additional context

@georgringer
Copy link
Owner

can you check the generated queries or debug it in the newsrepository to find out why there is a wrong query produced?

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