Bug #79922

fluid widget paginate - pagination links take no action

Added by René Schäfer over 2 years ago. Updated about 2 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Fluid
Start date:
2017-02-20
Due date:
% Done:

0%

TYPO3 Version:
7
PHP Version:
7.0
Tags:
fluid widget paginate
Complexity:
Is Regression:
No
Sprint Focus:

Description

Hello,

I use the Introduction Package to generate menu of subpages and sub-subpages..

<f:section name="Main">
    <ul class="taxRaw whiteBgShadow">
        <f:render section="Menu" arguments="{menu: menu}"/>
    </ul>
</f:section>

<f:section name="Menu">
    <f:if condition="{menu}">
        <f:for each="{menu}" as="page" iteration="iteration">
            <f:if condition="{page.children}">
                <f:then>
                    <f:render section="Menu" arguments="{menu: page.children}"/>
                </f:then>
                <f:else>
                    <f:render partial="MenuItem" arguments="{page: page, cycle: iteration.cycle, total: iteration.total}"/>
                </f:else>
            </f:if>
        </f:for>
    </f:if>
</f:section>

This works fine. I get a unpaginated list of links with page title, lets say 20 items.

If I now wrap the paginate widget, like:

<f:section name="Main">
    <ul class="taxRaw whiteBgShadow“>
                <f:widget.paginate objects="{menu}" as="paginatedMenu"  configuration="{itemsPerPage: 5, insertAbove: 1, insertBelow: 0, maximumNumberOfLinks: 7 }">
            <f:render section="Menu" arguments="{menu: paginatedMenu}“/>
                </f:widget.paginate>
    </ul>
</f:section>

It generates a correct list of 5 items and above numbered links for pagination, with example href=index.php?id=68&tx__[@widget_0][currentPage]=3&cHash=ba…
BUT if i hit one of that pagination links, it turns me always on same first page.


Related issues

Related to TYPO3 Core - Feature #79430: Make pagination possible without Extbase environment New 2017-01-23
Related to TYPO3 Core - Bug #80176: fluid widget paginate - pagination links take no action Rejected 2017-03-07

History

#1 Updated by Tymoteusz Motylewski over 2 years ago

  • Status changed from New to Needs Feedback

Hi
It might also be an issue with Realurl.
Can you try if disabling realurl solves the issue?

#2 Updated by René Schäfer over 2 years ago

Tymoteusz Motylewski wrote:

Hi
It might also be an issue with Realurl.
Can you try if disabling realurl solves the issue?

Hi Tymoteusz, thank you for your answer. No, there is no realurl installed. The project is made with T3 8.5.1, there is no realurl version yet.

#3 Updated by Riccardo De Contardi over 2 years ago

  • Status changed from Needs Feedback to New

#4 Updated by René Schäfer over 2 years ago

Here I add may missing code of the MenuItem Partial:

<li class="row">
    <h2>
        <f:link.page pageUid="{page.data.uid}">{page.title}</f:link.page>
    </h2>
</li>

I tried the same with a „DatabaseQueryProcessor“ - list of lastUpdated pages in TYPO3 7.6.16 with same result > f:widget.paginate takes no action on generated pagination-links (as mentioned).
Issue added for T3 7.6. https://forge.typo3.org/issues/80176

#5 Updated by Harder, Annette Annette about 2 years ago

Hi everybody,
is there any news about this bug? I would need this fix for my current project.

#6 Updated by Benni Mack about 2 years ago

  • Target version changed from 8 LTS to next-patchlevel

#7 Updated by Kerstin Eitner almost 2 years ago

Hi everybody,
I determined the same behaviour with TYPO3 7.6.20. The objects that are paginated in my case are of type array - so that might be the problem. With objects of type QueryResult everything works fine.

#8 Updated by Vincent Mans almost 2 years ago

This issue remains in 8.7.4. IMO, it's a Must Have because people rely on it by now to resolve long menu listings.

My part of the analysis is a repeat perhaps. The currentPage value is not changed when the link is clicked. It's changed in the uri, but not handled. Example: example.domain/?tx__%5B%40widget_0%5D%5BcurrentPage%5D=4&cHash=3da02e64805654616336277537107b86 and the currentPage is still 1 despite %5BcurrentPage%5D=4.

With this, the offset remains 0. If you hardcode $currentPage = 4 in class PaginateController, then the offset is correct and the list starts with the correct item. So the uri with parameter currentPage is not handled correctly.

I tried to trace this further, but I have not enough knowledge to complete this in reasonable time. Can someone please post a hint here before a patch update arrives (that takes so long, 8.7.4 has just arrived). Or create a patch that we can test. Thanks a lot.

#9 Updated by Vincent Mans almost 2 years ago

By the way:

Paginate/Index.html should have a slight modification. We see the page number "1" still in the paginator when there is more range than items. So I suggest something like this on line 34:

                    <f:if condition="{pagination.displayRangeEnd} > 1">
                        <li class="current">
                            {page.number}
                        </li>
                    </f:if>

#10 Updated by Emile Blume over 1 year ago

  • TYPO3 Version changed from 8 to 7

Is there any progress? Kind of strange that this bug hasn't been solved yet. I have customers depending on it.

#11 Updated by Marieke de Bruin about 1 year ago

The workaround from Sebastian Helzle in https://forge.typo3.org/issues/79430 is working for me in 8.7

#12 Updated by Riccardo De Contardi about 1 year ago

  • Related to Feature #79430: Make pagination possible without Extbase environment added

#13 Updated by Robert Wildling about 1 year ago

I seem to have the same problem now: a list of teaser views that supposed to link to their detail pages via f:link.action get manipulated with. Why is that? IMO there is simply no need to tamper with links in records. The paginator should only create its pagination links, nothing else. Is there a reason for that behaviour?

This happens on 8.7.13, php 7.1.13

#14 Updated by Riccardo De Contardi 3 months ago

  • Related to Bug #80176: fluid widget paginate - pagination links take no action added

#15 Updated by Benni Mack about 2 months ago

  • Target version changed from next-patchlevel to Candidate for patchlevel

Also available in: Atom PDF