Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Main Thread List Pagination

Hello,

I've encountered an issue where the pagination links don't do anything when the user clicks on them, and this is only effected on the main forum thread list. I have disabled all plugins and also switched to the default theme to try and narrow it down. It's a new forum, so we only noticed the issue when we had enough threads to cause the pagination to appear in the first place.

Can anyone help me troubleshoot this?

«1

Comments

  • I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • peregrineperegrine MVP
    edited June 2014

    what happens when you try the link the nameof yourforum/discussions/p2

    maybe you have a routing problem.

    look at your .htaccess, your routes, errors in the console, and your htaccess log if you are using apache, but then again you didn't say that or your version.

    are you using rewrite urls

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Hello Peregrine
    The server is running Apache, yes. We are using Vanilla 2.1.

    Per your suggestion, typing http://ourdomain/forum/discussions/p2 into the browser results in the same behavior, we don't see the 2nd page of discussions.

    Rewrite urls is set to true in Vanilla.

  • peregrineperegrine MVP
    edited June 2014

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • edited June 2014

    Thank you for the suggestions thus far.
    The .htaccess from the root:

    #BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    #END WordPress
    

    The .htaccess from the /forum folder where Vanilla is:

    # Original
    # If you modify this file then change the above line to: # Modified
    <IfModule mod_rewrite.c>
    RewriteEngine On
    # Certain hosts may require the following line.
    # If vanilla is in a subfolder then you need to specify it after the /. 
    # (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum)
    # RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L]
    </IfModule>
    

    With that said, seems a bit obvious what the problem is, but I will wait for your confirmation.

    Thank you.

  • When you have RewriteUrl TRUE you also need to uncomment the RewriteBase in the htaccess file change yours to this

    # Modified
    # If you modify this file then change the above line to: # Modified
    <IfModule mod_rewrite.c>
    RewriteEngine On
    # Certain hosts may require the following line.
    # If vanilla is in a subfolder then you need to specify it after the /. 
    # (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum)
     RewriteBase /forum
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L]
    </IfModule>
    
  • Thank you.
    I changed the rewritebase with no effect on the pagination.

  • it could then be a php mysql problem... do you have Q&A plugin enabled ?

  • peregrineperegrine MVP
    edited June 2014

    it shouldn't have anything to do with mysql or php.

    1 - describe where the forum is located. which folder,
    2 - post you .htaccess from the folder wihere the vanilla forum is located.
    3. post your config.php with passwords and private information deleted.
    4. download a zip of vanilla, and recopt ALL files over to your new form folder (wherever it is located.
    5. make sure index.php is updated from the core and is unchanged from core software.

    1. http://vanillaforums.org/get/vanilla-core-2.1

    I don't think you followed the instructions in the comment above.
    and go through these steps

    http://vanillaforums.org/discussion/comment/199091/#Comment_199091

    all the information pertains to the one you want to work, don't care about any other folders or other installations that do work.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • LincLinc Admin
    edited June 2014

    Go to /dba/counts and run it.

    ("Recalculate Category.CountDiscussions" is the one you actually need).

    Vanilla cheats on its total discussion count by adding the per-category totals. Your first category shows 5 discussions but there is only 1. That is tricking Vanilla into adding a second page you don't need. It probably got out of sync from deleting spam or moving things around.

  • So does this mean it is a php MySQL issue ? The reason I said that is becAuse my research pointed to that as the possible cause :)

  • edited June 2014

    Thank you @Peregrine.

    Items from your "Mysterious issues" link:

    1. Default theme - no change
    2. Plugins 1 by 1 and all disabled - no change
    3. Core files replacement - Not yet.

    From your most recent comment above:

    1. /home/accountnamewithhost/public_html/forum

    2. Here it is now with changes mentioned by @vrijvlinder‌

    # Modified # If you modify this file then change the above line to: # Modified <IfModule mod_rewrite.c> RewriteEngine On # Certain hosts may require the following line. # If vanilla is in a subfolder then you need to specify it after the /. # (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum) RewriteBase /forum RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L] </IfModule>

    I will consult with @MikQuattro‌ in regards to posting the config.php

    Thank you for your continued assistance.

  • perhaps you might want to try lincolns response first, which may do the trick.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • edited June 2014

    Yes, thank you. I did do what @Linc described with no change :(

    There are a total of 44 discussions (if you are an admin) and even if we set the number of displayed discussions to 10, there is no change in behavior.

  • LincLinc Admin

    I did a little more digging on their site. All of their htaccess stuff works flawlessly for single-view discussions, profiles, et. al. This is only effecting their /discussions, and it's not just pagination - no method at all in the discussions controller can be accessed (like /discussions/table or /discussions/unread or /discussions/bookmarked - even the MeModule dropdown is borked for bookmarks). It always sends you to page 1 of the discussions index, and always sets the canonical URL to /discussions.

    My guess? Something on that Apache setup is programmed to eat URLs for "discussions" and it's chopping off the rest before it ever gets to Vanilla.

  • Strange. We should be on a default Apache install (that I think most hosts use? maybe there is no such thing). Would anyone have any guidance on an Apache setting to start with?

  • peregrineperegrine MVP
    edited June 2014

    maybe it is apache as they say.

    it still seems worth doing this http://vanillaforums.org/discussion/comment/210596/#Comment_210596

    I'll just drop out of this discussion until then, otherwise I'm just adding noise.

    look at your phpinfo and you might want to post that info.

    you can get that thru versioncheck plugin or create your own phpinfo file.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • I don't understand, are you referring to the 2 items in your list that I did not do?

  • peregrineperegrine MVP
    edited June 2014

    you re-copy core source code . post config.php minus passwords.

    yes as well as the phpinfo stuff.

    and verify permissions and ownership on all folders.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • peregrineperegrine MVP
    edited June 2014

    @vrijvlinder said:
    So does this mean it is a php MySQL issue ? The reason I said that is becAuse my research pointed to that as the possible cause :)

    you could be right as well. we won't know till they post all the specifics on setup and re-copy ALL the source files to their forum folder.

    versions, os's, configs, php versions. sql versions, etc. etc. all pretty much provided in phpinfo and config.php and apache stuff.

    otherwise we're just hunting in the dark for el dorado.os or the loch ness monster.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Sign In or Register to comment.