Support » Plugin: Qtranslate Slug » Removing category base breaks pagination

  • Hello,

    I’m using the latest at the moment version (1.1.18) and I need to remove the /category/ base from the URL ( hxxp://site.com/category/news/ should become hxxp://site.com/news/ ) but for some reason when I go to the second page I receive a 404 error.

    I’ve tried it with every plugin I could find (including Yoast SEO and WP No Category Base) but the result is always the same – the first page works fine but the next ones produce a 404 error.

    The pagination works fine for only one of the languages of one of the categories but that is because the original category slug (added before QTS) is the same as the current slug for that language.

    I tried searching with google but couldn’t find anything useful for this particular problem.

    Unfortunately I can’t provide a link because this is a site in development but the issue can be reproduced quite easily.

    I’ve also tried the plugins mentioned above with QTS disabled and the pagination and category removal were working fine.

    https://wordpress.org/plugins/qtranslate-slug/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter WPBot

    (@wpbot)

    I forgot to mention that I’ve had the same results and without using a plugin to remove the category base, when I just set it to a . from the permalink options – it works fine when QTS is disabled and I get 404s on every page after the first one.

    Plugin Author Pedro Carvalho

    (@pedroghandi)

    WPBot, thanks for using QTS.

    you’re right.

    but unfortunately, i don’t have a solution. all the rewrites are there, even for category-name/page/n .

    i need to dig deeper 🙂

    Thread Starter WPBot

    (@wpbot)

    I think the problem is that the rewrites are set for the original category slug, and not for the slugs that are translated by QTS, but I have no idea where it is in the code or how exactly it can be fixed.

    I’m talking about when a category is created without QTS it gets only one standard for a vanilla WP slug and when a category is created while QTS is active it gets a few translated slugs (one for each language enabled in QTranslate-X) plus the standard WP slug so everything works even when QTS is removed/disabled. And the rewrites are currently set to work with that standard slug, which is always active no matter whether QTS is enabled or not.

    For example I’ve installed a vanilla WP and created a category named Articles with a slug named not-articles. I’ve also installed QTranslte-X and QTS and renamed the default Uncategorized category to News including its slugs plus the Articles slug to articles and articles-de for the German language I’ve activated for the test. I’ve also added a few posts in each category and I’ve installed and activated the WP No Category Base plugin. When I go to hxxp://site.com/news it loads the posts but it returns 404 on the next page. But if I go to hxxp://site.com/uncategorized it not only loads the posts (which probably shouldn’t happen) but also the pagination works.
    It’s the same thing with the Articles category – when I go to hxxp://site.com/articles/page/2/ or hxxp://site.com/articles-de/page/2/ I get a 404, but if I open hxxp://site.com/not-articles/page/2/ everything works (even though it shouldn’t).

    Please read very carefully the long text above because I’ve explained in details what the problem is but English isn’t my native language and I might’ve said something wrong, so let me know if I haven’t explained it right and I’ll try to rephrase it.

    Also, please disregard my previous post about the . in the permalink settings – the pagination works fine (without QTS or for the standard non-translated slug) only with a plugin like WP No Category Base or Yoast SEO.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Removing category base breaks pagination’ is closed to new replies.