• My main blog page, https://amylu-riley.com/blog/ loads and displays fine, but when I click the “2”, “3”, or “Next” at the bottom of that page, each of those returns a 404 error for the following pages:

    https://amylu-riley.com/blog/page/2/
    https://amylu-riley.com/blog/page/3/

    My hosting company (SiteGround) says the problem is not with them/hosting.

    I have updated my WP version, all plugins, and the Author theme, and that didn’t help.

    I tried going to Settings > Permalinks and doing a SAVE there.

    I have also tried going to Settings > Permalinks and changing it to PLAIN, saving that; and then changing it back to CUSTOM STRUCTURE and saving that. That didn’t help.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 15 total)
  • Theme Author Ben Sibley

    (@bensibley)

    Hi AmyLu,

    Thanks for getting in touch.

    I don’t think this error is coming from the Author theme, but I have another debugging step for you to try.

    Please try temporarily deactivating all of the plugins on your site. Once they’re deactivated, visit the Permalinks menu and click the Save button again. Then visit the blog pages and check if they load correctly. If the pages load, you can reactivate each plugin one-by-one until the error reappears and then we’ll know which plugin is causing the conflict.

    You can use the “Bulk Actions” dropdown in the Plugins page to deactivate all of the plugins at once. Also, plugins don’t delete any settings when you deactivate them, so you can safely reactivate them without affecting your website in any way.

    Thread Starter pray4thenations

    (@pray4thenations)

    Ben,

    1. I temporarily deactivated all of the plugins on the site.
    2. Once all of the plugins were deactivated, I visited the Permalinks menu and clicked the Save button.
    3. I then visited the blog pages but they still did not load correctly (exactly same problem as before).

    Theme Author Ben Sibley

    (@bensibley)

    Thanks for trying that.

    Please try installing this plugin and see if it helps: https://www.ads-software.com/plugins/category-pagination-fix/

    We’ve ruled out the hosting, the theme, and plugins, so the last thing it could be is a conflict with WordPress itself. The plugin linked to above is made to fix a permalink issue in WP which I believe is the same thing affecting your site.

    Thread Starter pray4thenations

    (@pray4thenations)

    Ben,

    I installed the plugin you specified. It did not fix the problem.

    Now, instead of getting a 404 error when I go to https://amylu-riley.com/blog/page/2/, it gives the following “fatal error” message:

    Fatal error: Uncaught Error: Call to undefined function split() in /home/customer/www/amylu-riley.com/public_html/wp-content/plugins/category-pagination-fix/category-pagefix.php:39 Stack trace: #0 /home/customer/www/amylu-riley.com/public_html/wp-includes/class-wp-hook.php(288): remove_page_from_query_string(Array) #1 /home/customer/www/amylu-riley.com/public_html/wp-includes/plugin.php(206): WP_Hook->apply_filters(Array, Array) #2 /home/customer/www/amylu-riley.com/public_html/wp-includes/class-wp.php(378): apply_filters(‘request’, Array) #3 /home/customer/www/amylu-riley.com/public_html/wp-includes/class-wp.php(729): WP->parse_request(”) #4 /home/customer/www/amylu-riley.com/public_html/wp-includes/functions.php(1255): WP->main(”) #5 /home/customer/www/amylu-riley.com/public_html/wp-blog-header.php(16): wp() #6 /home/customer/www/amylu-riley.com/public_html/index.php(17): require(‘/home/customer/…’) #7 {main} thrown in /home/customer/www/amylu-riley.com/public_html/wp-content/plugins/category-pagination-fix/category-pagefix.php on line 39

    Theme Author Ben Sibley

    (@bensibley)

    Got it.

    How long have you been using the custom permalink structure? Did it work in the past?

    Besides using the “Post name” structure or another predefined one, the last thing I can think of is to visit the Updates menu and reinstall WordPress in case there was some sort of corruption during the last update process: https://share.getcloudapp.com/NQuvgm8b

    Thread Starter pray4thenations

    (@pray4thenations)

    I’ve used that custom permalink structure for a long time, months or years. This is the first time I’ve ever seen a problem with it.

    I tried applying the “post name” structure in Settings > Permalinks, and that made the main blog page (amylu-riley.com/blog/) ALSO return a 404 error (which it previously had not been), so I put it back to the Custom permalink structure.

    I reinstalled WordPress.

    Still getting the fatal error when I go to https://amylu-riley.com/blog/page/2/:

    Fatal error: Uncaught Error: Call to undefined function split() in /home/customer/www/amylu-riley.com/public_html/wp-content/plugins/category-pagination-fix/category-pagefix.php:39 Stack trace: #0 /home/customer/www/amylu-riley.com/public_html/wp-includes/class-wp-hook.php(288): remove_page_from_query_string(Array) #1 /home/customer/www/amylu-riley.com/public_html/wp-includes/plugin.php(206): WP_Hook->apply_filters(Array, Array) #2 /home/customer/www/amylu-riley.com/public_html/wp-includes/class-wp.php(378): apply_filters(‘request’, Array) #3 /home/customer/www/amylu-riley.com/public_html/wp-includes/class-wp.php(729): WP->parse_request(”) #4 /home/customer/www/amylu-riley.com/public_html/wp-includes/functions.php(1255): WP->main(”) #5 /home/customer/www/amylu-riley.com/public_html/wp-blog-header.php(16): wp() #6 /home/customer/www/amylu-riley.com/public_html/index.php(17): require(‘/home/customer/…’) #7 {main} thrown in /home/customer/www/amylu-riley.com/public_html/wp-content/plugins/category-pagination-fix/category-pagefix.php on line 39

    I have not yet uninstalled the category pagination fix plugin.

    Theme Author Ben Sibley

    (@bensibley)

    Okay you can uninstall the category pagination fix plugin since it looks like that is not going to help.

    Saving the permalinks should rewrite the .htaccess file, but maybe this is not the case for some reason. Try connecting to your site via FTP and locate the .htaccess file. It will be inside the root “wordpress” folder. Then replace the .htaccess file’s contents with the following code:

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

    This code is taken from the recommended .htaccess file WP shares here: https://www.ads-software.com/support/article/htaccess/

    Thread Starter pray4thenations

    (@pray4thenations)

    Ben,

    I uninstalled the category pagination fix plugin.

    I replaced the .htaccess file’s contents with the code you provided. The site still had the exact same problem of 404 errors on https://amylu-riley.com/blog/page/2/ and https://amylu-riley.com/blog/page/3/

    So I put the original .htaccess file contents back.

    Theme Author Ben Sibley

    (@bensibley)

    I’m sorry I just can’t understand what the underlying issue is after each of these tests. Maybe there is something happening “under the hood” with WP because of the category’s name being “blog,” but it’s very odd for this error to persist after all of these updates.

    I hate to leave this unsolved, but I think it may be best to reach out to the hosting company again to make sure they have things configured correctly.

    Thread Starter pray4thenations

    (@pray4thenations)

    Ben,

    As you suggested, I checked with the hosting company again. Their response is below.

    I don’t want to try to fix this outstanding by reverting to a site backup, since I have made so many micro changes to so many pages recently; it would be easier to rebuild the blog. You mentioned the possibility of a WordPress issue with the category’s name being “blog.” I wonder if you could suggest a workaround for that potential issue; for example:
    1. Is there another way to structure the blog within the Author theme that avoids using the category name “blog” (and would still allow the word “blog” to show up in the main navigation menu, that would navigate to the blog main landing page).
    2. Is there another theme other than Author theme that offers a blog landing page and individual detail pages for individual blog entries that doesn’t have this WordPress issue with the category name?

    I would appreciate your suggestions. Thank you for all your help with this.

    Hosting company response:
    “I looked into the issue in detail but to no avail. Everything on the hosting end is set up as it should be. Your site has proper .htaccess file (ea RewriteBase), the posts exist and are accessible individually and the permalinks have been set properly.

    Usually, those URLs and pages are controlled by the WordPress Permalinks but even after resetting them the second and third pages don’t want to show up properly.

    This suggests some underlying application-related issue.”

    I’ve been following this problem with intense interest, and I’ve also seen something about this issue *somewhere* on the web in the last year: somewhere being the key word here, (I know about it because I’m coding my own theme for fun.)

    The link below isn’t the one I read in depth, and I actually think that it was on the WordPress site itself, but it does go into depth about the problem being described.

    https://wordpress.stackexchange.com/questions/209693/wordpress-page-2-404-pagination-problem-what-to-do

    The key info I’ve taken from this is — [Flush the database Cache].
    In the back of my mind I also remember someone suggesting on the WordPress site that re-activating an official theme will do just that

    Plan of attack .. find the theme “twenty — (the lowest you can find)”, 2011 is good, and then reactivate it. Been there, done that; and I have to admit that the entire process is quite painful; especially in resetting your menus, but at the same time the theme also resets the databases links. Run 2011 for a short while to resettle your database in place whilst also checking that the pagination is working.
    – If it is, then reinstall a clean version of ‘Author’ again.

    All of the above might not work, (and I’ve never had this particular problem), but it does exist out there in the WordPress community.

    Hope it helps, ..

    Theme Author Ben Sibley

    (@bensibley)

    Let’s try the first option.

    Create a new page on your site and title it “Blog.” You don’t need to add any content to it. Then visit the Reading settings menu (Settings > Reading) and use the first option there to select the “Blog” page you just published as your “Posts page” -> https://share.getcloudapp.com/OAuLJRAj. Based on your site, it looks like you already have the homepage set there.

    Lastly, you can add the new Blog page to the menu. Now visitors will be able to click on the “Blog” menu item and they’ll find all of your posts listed.

    Thread Starter pray4thenations

    (@pray4thenations)

    Ben,

    Thank you so much. I followed the steps you outlined in the previous comment and the blog functionality seems to be working perfectly now at https://amylu-riley.com/blog

    Thank you! I appreciate your perseverance and kindness in helping me with this!

    Thread Starter pray4thenations

    (@pray4thenations)

    Also wanted to add a note to Mrs.JessicaSimpson who commented above on the thread: Thank you for your suggestions. I didn’t end up trying them, but it was kind of you to comment.

    Theme Author Ben Sibley

    (@bensibley)

    Phew! So glad to hear that last one worked! Glad I could help out ??

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Blog pages 2 and 3 give 404 error’ is closed to new replies.