This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 10 replies, has 2 voices.

Last updated by Alejandro 5 months, 3 weeks ago.

Assigned support staff: Alejandro.

Author Posts
April 29, 2019 at 9:53 am #3701823

stevenS-13

Projects page 8 not found.
And there are more pages but giving error after page 7 because of wpml.

till page 7 its working fine on both the languages.

I even changed the themes, but still its not working.
And its due to the WPML

As soon I deactivated the wpml that paginations works

Pagination is not working after 7th page.
Till 7th page its working fine.

Please see this screenshot - hidden link
There are total of 128 published posts in english language.
And post per page set as = 17 posts per page. - hidden link
(though there are total of 18 showing in the front end, but 1 is static in each.)

I am facing this issue on both the languages (english and netherlands), till page 7th its working fine, and after page 7th giving not found error.

I also changed the post per page limit to 10, but still the error remains the same.
After page 7th its giving error. No matter about posts per page limit., it giving error after page 7th.

And when I deactivate wpml that error is gone, and pagination works fine.

Please see this screenshot related to the wpml versions - hidden link -
WPML Version - WPML Multilingual CMS - 4.2.4.1
Wordpress version - WordPress 5.1.1

April 29, 2019 at 10:37 am #3702175

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

Hello,

unfrotunately i lost connection with you so i transformed the chat into a ticket.

please upload the theme to this sandbox site and then import your projects in here (using the WordPress importer/exporter tool):

hidden link

I'll try to see if the problem happens here as well and see if i can find the source of the problem.

Let me know when you do and if you want you can open another chat and ask for me, i'll gladly continue help you troubleshoot this issue.

Thanks.

April 29, 2019 at 11:12 am #3702553

stevenS-13

Hello,
I've uploaded theme, projects, and plugins required to make the project page work.
hidden link

Here pagination is working.
Please check and let me know the issue.

On my server - when I deactivates wpml that pagination stuff works, and as soon I activate it again, pagination stop working.

April 29, 2019 at 1:10 pm #3703581

stevenS-13

Hello, As you mentioned that the problem was with the worth the read plugin and you de-activated that on the site., but still that error persists. And I activate that plugin again.

April 30, 2019 at 10:44 am #3710393

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

Hello,

The worth the read plugin was throwing an error but you're right it wasn't related to this problem.

I noticed that the plugin that handles the pagination on your site is called wp-navi which i totally missed on the live site (i was actually looking for it and didn't find it)

i installed WPML, added the same languages you have on the production site, and tried accessing the different pages (including pages 8,9,10) and i couldn't get any issue.

I proceeded to duplicate them all, just to see if the problem happened while there were translated pages and nothing, i couldn't check the problem there either.

Can you please check and see if there's something else that could be done for the problem to appear?

Thanks.

April 30, 2019 at 11:14 am #3710565

stevenS-13

I think its better if you could take backup of the whole site through duplicator and install on your test environment.
And see what causing the issue.

When I tested on my local server & live site - WPML plugin was causing the issue.
Deactivating not gives pagination error, and as soon I activate that plugin again - pagination stops working after 7th page

April 30, 2019 at 3:08 pm #3712641

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

My next message will be private and will have the instructions to migrate your site into one of our staging server, please let me know when it's already migrated.

Regards.

May 1, 2019 at 5:20 am #3716059

stevenS-13

Hello,
Site successfully migrated here - hidden link

Please do test and try to fix out the issue.

Thanks

May 2, 2019 at 2:42 pm #3725739

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

Hello,

It appears the problem is not the 8th page throwing a 404 error but something in your theme adding a new page link in the pagination plugin (wp-navi), did you add any custom code to your theme for the pagination integration? i noticed the count for each page should 20 posts at most, you have 127 pages and that means that 7 pages should be enough for that, however it seems that something's adding an 8th page and that only happens when your theme is active.

It looks like it's a custom theme so that's why i believe that maybe something was added, maybe in the archive template, that is handling the pagination.

Can you check and let me know?

May 3, 2019 at 5:09 am #3730873

stevenS-13

Hello, total 17 posts per page is showing on the page now. (And 1 is the static for each page though).
So by this rule - 8th page must appear.

Moreover I did checked last time by decreasing the posts per page limit to 10/8/5, etc but still after page 7th (ie. from page 8th it shows not found), so there is something with the plugin itself.

Last time I debug this by changing themes as well, but still the issue persists.
And finally found that wpml is causing this issue.

Did the same on your serve as well -
hidden link

Please check this, link is working fine and all pagination pages are working fine too.

I deactivate all 3 wpml plugins - (mainly the main one WPML Multilingual CMS is enough though)., and the pagination works.

As soon I activate these plugins pagination issue will come up again.

So, the bottomline is that no matter about the posts per page, whether you want to show 4 posts per page or 10, it will give pagination error after 7th (i.e from page 8th).
This is what I debug earlier and now on your server as well.

So, by this it is very clear that wpml causing that pagination issue.

Please have a look into it, and let me know if you have any other scenario for that error.?

Thanks & waiting for your reply.!!

May 3, 2019 at 11:03 am #3733483

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

I think i know what's happening.

Please Check this video: hidden link

TL:DR; version: Settings > Reading > "Blog pages show at most" is actually limiting the quantity of pages that are "working" so if you set it to a lower number you will be able to browse through each page normally, the higher the value, the more limited the pagination becomes and it will start throwing 404 errors.

That's actually a custom coding issue, because you're somehow forcing the post type archive page to always show 18 pages per page. please send us the snippet to see if we can help you with it, although we can't really promise anything since custom coding is outside the scope of our support (but we can at least take a look at it and try to help you if possible. Debugging is on you, though.).

Regards.