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 14 replies, has 4 voices.

Last updated by marco 8 years, 4 months ago.

Author Posts
May 2, 2011 at 10:58 am #27087

ooluja

Hi to all WPML members 🙂 ,
I have a problem with custom taxonomies.
My taxonomies are: Location, Property Type.
Taxonomies have "hierarchical" set to "true".
WPML version: 2.2.2.1
WP version: 3.1
My taxonomies don't get status "selected" from my default language post. This happens only in hierarchical mode, setting hierarchical to false, it works fine, but I need taxonomies to be in hierarchical mode.
On my default language: (Croatian)
hidden link
On my second language: (German - nothing selected)
hidden link
What should I do?

May 2, 2011 at 2:08 pm #27089

Amir
Supporter

I'm not sure that I follow. We use hierarchical taxonomies too in our own site and we're not seeing a problem.
When you set the taxonomies as hierarchical and choose them in the GUI, are you getting any error?

May 2, 2011 at 2:26 pm #27090

ooluja

No errors.
Maybe something isn't correctly configured in my custom_post_type:
The code that I use:
register_taxonomy( "location",
array( "restate" ),
array ( "hierarchical" => true,
"label" => "Lokacija",
'labels' => array( 'name' => __('Lokacija'),
'singular_name' => __('Lokacija'),
'search_items' => __('Pronađi nekretninu'),
'popular_items' => __('Popularne lokacije'),
'all_items' => __('Sve Lokacije'),
'parent_item' => __('Parent Location'),
'parent_item_colon' => __('Parent Location:'),
'edit_item' => __('Editiraj lokaciju'),
'update_item' => __('Ažuriraj lokaciju'),
'add_new_item' => __('Dodaj novu lokaciju'),
'new_item_name' => __('Ime nove lokacije') ),
'public' => true,
'show_ui' => true,
"rewrite" => true )
);
The thing is that I can't get the selected taxonomy from the original post to be selected in other translations as well.
In "Multilingual Content Setup" taxonomies are set to "Translate", when translating a post, taxonomy appears in the "translate post"
Picture:
hidden link
Maybe I'm doing something wrong :/?

May 2, 2011 at 3:52 pm #27091

Amir
Supporter

Please remove all the gettext calls -

__()

- from the texts in this call. They are what's causing the problem.

May 2, 2011 at 6:52 pm #27092

ooluja

No more gettext calls in this document (theme-custom-post-types.php), but it's still the same 🙁 Can't get the taxonomy selected for other languages.
Do I have to remove "__()" from all documents in the theme?
Thx in advance!

May 2, 2011 at 8:26 pm #27093

Amir
Supporter

You should keep the gettext calls elsewhere in the theme, just not in the call that registers the custom type.
Do you want us to login to your site and see what may be wrong? If so, I'll write you an email and you can reply to it privately.

May 2, 2011 at 9:31 pm #27094

ooluja

Sure, it would be nice from you Amir 🙂

May 3, 2011 at 6:57 am #27095

Orit

Can you explain

don't get status "selected" from my default language post

a little more? Perhaps an example, steps to replicate?

May 3, 2011 at 8:59 am #27096

ooluja

Sure,
1. Im adding a property on my default language (Croatian), selecting the taxonomies I would like to use:
hidden link
then, I click on "publish". Property published.
After that, I choose to translate this property to english:
hidden link
Im in "translation editor" now. Filling the title and description of the property on english. After that I have to confirm that I will use the translated taxonomies:
hidden link
Selected "This translation is finished." to all fields.
After translation is saved I don't get the taxonomies selected to the translated property.
Translated property (English):
hidden link
The taxonomies aren't selected.
Original property (Croatian):
hidden link
The taxonomies are selected.
And that's my story told in a few steps 🙂
Thx in advance guys 🙂

May 3, 2011 at 9:30 am #27097

ooluja

..and yeah, forgot something.
The file "theme_custom_post_types.php" from the theme:
http://pastebin.com/MrnA4RY9

May 4, 2011 at 9:42 am #27098

ooluja

Found something?
Amir, if it's not a problem for you, I would like if you (or your team) can connect to my website and see what's wrong. I haven't received any email from you yet.

May 4, 2011 at 10:01 am #27099

Amir
Supporter

Sorry about the delay. I sent you an email.

May 4, 2011 at 1:34 pm #27100

Amir
Supporter

We fixed this bug in the development version. It will be available in the next release and in the beta versions that we'll have before the final release.
If you want to test using a development version, we can export it for you.

May 4, 2011 at 2:28 pm #27101

ooluja

Sure, thank you Amir, Mihai and others from the WPML team for this great plugin 🙂

May 23, 2011 at 8:13 pm #27102

marco

Hi, I had the same issue with the same wootheme theme (Estate) and I'm recently install the new stable version (2.2.2.1). I'm just found this post, and I see isn't possible fix this in this new version?
is there a quick solution for this? or, when you will release the new stable version (2.3)? i don't want to install the release candidate and had new issues =(
help!

The topic ‘[Closed] Custom taxonomies hierarchical problem’ is closed to new replies.