Mortgage1
Mortgage1

Reputation: 35

Typo3 widget.paginate creates a broken url for next page

Hi guys so I am trying to create an extension that takes a json file and displays images, so far so good but I would like to paginate through the 500+ images, this is where it goes bad.

I am trying to use the widget.paginate in fluid, the images are displayed but when I click on the 'next' link I get a url that does not work http://localhost/work/index.php?id=7&tx_llgcinfinitescroll_message%5B%40widget_0%5D%5BcurrentPage%5D=2

I get a typo3 error - #1518472189 TYPO3\CMS\Core\Error\Http\PageNotFoundException

<f:widget.paginate objects="{imageData}" as="paginatedImages"
                       configuration="{itemsPerPage: 24, insertAbove: 1, insertBelow: 0}">

        <f:for each="{paginatedImages}" as="image" key="i">
            <!-- Assigning Variables -->
            <f:variable name="thumbnail" value="{image.imageData.thumbnail}"/>
            <f:variable name="fullSizeImage" value="{image.imageData.fullSizeImage}"/>
            <f:variable name="imageHeight" value="{image.imageData.imageHeight}"/>
            <f:variable name="label" value="{image.imageData.label}"/>
            <f:variable name="welshLabel" value="{image.imageData.welshLabel}"/>
            <f:variable name="description" value="{image.imageData.description}"/>
            <f:variable name="welshDescription" value="{image.imageData.welshDescription}"/>

            <!-- Displaying Images -->
            <div class="grid__item">
                <div class="hovereffect">
                    <a href="{fullSizeImage}">
                        <img src="{thumbnail}" itemprop="thumbnail" alt="{label}">
                    </a>
                </div>
            </div>
            <f:debug>{_all}</f:debug>
        </f:for>
    </f:widget.paginate>

If someone has any idea what I'm doing wrong please let me know, thanks in advance

Upvotes: 0

Views: 262

Answers (1)

Julian Hofmann
Julian Hofmann

Reputation: 2557

Have you simplified the 'next' link in your post? If not, it's missing a cHash. Combined with [FE][pageNotFoundOnCHashError] =true (default), this will end in a 404.

Upvotes: 1

Related Questions