Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Product pages not working in second language #155

Open
DaphneNL opened this issue May 8, 2015 · 16 comments
Open

Product pages not working in second language #155

DaphneNL opened this issue May 8, 2015 · 16 comments
Labels

Comments

@DaphneNL
Copy link

DaphneNL commented May 8, 2015

First of all I would like to thank you for this amazing plugin. Works like a charm (well, accept in this case of course, ;) ). My problem: The main language of my website is Dutch, and everything works fine in Dutch. My second language is English, and almost everything works except for one thing (I think, I haven't checked the rest yet): When you pick a category on my website, http://dapsseeds.pridesranch.nl , the first product page shows up nicely, but if you want to see the second page (like in the category "cherry/cocktail" with lots of varieties) you will be directed straight to the home page. I've tried playing around with slugs, de- and re-activating plugins, changing permalinks, but I just can't seem to find the problem. I don't have much programming or scripting experience, do I hope someone can explain to me in a simple way what is wrong. Thanks!

Note from John Clause: Most likely the following problems are related:
https://wordpress.org/support/topic/pagination-does-not-work-if-query-mode-used
https://wordpress.org/support/topic/navigation-problem-20

@DaphneNL
Copy link
Author

DaphneNL commented May 9, 2015

I just checked, with the old qtranslate plugin this problem doesn't occur, only with the qtranlate x plugin. But the qtranslate plugin messes up my layout.

@johnclause
Copy link
Member

@DaphneNL : there has been some changes in the latest q-X available from GitHub. We would greatly appreciate if you could test your original problem again and see if it is gone?

The test version can be downloaded from GitHub page with button "Download ZIP", or click here for the sake of convenience.

@johnclause johnclause added the bug label May 11, 2015
@DaphneNL
Copy link
Author

Yes! It's working! Thank you so much!

@johnclause
Copy link
Member

Thank you for testing. I am closing it now. We may still write to closed issue and we can re-open it if needed.

@klumme
Copy link

klumme commented Jun 1, 2015

I seem to be running into the same issue on search result pages, even with the latest version from GitHub. This happens only for secondary languages: the first page has the query ?s=&lang=en but the link to previous posts only points to ?paged=2&lang=en.

@johnclause
Copy link
Member

I went to your site http://dapsseeds.pridesranch.nl and it seems working correctly. I guess I need steps to reproduce.

@johnclause johnclause reopened this Jun 2, 2015
@klumme
Copy link

klumme commented Jun 2, 2015

I'm not the original poster so that is not my site, but it can be reproduced there, at least on my end:

Go to the site, make sure the language is English.
Add a search query to the end of the URL, like &s=tomato.
Scroll to bottom, click "Older posts".
This takes you to the front page.

On that site, using the search box doesn't cause the same problem, which I'm guessing is because the search is done with a post type. On a site of mine, using the search widget results in the query above, the results of which have broken navigation.

@johnclause
Copy link
Member

Indeed. I was using the search box, then url is ?s=tomato&post_type=product&lang=en and then a different navigation appears for some reason, which works fine.

Could you think of a way to reproduce it under one of the standard themes? I was trying under StoreFront and it works correctly.

@johnclause
Copy link
Member

BTW, can you try different "URL Modification Mode", like "Pre-Path Mode", which most people use? Does the problem happen for you there too?

@johnclause
Copy link
Member

Can you try the latest from GitHub? I cancelled filter qtranxf_convertBlogInfoURL for URL Modification Query Mode. Does it solve your problem?

@klumme
Copy link

klumme commented Jun 3, 2015

Latest from GitHub did not solve the problem, but changing to pre-path mode works. Pre-path mode is nicer, of course, and I can probably manage to change my problematic site to that. Still, I suppose query mode should work...

Couldn't reproduce on the standard themes, but they use the_posts_pagination(), not the_posts_navigation() in their search templates (Twenty Thirteen seems to have some custom thing). My theme is a custom one based on _s. It is not impossible that I'm the one doing something stupid in my theme, I'll have to take a look.

Thanks for looking into this!

@klumme
Copy link

klumme commented Jun 3, 2015

It seems the problem is not related to the bloginfo_url hook but rather the home_url hook. Removing the qtranxf_home_url filter makes navigation work (don't know what else this might break, though).

@johnclause
Copy link
Member

Yes, they both add /?lang=xx to the url and WP assumes the url without a query string. Yes, changing home_url may break many sites, but maybe if we do it for Query Mode only, it would be fine. Did you try to use Pre-Path mode? Does the problem happen then?

johnclause added a commit that referenced this issue Jun 3, 2015
@johnclause
Copy link
Member

I've disabled filter 'home_url' in Query Mode. Since majority do not use Query mode, they will be unaffected, and even those who do, may still be fine, since things a bit different in Query Mode. Hopefully not many will have a trouble, and if somebody does we will fix them by other meaning.

I am still curious if your problem is gone in none query mode?

@klumme
Copy link

klumme commented Jun 4, 2015

Ok, thanks! Yep, as I wrote above, pre-path mode worked fine for me.

@johnclause
Copy link
Member

Does the latest from GitHub work for you even in Query Mode? I am doing it blindly, since I could never reproduce the problem under my themes. Can we close this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants