Please make sure to update to WPML 4.3.6 and check our list of Known Issues before reporting

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

Last updated by Alejandro 3 weeks, 6 days ago.

Assigned support staff: Alejandro.

Author Posts
December 2, 2019 at 2:18 pm #5054455

christopheM-6

Hi,
on production website (Fr / En) suddenly items of english menu switch to french (items were custom links and cpt archives).

I try to :
1 - Add new link and save -> but it display nothing in front
2 - I remove completly the menu and try to synchronize but some items (cpt archives are not duplicate)

any idea ?
Thanks

December 4, 2019 at 10:54 am #5067441

Yvette
Supporter

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

Timezone: Europe/Madrid (GMT+01:00)

Hello

Did this happen after recently upgrading our plugins or your theme?

What is the current state of the production site?
Do you have a staging/cloned site where we can troubleshoot the issue freely?

If the issue is showing on your current site, please write back with navigation steps to see the issue on your site.

Thanks for letting us know.

December 4, 2019 at 1:20 pm #5069071

christopheM-6

Thanks for your answer, the site is up to date, we recently updated WPML (the problem was already here for few days).
There is not staging area, only production... :/
When I try to synchronize menu, my CPT achives are set to "No translation" as you can see in attachment.

December 4, 2019 at 2:30 pm #5069781

Yvette
Supporter

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

Timezone: Europe/Madrid (GMT+01:00)

1. ) Temporary Access to your system
Please provide access to your system (wp-admin and ftp) so that I can further investigate this particular problem. The fields to provide this data are included in a private section that I will open for your next response. You can find it above the comments area. The information in this private section is only visible between WPML Support and you.

2. Duplicator plugin
Please install the Duplicator plugin in the case that I need to take a copy of your site to debug locally.

Thanks!

December 6, 2019 at 1:11 pm #5084003

Alejandro
Supporter

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

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

Hello,

I'll be taking voer this ticket because Yvette is not currently available.

I studied your site and noticed that it seems to be entirely made by you, also using ACF.

I noticed the CPT Archives are added as custom links which you mention is the only "fix" you've found.

I see that the "original" archives were categories, but may i ask how do you create those categories and where did you create them since the problem seem to be coming from the CPT archives for what i understand.

I also want to know how are you adding the menu to the header, for example because the structure might be of use.

Since this is a custom theme, our support might be a bit restricted since we can't get into teh "coding" part of it due to it being out of the scope of this support, but of course we want to try to see how we can help you out, so for now please let me know what i asked so i can look further into this.

December 6, 2019 at 2:28 pm #5084363

christopheM-6

Hi Alejandro,
the CPT are created through "the normal way" using the register_post_type function in the function.php file.

the menu is adding with a function in the header the only particular thing is a custom nav walker to manage bootstrap specific nav structure.

I don't understand why when try to synchronize my menu some CPT archives link are set to "no translation"... maybe there is something to investigate

December 7, 2019 at 12:14 pm #5087341

Alejandro
Supporter

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

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

Could it be possible that you tried to recreate the same issue overe here:
hidden link

I suppose everything you did was to the theme, so please just install the theme and try to translate the menu.

Do not migrate the entire site, please since the purpose of this test is to see if the problem is happening on a clean install and not due to extra factors we do not know.

Please write down the steps i would need to take if you manage to replicate the problem on the sandbox, please, because i'll need them in order to know how to proceed.

Thanks.

December 9, 2019 at 5:14 pm #5094653

christopheM-6

So....
I installe the theme
Configure Wpml
Create fr Menu
Create one item (and its translation) for each CPT
Add CPT archive to my menu
And try to synchronize
...
I haven't validate to let you see, if you try to replicate, there is two CPT which not gonna be created.

December 10, 2019 at 12:07 pm #5099627

Alejandro
Supporter

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

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

Ok, yes, the problem is that the element for the archive is a custom one and WPML doesn't really understand what needs to be translated there.

Could you tell me how and where did you create the option to show the archive, please? because the problem is originating in that part (since WordPress doesn't really do that anywhere, if you go to pages or posts you won't see an option showing an archive of the post type, and instead they use taxonomies to create that option. in this case "categories" which is something that seems to be mixed in this workflow)

Taxonomies don't seem to exist here and instead we have an archive showing in the menu which is not being recognized by WPML because it's not a "standard" behaviour.

I recorded the entire procedure here: hidden link just as a reference for the future of this troubleshootin.

Let me know please, so i can continue with the troubleshooting.

December 10, 2019 at 4:26 pm #5101621

christopheM-6

The element you notice is a native WP option (otherwise I don't understand your question), I only set 'has_archive ' to true when creating every CPT.

December 10, 2019 at 6:32 pm #5102249

Alejandro
Supporter

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

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

i think you misunderstood my question. has_archive makes it so the custo post type has an archive (a loop of all the items in there) which is ok.

what is weird, is that in appearance > Menu > in the sidebar where you can add your menus, there is one option to actually add the archive page to the menu by just selecting it (as you would with any post, or page). that is what i find unusual and there is where the problem lies.

I hope i explained myself better now. please let me know how did you do that, so i can start digging how could it be solved.

December 10, 2019 at 7:36 pm #5102637

christopheM-6

I tried, to be sur, it's my 'has_archive' set to true which made the trick.
I show you on local website whithout CPT, I only copy/paste 'Building' CPT function.
hidden link

December 12, 2019 at 1:29 pm #5115499

Alejandro
Supporter

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

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

Thanks for the video.

I still don't know what going on so i asked someone from our WPML development team to assist me, so we can check what's going on.

I'm sorry if it's taking too long but there is an increased activity in the forum right now which had slowed us down a bit but i'll do my best to have the information faster.

I'll keep you updated.

December 13, 2019 at 9:14 am #5121701

Alejandro
Supporter

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

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

Hi there. i checked out your site (not the sandbox but your current site) this morning because i was studying your CPT yesterday with our devs, however i can't see the CPT in the menu sidebar anymore, did you remove something? i can see the CPT still has "has_archive" "and show_in_menus"

Please let me know because we can't see or test the option anymore so we are kind of stuck because of it.

December 13, 2019 at 9:19 am #5121719

christopheM-6

Hi !
I don't understand, everything is right for me, take a look a the attachment.

The topic ‘[Closed] Menu item not showing’ is closed to new replies.