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 13 replies, has 3 voices.

Last updated by Shekhar Bhandari 2 months ago.

Assigned support staff: Shekhar Bhandari.

Author Posts
August 6, 2019 at 12:43 pm #4347577

mathieuP-2

I have a custom post type with the slug "proyectos", its custom post type taxonomy has the slug "filtro".

I'm trying to update my taxonomy slug to a new one in my function.php... to "proyectos/filtro". Because I would like the taxonomy slug integrated in my CPT slug. The problem is, in the WPML admin -> section taxonomy slugs, the original slug doesn't update. It displays the old one ("Filtro").

I deactivate and reactivate the plugin but the issue is still the same.

Right now, the old slug "filter" is set to make my website working. If I set the new slug in the function.php, if I open the taxonomy page in the browser it gives a 404 error.

Thanks!

August 6, 2019 at 6:15 pm #4349895

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Welcome to the WPML support forum. I will do my best to help you to resolve these issues.

I would like to access the admin area of your site for further checking. Please fill the private details fields after a full site backup.

Please check the following links for more details about our private information sharing policies.

https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

hidden link

Also please share a couple of screenshots for the better understanding of the issue.

--
Thanks!

Bigul

August 8, 2019 at 10:57 am #4362073

mathieuP-2

Hi,

Thanks a lot for the answer. I can't provide any access for the moment. I will have to create a test site to reproduce the issue. Unfortunately I can't do it until next month. I hope it's ok for you.

Thanks!

August 9, 2019 at 6:42 am #4367711

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Bigul is not available today so I am replying to you here.

Since you are not available to create a test site, is it ok If I create a test site for you where you can just add the code that's adding the custom post type and it's taxonomy so we can check the issue forward?

You can log in to the test site using the following link: hidden link

Just use demo content here as it's a public test site.

Look forward to your reply.

Thanks

August 9, 2019 at 8:35 am #4368721

mathieuP-2

Hello Shekhar,

Thanks for the test site. I've created a child theme so you can see the code in the functions.php how I register my CPT "test_projects" and its Taxonomy "filter_projects".

I have two languages: the original is in Spanish and the second in English. I haven't set up WPML because I wasn't sure if I was allowed to do it on the test site.

In my code to register the taxonomy, the slug is "filtro". This is the original slug I used on my site when installed and setup WPML. A few weeks after, I wanted to change the slug for a new one: "proyectos/filtro". Because I would like to integrate my taxonomy slug into my CPT slug (which is "proyectos"). However I'm not sure it's the right way to do it, is it?

Anyway, when I modified the slug in my functions.php, it didn't update in the WPML admin taxonomy slug section (ref. the screenshot).

Thank you.

August 9, 2019 at 10:35 am #4369531

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I added the languages on the site marked the taxonomy and Custom post type as translate and changed the taxonomy slug in the theme functions.php and it's working properly so could you please check if you can replicate the issue on the staging site?

Look forward to your reply.

Thanks

August 9, 2019 at 11:07 am #4369671

mathieuP-2

Hello,

Did you change the slug in functions.php after WPML setup or before?

Thanks

August 9, 2019 at 11:19 am #4369701

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I changed it after WPML setup.

In the sametime, while you check the issue, can you perform the below steps in your site and share us the results:
- Go to WPML->String Translation
- Search for the slug
- Delete it
- Refresh the frontend and go to WPML->Settings
- Is the slug updated?

Look forward to your reply.

Thanks
on your live site, could you please follow the below s

August 9, 2019 at 11:33 am #4369805

mathieuP-2

Hello,

It's working, the slug has been updated in the WPML admin!

However I still have the issue that once the taxonomy slug is updated in functions.php, it displays an error 404 in the taxonomy page front end... even if I flush the permalinks. Do you have ever seen this problem on a translated website? I thought the issue came from WPML by the fact the slug didn't update in WPML. But now I'm not so sure.

Thank you.

August 9, 2019 at 11:58 am #4369927

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Not sure if I have similar issues before, can you provide an example link so I can check further? If you can replicate it on the test server and provide us the link it will be much easy to debug.

Look forward to your reply.

Thanks

August 9, 2019 at 12:42 pm #4370311

mathieuP-2

Hi,

I've created 4 projects in CPT "test_projects" and 3 categories in taxonomy "filter_projects".

If you go to the projects page, they are listed by title. Everything is fine: hidden link

However on the taxonomy page, WordPress doesn't find the category. Example with the cat "Boston": hidden link

Thanks.

August 12, 2019 at 12:05 pm #4380519

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I don't think this is WPML error at all, I just deactivated WPML and can still face the 404 issues so you should check if such values in slug are accepted or not.

Let me know if this helps.

Thanks

August 13, 2019 at 2:04 pm #4388695

mathieuP-2

Hi,

Thank you for the help. I will let you know if I success to resolve the issue.

Thanks!

August 14, 2019 at 4:23 am #4392395

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Sure, look forward to your reply.

Thanks