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.

Sun Mon Tue Wed Thu Fri Sat
12:00 – 20:00 12:00 – 20:00 12:00 – 20:00 12:00 – 20:00 12:00 – 20:00 - -
- - - - - - -

Supporter timezone: Asia/Karachi (GMT+05:00)

Tagged: ,

This topic contains 4 replies, has 0 voices.

Last updated by Noman 4 days, 18 hours ago.

Assisted by: Noman.

Author Posts
June 10, 2025 at 11:06 am #17121628

alessandraB-3

Background of the issue:
I am trying to access the Translation Management page in the CMS. I encountered an issue while doing so.

Symptoms:
I receive an Error 500 when accessing the Translation Management page. The log shows: Uncaught TypeError: Argument 2 passed to WPMLCoreSharedKernelComponentPostApplicationQueryDtoPostTypeDto::__construct() must be of the type string, null given, called in /wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/wpml/src/Legacy/Component/Post/Application/Query/TranslatableTypesQuery.php on line 110 and defined in /wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/wpml/src/Core/SharedKernel/Component/Post/Application/Query/Dto/PostTypeDto.php:26

Questions:
Why am I getting an Error 500 when accessing the Translation Management page?
How can I resolve the TypeError related to PostTypeDto::__construct()?

June 11, 2025 at 6:13 pm #17127599

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

I'm still debugging this issue and get back to you with an update soon.

Thank you

June 12, 2025 at 6:25 pm #17131235

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

I’ve tried troubleshooting steps but none of them worked so far, I’m going to escalate this issue to our 2nd tier support for further review.

Thank you for your cooperation

June 14, 2025 at 2:40 pm #17135492

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

I have escalated this issue to our 2nd tier support and I will update you as soon as I have some news.

Thank you for your cooperation and patience.

June 18, 2025 at 4:53 pm #17147805

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Our 2nd tier support said, this issue is caused by the Visual Composer PRO plugin registering a custom post type (vcv_headers) without proper labels, which conflicts with WPML.

This isn’t a bug in WPML, but we’ve added a workaround on our side to avoid the error. There are two possible Workaround and you can follow any of them:

=== Please backup your database and website first for safety reasons ===

Workaround 1 (recommended):
Add the following code to your theme’s functions.php file:

add_filter( 'wpml_post_type_dto_filter', function ( $postTypeObject ) {
	if ( is_object( $postTypeObject ) ) {
		$default = $postTypeObject->name ?? '';
		if ( ! isset( $postTypeObject->labels ) || ! is_object( $postTypeObject->labels ) ) {
			$postTypeObject->labels = new stdClass();
		}
		if ( empty( $postTypeObject->name ) ) {
			$postTypeObject->name = $default;
		}
		if ( empty( $postTypeObject->labels->name ) ) {
			$postTypeObject->labels->name = $default;
		}
		if ( empty( $postTypeObject->labels->singular_name ) ) {
			$postTypeObject->labels->singular_name = $default;
		}
	}
	return $postTypeObject;
} );

Workaround 2:
You can also manually edit the plugin file:
/wp-content/uploads/visualcomposer-assets/addons/themeEditor/themeEditor/PostTypeController.php

Replace below code:

protected function registerPostType()
    {
        register_post_type(

With:

protected function registerPostType()
{
	if (!isset($this->postNamePlural)){
		$this->postNamePlural = $this->postNameSlug;
	}
	register_post_type(

However, this change can be lost if the plugin updates.

We also recommend reporting this to the Visual Composer PRO team so they can fix it in their code.

Kindly let me know the results,
Thank you