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 15 replies, has 2 voices.

Last updated by Carlos Rojas 2 months, 2 weeks ago.

Assigned support staff: Carlos Rojas.

Author Posts
August 1, 2019 at 3:48 pm #4323645

tobiasW-9

I am trying to translate a post via the translate + sign.
This german psot has a term of a custom taxonomy assigned.
All terms of this taxonomy have translations assigned.

I expected to see:
When adding a translation, I expect the translated term to be assigned to the translated (english) post.

Instead, I got:
Instead, a new, German term was created.
The ID of the term that should have been assigned is used as the name of this new German term.
This new (German) term is then assigned to the new English post.

This bug only happens when using the + sign.
When creating a translation via the "Duplicate" function everything works well.

August 1, 2019 at 6:38 pm #4324823

Carlos Rojas
Supporter

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

Timezone: America/Montevideo (GMT-03:00)

Hello,
Thank you for contacting WPML support.

1.- Could you attach some screenshots of the steps you are following to reproduce the issue? This way I will have a better understanding.

2.- Please increase the PHP Memory Limit. Minimum requirements are 128Mb: https://wpml.org/home/minimum-requirements/
You can add this to wp-config.php to increase WP memory:

/** Memory Limit */
define('WP_MEMORY_LIMIT', '128M');
define( 'WP_MAX_MEMORY_LIMIT', '128M' );

- Add it above the line /* That's all, stop editing! Happy blogging. */

Kind regards,
Carlos

August 2, 2019 at 7:19 am #4327479

tobiasW-9

The memory limit already was 256M. I added the constants to wp-config.php. Still have the problem.

I first created a Term within my custom taxonomy and a translation for the Term:
Taxonomy: Research Group
Term: Astroinformatics

