Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Pagination Issue in Article Grid #8225

@MatrixMediaSrl

Description

@MatrixMediaSrl

Hey there! I'm developing a website on Sulu 3.0-dev, i'm encountering a pagination problem in the articles grid. I have set "max_per_page" to 12, and there are 14 articles in total, so two pages should be generated. However, on page 1, the "hasNextPage" value is "null". Despite this, I can access and view page 2 correctly via the link. Where might the issue lie?
I've referred to this section of the documentation: https://docs.sulu.io/en/2.6/reference/content-types/smart_content.html#return-value

Image

this is the config of my file in news.xml

<property name="articles" type="smart_content" visibleCondition="'ROLE_SULU_ADMIN' in __user.roles">
            <params>
                <param name="provider" value="articles"/>
                <param name="category_root" value="articoli"/>

                <param name="max_per_page" value="12"/>

                <param name="properties" type="collection">
                    <param name="date" value="object.workflowPublished" />
                    <param name="title" value="title"/>
                    <param name="url" value="url"/>
                    <param name="description_intro" value="description_intro"/>
                    <param name="image_intro" value="image_intro"/>
                    <param name="categories" value="excerpt.categories"/>
                    <param name="locale" value="__locale"/>
<!--                    <param name="workflowPublished" value="workflowPublished"/>-->
                </param>
            </params>
        </property>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions