qtranslate / qtranslate-xt

qTranslate-XT (eXTended) - reviving qTranslate-X multilingual plugin for WordPress. A new community-driven plugin soon. Built-in modules for WooCommerce, ACF, slugs and others.
GNU General Public License v2.0
550 stars 103 forks source link

The pagination doesn't work. #1281

Closed digitalform closed 1 year ago

digitalform commented 1 year ago

Hello,

I made a custom post_type. It is "property". If "Slugs translation (experimental)" is enabled, the pagination does not work (in archive-property.php). Redirect to the home page. If "Slugs translation" is turned off, everything works fine, only then the slugs are not translated.

Thanks in advance for your help!

Best regards, Peter

herrvigg commented 1 year ago

Not sure how this is related to slugs? @spleen1981 any idea?

spleen1981 commented 1 year ago

@digitalform just to confirm, archive page is working properly and pagination is displayed correctly, but any link from pagination redirects to the home page, right? If that is the case

digitalform commented 1 year ago

Hello @spleen1981 !

Paging does not work on the archive page. E.g.: https://kenway.hu/ingatlan/?city=Budapest&agglomeration=Budapest+V.+ker%C3%BClet&buy_rent=buy&real_estate_type=&min_price=&max_price=&min_area=&max_area=

Open the URL and try to go to page 2 with the pagination, it jumps to the home page. If I turn off "Slugs translation (experimental)", it works fine.

But if I make a custom page that contains a query_posts, it works: https://kenway.hu/elado-ingatlanok/

Best regards, Peter

spleen1981 commented 1 year ago

can you provide complete info for all bullets above?

digitalform commented 1 year ago

Hello @spleen1981 !

what is the href link shown in the pagination links? https://kenway.hu/ingatlan/page/2/?city=Budapest&agglomeration=Budapest+V.+ker%C3%BClet&buy_rent=buy&real_estate_type&min_price&max_price&min_area&max_area

can you provide data from Troubleshooting > Collect information from QTX settings. Please give me an email! I don't want to describe those details here.

can you provide full detail of how the custom post type and relevant archive page is defined? Paging does not work on the archive page. E.g.: https://kenway.hu/ingatlan/?city=Budapest&agglomeration=Budapest+V.+ker%C3%BClet&buy_rent=buy&real_estate_type=&min_price=&max_price=&min_area=&max_area=

Open the URL and try to go to page 2 with the pagination, it jumps to the home page. If I turn off "Slugs translation (experimental)", it works fine.

But if I make a custom page that contains a query_posts, it works: https://kenway.hu/elado-ingatlanok/

spleen1981 commented 1 year ago

I don't want to describe those details here.

You can remove the info you think are sensitive.

can you provide full detail of how the custom post type and relevant archive page is defined?

Here I mean what is the source code used to define this custom post types and archive page (if you have written it from scratch). Otherwise where this custom post type come from (plugins, themes)?

digitalform commented 1 year ago

Hello @spleen1981

can you provide data from Troubleshooting > Collect information from QTX settings.

Versions { "PHP_VERSION": "7.4.30", "WP_VERSION": "6.1.1", "QTX_VERSION": "3.12.0", "Plugins": [ "Advanced Custom Fields: Mapbox GL JS 1.0.2", "Advanced Custom Fields PRO 6.0.7",


"qTranslate-XT 3.12.0", ] }

Configuration { "default_language": "hu", "enabled_languages": [ "hu", "en" ], "flag_location": "plugins/qtranslate-xt-master/flags/", "language_name": { "hu": "Magyar", "en": "English" }, "locale": { "hu": "hu_HU", "en": "en_US" }, "locale_html": { "hu": "", "en": "" }, "not_available": { "hu": "Sajnos ennek a bejegyzésnek csak %LANG:, : és % nyelvű változata van.", "en": "Sorry, this entry is only available in %LANG:, : and %." }, "date_format": { "hu": "%Y %B %e, %A", "en": "%A %B %e%q, %Y" }, "time_format": { "hu": "%H:%M", "en": "%I:%M %p" }, "flag": { "hu": "hu.png", "en": "gb.png" }, "url_mode": 2, "use_strftime": 3, "filter_options_mode": 0, "language_name_case": 0, "detect_browser_language": true, "hide_untranslated": false, "show_displayed_language_prefix": false, "show_alternative_content": false, "hide_default_language": true, "use_secure_cookie": false, "header_css_on": true, "header_css": ".**}\n", "text_field_filters": [], "term_name": {


}, "disable_client_cookies": false, "ignore_file_types": [ "gif", "jpg", "jpeg", "png", "svg", "pdf", "swf", "tif", "rar", "zip", "7z", "mpg", "divx", "mpeg", "avi", "css", "js", "mp3", "mp4", "apk" ], "url_info": { "cookie_lang_front": "hu", "cookie_lang_admin": "hu", "cookie_front_or_admin_found": true, "scheme": "https", "host": "kenway.hu", "path": "/wp-admin/admin-ajax.php", "query": "action=admin_debug_info", "path-base": "", "wp-path": "/wp-admin/admin-ajax.php", "language_neutral_path": true, "http_referer": ** "referer_admin": true, "doing_front_end": false, "lang_cookie_admin": "hu", "lang_admin": "hu", "language": "hu", "set_cookie": false, "page_referer": "options-general.php" }, "language": "hu", "editor_mode": 0, "highlight_mode": 1, "auto_update_mo": true, "hide_lsb_copy_content": true, "lsb_style": "Simple_Buttons.css", "config_files": [ "./i18n-config.json" ], "custom_i18n_config": [], "custom_fields": [], "custom_field_classes": [], "post_type_excluded": [ "wpcf7_contact_form", "offer" ], "admin_enabled_modules": { "acf": true, "slugs": true, "all-in-one-seo-pack": false, "events-made-easy": false, "jetpack": false, "google-site-kit": false, "gravity-forms": false, "woo-commerce": false, "wp-seo": false }, "translator": {}, "qtrans_compatibility": false }

digitalform commented 1 year ago

can you provide full detail of how the custom post type and relevant archive page is defined? Here I mean what is the source code used to define this custom post types and archive page (if you have written it from scratch). Otherwise where this custom post type come from (plugins, themes)?

I have attached some screenshots. I hope this helps. This is a completely custom developed site.

archive-property functions custom

spleen1981 commented 1 year ago

This is a completely custom developed site.

Ok, then I don't think the issue can be (or should be) replicated on our side. Unless a bug is identified in QTX (for which there's no evidence so far), you should make sure your custom code complies with the plugin, not viceversa. Suggestion is to debug on your side and find what happens in slugs module when you try to reach one of the links pointed by your pagination (e.g. https://kenway.hu/ingatlan/page/2), and let us know in case you find specific bugs in QTX.

Anyway pagination links with slugs module enabled seems to work properly in my test environment, both for standard posts archives and custom post types (e.g. woocommerce shop page).

digitalform commented 1 year ago

Hello @spleen1981 !

Thank you for your answer! I just don't understand why the paging works when the "Slugs translation (experimental)" function is turned off. Paging worked anyway with version 3.11.4 and a plugin called "Qtranslate Slug" (which is no longer available for download).

Best regards, Peter

herrvigg commented 1 year ago

Duplicate #1331 ?

digitalform commented 1 year ago

Hello @herrvigg !

Yes. The new version and the corrected line solved the problem. Thank you!

Best regards, Peter

herrvigg commented 1 year ago

Awesome! Well done @spleen1981 👍