I then create a new post in german and assigned the Term to the post and clicked save.
I then click on the translate + sign within the translate metabox which redirects me to a new english post.
This post has no term assigned (At least it doesn't look so.) When I then add a post title to the new post and click save it still cant see a assigned term.
When I go back to the post overview in the backend I can see the new wrong term assigned.

August 2, 2019 at 11:28 am #4329457

tobiasW-9

The same error occurred with categories in the past. But I can't reproduce it with categories now.

I disabled all other plugins except the one creating the custom taxonomy and switched back to a default theme.

I cloned the site to a different server and the bug still appears. I can provide you access to this second server.
How can I send you the credentials?

August 2, 2019 at 4:21 pm #4331421

Carlos Rojas
Supporter

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

Timezone: America/Montevideo (GMT-03:00)

Hi,
Thank you very much for your feedback.

Could you tell me if you translated the taxonomy term (Astroinformatics) before translating the post?

If you haven't, please do so and let me know if the issue persists.

Regards,
Carlos

August 2, 2019 at 9:02 pm #4332631

tobiasW-9

Yes I translated all terms of the taxonomy before creating the translation.

Everything works well when using the duplicate function. Only the "regular" translate function (via the plus sign) has the described bug.

I can give you access to the page (cloned site for debuging). Just tell me how I should send you the credentials.

August 5, 2019 at 12:36 pm #4340587

Carlos Rojas
Supporter

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

Timezone: America/Montevideo (GMT-03:00)

Hi,
Thank you very much for your message.

I have set your next answer private and there you will find the fields to provide the credentials in a secure way.

Regards,
Carlos

August 5, 2019 at 2:58 pm #4341483

Carlos Rojas
Supporter

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

Timezone: America/Montevideo (GMT-03:00)

Hi,
Thank you very much for the information provided.

Could you tell me if the issue persists if you update all outdated plugins in the test site?

Regards,
Carlos

August 6, 2019 at 8:25 am #4345095

tobiasW-9

Yes, the issue persists. All other plugins are disabled (except the one loading the taxonomy) but I updated them anyway.

August 6, 2019 at 11:41 am #4346853

Carlos Rojas
Supporter

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

Timezone: America/Montevideo (GMT-03:00)

Hi,

Is this taxonomy created by the HITS plugin? If this is the case then we are facing a compatibility issue.

Regards,
Carlos

August 6, 2019 at 12:27 pm #4347315

tobiasW-9

Yes, the taxonomy is created by the HITS Plugin.

This plugin was created by me. I used the WP-CLI to generate the plugin and the taxonomy php-code. The taxonomy registration corresponds to the WordPress documentation.

The only thing what the plugin does is to register the taxonomy.

I commented out all other functions of the plugin, to exclude all other error sources/compatibility problems.

This is the code that registers the taxonomy:

function hits_research_group_init() {
	register_taxonomy( HITS_GROUP::get_taxonomy(), array( 'post', 'page', 'hits-download', 'hits-people', 'hits-project', 'hits-publication', 'hits-software', 'dt_team', 'hits-job', 'tribe_events', 'download' ), array(
		'hierarchical'      => true,
		'public'            => true,
		'show_in_nav_menus' => true,
		'show_ui'           => true,
		'show_admin_column' => true,
		'query_var'         => true,
		'rewrite' 					=> array(
			'slug' => 'groups',
			'with_front' => false
		),
		'capabilities'      => array(
			'manage_terms'  => 'manage_groups',
			'edit_terms'    => 'manage_groups',
			'delete_terms'  => 'manage_groups',
			'assign_terms'  => 'assign_groups',
		),
		'labels'            => array(
			'name'                       => __( 'Research Groups', 'hits' ),
			'singular_name'              => _x( 'Research Group', 'taxonomy general name', 'hits' ),
			'search_items'               => __( 'Search Research Groups', 'hits' ),
			'popular_items'              => __( 'Popular Research Groups', 'hits' ),
			'all_items'                  => __( 'All Research Groups', 'hits' ),
			'parent_item'                => __( 'Parent Research Group', 'hits' ),
			'parent_item_colon'          => __( 'Parent Research Group:', 'hits' ),
			'edit_item'                  => __( 'Edit Research Group', 'hits' ),
			'update_item'                => __( 'Update Research Group', 'hits' ),
			'view_item'                  => __( 'View Research Group', 'hits' ),
			'add_new_item'               => __( 'Add New Research Group', 'hits' ),
			'new_item_name'              => __( 'New Research Group', 'hits' ),
			'separate_items_with_commas' => __( 'Separate Research Groups with commas', 'hits' ),
			'add_or_remove_items'        => __( 'Add or remove Research Groups', 'hits' ),
			'choose_from_most_used'      => __( 'Choose from the most used Research Groups', 'hits' ),
			'not_found'                  => __( 'No Research Groups found.', 'hits' ),
			'no_terms'                   => __( 'No Research Groups', 'hits' ),
			'menu_name'                  => __( 'Research Groups', 'hits' ),
			'items_list_navigation'      => __( 'Research Groups list navigation', 'hits' ),
			'items_list'                 => __( 'Research Groups list', 'hits' ),
			'most_used'                  => _x( 'Most Used', 'hits-research-group', 'hits' ),
			'back_to_items'              => __( '← Back to Research Groups', 'hits' ),
		),
		'show_in_rest'      => true,
		'rest_base'         => 'hits-research-group',
		'rest_controller_class' => 'WP_REST_Terms_Controller',
	) );

}
add_action( 'init', 'hits_research_group_init' );

Is there anything wrong with the taxonomy registration?

August 6, 2019 at 1:31 pm #4347793

Carlos Rojas
Supporter

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

Timezone: America/Montevideo (GMT-03:00)

Hi,
Thank you very much for your message.

Before we continue I kindly ask you to double check if you are following the steps described in our documentation to translate the taxonomies: https://wpml.org/documentation/getting-started-guide/translating-post-categories-and-custom-taxonomies/

Please compare the steps you are following with our documentation and let me know if you see any difference.

Regards,
Carlos

August 6, 2019 at 1:42 pm #4347927

tobiasW-9

I enabled the taxonomy translation as described.

The "Enable Slug translation" option is not available on my wpml backend site. I guess thats missing because I don't use the string translations plugin. Is this required?

I did not use the WPML -> Taxonomy Translation page but I translated the terms via the taxonomy Edit screen as described on the linked page.

So I think i set it up as described except the slug translation thats missing on my site.

August 6, 2019 at 2:05 pm #4348153

Carlos Rojas
Supporter

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

Timezone: America/Montevideo (GMT-03:00)

Hi,

Please install and activate the String Translation plugin and enable the slug translation. Does the issue persists?

Regards,
Carlos

August 6, 2019 at 2:47 pm #4348699

tobiasW-9

I activated the string translation plugin and enabled slug translation. The issue persists.
you can check this on the demo install I gave you access to.