We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2042
    • 20 Posts
    Hi Fellas..

    Hopefully one of you can help me with my problem.
    First of all i want to explain it:
    The Snippet "works" i get the list of articles that i want, and they are also limited by the value i decided to use.
    The Pagination is also correctly shown.

    Now the problem is, if i click on one of the links in the Pagination the link in the adress bar changes (f.e.: ?page=2) but the list doesn't. So everytime i click on a pagination link the same, in my case 2 items are shown. (Page reload is performed)

    My Snippet Call looks like:
     <ul class="listUl">
                [[!getPage?
                    &element=`getResources`
                    &tpl=`listItem`
                    &limit=`2`
                    &includeContent=`1`
                    &includeTVs=`1` 
                    &processTVs=`1`
                    &tvPrefix=``
                    &parents=`[[*id]]` 
                    &sortby=`[[*menuindex]]`  
                    &sortdir=`ASC`  
                    &hideContainers=`1`         
                  ]]
            </ul>
            
            <div class="paging">
               <ul class="pageList" style="height:30px; border:1px solid red;">[[!+page.nav]]</ul> 
            </div>


    Any ideas what this strange behavior could be?

    Regards
    M.
      • 22303 MODX Staff
      • 10,725 Posts
      Might be the incorrect sortby value. That should just be the string 'menuindex', not the tag for the current Resource's menuindex value, which you have used.
        • 2042
        • 20 Posts
        Hi got rid of the Error!

        The Problem was Babel, especially the one .htaccess entry...

        Old Code:
        # redirect all other requests to /en/* and /de/*
        # to index.php and set the cultureKey parameter
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(en|de)?/?(.*)$ index.php?cultureKey=$1&q=$2
        


        New Code:
        # redirect all other requests to /en/* and /de/*
        # to index.php and set the cultureKey parameter
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(en|de)?/?(.*)$ index.php?cultureKey=$1&q=$2 [L,QSA]
        


        The [L,QSA] was missing in the line RewriteRule ^(en|de)?/?(.*)$ index.php?cultureKey=$1&q=$2 ...

        Regards M.