This thread is resolved. Here is a description of the problem and solution.
Problem:
Single post type page only works with the plain permalink.
Solution:
The custom taxonomy has the same rewrite slug as the post type slug, change it to another slug to fix the issue.
0% of people find this useful.
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.
Tagged: Custom Work
This topic contains 7 replies, has 2 voices.
Last updated by Ferran 1 year, 8 months ago.
Assisted by: Long Nguyen.
Author | Posts |
---|---|
March 9, 2023 at 3:36 pm #13209241 | |
Ferran |
Hi there, it's weird but with the WPML Plugin working on my site the posts are only showing if the simple structure of the permalinks is enabled, when I switch to the "post entry" option I cannot see the posts due the website is always throwing a 404 error when I try to see them. The rest of the website is working just fine but never showing the posts themselves. If someone can tell me if I can reset something in the troubleshoting wpml page or similar that would be awesome. Thanking you in advance and awaiting highly your reply, Ferran |
March 10, 2023 at 7:38 am #13214031 | |
Long Nguyen Supporter
Languages: English (English ) Timezone: Asia/Ho_Chi_Minh (GMT+07:00) |
Hi there, Thank you for contacting WPML support, I'd be happy to help you with this issue. As I understand, if you switch the permalink settings in Settings > Permalinks, to "Post name" then all post permalinks on your site will display 404 error, is that right? You can try to enable a minimal environment as below and see if it helps. I also need more information on your site by sharing the debug info. If you don’t know how to share the debug info, please follow this article https://wpml.org/faq/provide-debug-information-faster-support/ Look forward to your reply. |
March 10, 2023 at 8:54 am #13214737 | |
Ferran |
Hi and thanks heaps for your reply, all you said is correct and it happens in the main language of the site and the others, instead of providing you some screenshots, I've recorded a video to see what is going on better. Link to the video: hidden link You will see the site is running on a local environment (MAMP) and I've deactivated all the plugins I can, if I disable ACF Plugin the site doesn't work due I have custom taxonomies created on the site, same if I change to a standard theme. I've attached the debug info of the site. If you need anything else to figure out what is going on just tell me, I will be waiting your reply Thanks again and kind regards, |
March 11, 2023 at 2:25 pm #13223147 | |
Long Nguyen Supporter
Languages: English (English ) Timezone: Asia/Ho_Chi_Minh (GMT+07:00) |
Hi, Thank you for the feedback. According to the screen record, I see the issue happens with the post/page in the default language, not the second language where the translation post/page is displayed. So I think it might not relate to WPML itself. If you deactivate WPML, does the issue resolve? While checking the debug info, I see that the WordPress Memory Limit is below the requirements. The minimum requirements are 128M, but we do recommend 256M and the debug information of your site shows it set to 40M. Please check this link for more details define( 'WP_MAX_MEMORY_LIMIT', '256M' ); define( 'WP_MEMORY_LIMIT', '128M' ); After adding the code you can confirm that the memory was changed correctly from WPML > Support > WordPress > Memory limit. Look forward to your reply. |
March 13, 2023 at 2:42 pm #13233955 | |
Ferran |
Hi again and thanks for your reply, the issue does not resolve if I deactivate the plugin or change the language, in fact, I've replicated the entire site online and installed wpml from scratch and the problem persists. it is weird because if I have the permalinks in plain mode the posts itself are working and if I change them to personalised structure the posts are not and the taxonomies are and viceversa... does that make sense? on the other hand I've increased the memory limit but nothing have changed. If you want to take a look I'll be more than welcome to share the online development site credentials with you, ftp access or whatever you may need. Awaiting your reply, Ferran. |
March 14, 2023 at 3:19 am #13238377 | |
Long Nguyen Supporter
Languages: English (English ) Timezone: Asia/Ho_Chi_Minh (GMT+07:00) |
Hi, Thank you for the feedback. I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to a testing site where the issue is replicated. Your next reply is set to private to share the info. ❌ IMPORTANT: Please backup your database and website before proceeding ❌ Look forward to your reply. |
March 17, 2023 at 9:10 am #13267391 | |
Long Nguyen Supporter
Languages: English (English ) Timezone: Asia/Ho_Chi_Minh (GMT+07:00) |
Hi, Thank you for the feedback. I've switched the theme to a standard theme of WordPress and see the post, page display with the permalink setting Post name properly. So it's the specific issue with the custom post type in your custom theme. I would like to inform you that helping you with custom code, is out of the scope of WPML, but I can suggest you some ideas. When checking the code that registers the custom post type and custom taxonomy, I see the custom taxonomy has the same rewrite slug as the post type slug (for example: "noticias") and it could be the issue. Please try to remove the rewrite slug when registering the custom taxonomy and see how it goes. If you are not able to accomplish this, I would recommend you contact one of our certified partners that will be more than happy to help you with this. In this link, you will find a list of our certified partners: https://wpml.org/contractors/ Thanks for your understanding and patience. |