Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client was unable to see the 'minor edit - don't update translation' button in the Dutch language admin interface, while it was visible in French.

Solution:
We provided a workaround that involves editing a file within the WPML plugin. We advised the client to back up their site and database before proceeding. The steps are as follows:

1. Open the file

/wp-content/plugins/sitepress-multilingual-cms/inc/translation-proxy/wpml-pro-translation.class.php

2. Around line 568, replace the function

get_show_minor_edit_style()

with the provided code snippet. This modification ensures that the minor edit checkbox is displayed only when editing the page in the original language.

We also reminded the client to check for related known issues at https://wpml.org/known-issues/, verify the version of the permanent fix, and confirm that they have installed the latest versions of themes and plugins.

If the solution provided is outdated or not applicable to the client's case, we recommend opening a new support ticket for further assistance. For additional support, please visit the WPML support forum.

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.

Our next available supporter will start replying to tickets in about 2.40 hours from now. Thank you for your understanding.

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by Long Nguyen 2 weeks, 4 days ago.

Assisted by: Long Nguyen.

Author Posts
April 12, 2024 at 7:32 am #15511579

dannyD-5

Hi,

In my 'Dutch' language, I don't see the button 'minor edit - don't edit translation' in the admin. In French I do? How is this possible? See screenshots.

April 12, 2024 at 7:35 am #15511601

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Here is the new ticket. As I mentioned earlier, this happens with the second language when you edit the translation post. However, it should not be displayed there.
I'm discussing this with our 2nd tier support and I will update you here when I have something to share.

Thanks.

April 15, 2024 at 7:44 am #15517425

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

I got a workaround from our 2nd tier support. Please make a full backup of your site and database before proceeding.

1. Edit the file /wp-content/plugins/sitepress-multilingual-cms/inc/translation-proxy/wpml-pro-translation.class.php

2. Around line 568, replace the function get_show_minor_edit_style() with this one:

	private function get_show_minor_edit_style() {
		global $post, $iclTranslationManagement;
		if ( empty( $post ) || ! $post->ID ) {
			return false;
		}

		$translations   = $iclTranslationManagement->get_element_translations( $post->ID, 'post_' . $post->post_type );
		$show_box_style = 'display:none';
        $check = 0;
		foreach ( $translations as $t ) {
			if ( $t->element_id == $post->ID ) {
				$check++;
			} else {
                continue;
			}
            if ($check > 0) {
                return false;
            }
        }
        foreach ( $translations as $t ) {
	        if ( $t->status == ICL_TM_COMPLETE && ! $t->needs_update ) {
		        $show_box_style = '';
		        break;
	        }
        }

		return $show_box_style;
	}

it helps you show the minor edit checkbox when editing the page in the original language only.

Looking forward to your reply.
Thanks

April 16, 2024 at 4:05 pm #15527070

dannyD-5

Hi!

Thanks for the bugfix.
Hope it will be included in future bugfixes.

Kind regards,
Danny

dannyD-5 confirmed that the issue was resolved on 2024-04-16 16:05:59.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.