Skip Navigation

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

Last updated by Dražen Duvnjak 6 months, 2 weeks ago.

Assigned support staff: Dražen Duvnjak.

Author Posts
March 11, 2021 at 6:56 am #8280829

eljaA

Hi,

I checked at beta version now able to see. I did same changed code at live but not showing there. have you changes anything else too. Please let me know so I will change too at live.

March 11, 2021 at 7:01 am #8280843

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

I have checked on this and it seems it is a compatibility issue, I was able to reproduce a similar issue on a clean install.

Topics are not showing if they are translated via backend, if you do not have a translation of the topic, then it shows fine.

For now, I suggest you do no translate topics, and they will show up fine on the frontend.

In the meantime, I will be escalating this case to our compatibility team and update you as soon as I have some news or a fix for it.

Thanks and kind regards,
Drazen

March 11, 2021 at 1:45 pm #8285503

eljaA

Hi,

Thanks for replying and understanding issue. You are when I translated that forums, topics and replies at backend It will not appear at front end but kept as it is without translation It display all. In That main issue is if I created any topic in English need to be translate in dutch also. if it will as English in dutch then what use of translation.

Please check and give me solution.

March 11, 2021 at 2:43 pm #8286099

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

I understand and have already escalated this issue to our developers. They are working on it.

I will update you as soon as I have some news or fix to share.

Kind regards,
Drazen

April 1, 2021 at 12:04 pm #8448711

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

I have an update on this issue.

Can you please follow the next steps and let me know how it goes:

0) Make a backup

1) Set Topics, Replies and Forums as "Translatable" from WPML -> Settings.

2) Set _bbp_* custom fields as "Copy Once" from WPML -> Settings.

3) Modify sitepress-multilingual-cms\classes\query-filtering\class-wpml-query-parser.php LINES 456 to 472:

From:

             private function maybe_adjust_parent( $q, $post_type, $current_language ) {
		$post_type = ! is_scalar( $post_type ) && count( $post_type ) === 1 ? end( $post_type ) : $post_type;
		if ( ! empty( $q->query_vars['post_parent'] )
			 && $q->query_vars['post_type'] !== 'attachment'
			 && $post_type
			 && is_scalar( $post_type )
			 && $this->sitepress->is_translated_post_type( $post_type )
		) {
			$q->query_vars['post_parent'] = $this->post_translations->element_id_in(
				$q->query_vars['post_parent'],
				$current_language,
				true
			);
		}
		return $q;
	}

To:

            private function maybe_adjust_parent( $q, $post_type, $current_language ) {
		$post_type = ! is_scalar( $post_type ) && count( $post_type ) === 1 ? end( $post_type ) : $post_type;
		if ( ! empty( $q->query_vars['post_parent'] )
			 && $q->query_vars['post_type'] !== 'attachment'
			 && $post_type
		         && $post_type != 'topic'
		         && $post_type != 'reply'
			 && is_scalar( $post_type )
			 && $this->sitepress->is_translated_post_type( $post_type )
		) {
			$q->query_vars['post_parent'] = $this->post_translations->element_id_in(
				$q->query_vars['post_parent'],
				$current_language,
				true
			);
		}
		return $q;
	}

Please let me know how it goes.

Thanks and kind regards,
Drazen

April 9, 2021 at 9:17 am #8499571

eljaA

Hi,

Thanks for reply. I am using all latest version of plugins right now. Still I want to do above changes. Please check and let me know.

Capture.JPG
April 9, 2021 at 9:47 am #8499967

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

yes, please follow my suggestion from the previous reply, step by step, and let me know how it goes and if you still have an issue.

Thanks,
Drazen

The topic ‘[Closed] Split: bbPress translated topics not showing’ is closed to new replies.