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.

Tagged: ,

This topic contains 20 replies, has 2 voices.

Last updated by Andrey 1 year, 5 months ago.

Assisted by: Andrey.

Author Posts
October 10, 2023 at 3:06 pm #14551783

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for getting back to me. I will report the issue and return as soon as I know more.

October 12, 2023 at 8:53 pm #14569111

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

I appreciate your patience. We have identified a few issues on your site, including the one you reported where it is not possible to add a translation due to a fatal error. This error seems to be caused by the code in your current theme (functions.php).

  add_filter( 'wpml_tm_job_field_is_translatable', array( $this, 'wpmlsupp_7499_allow_translating_numbers', 10, 2 ));
....
    function wpmlsupp_7499_allow_translating_numbers( $is_translatable, $job_translate ) {
        $data = $job_translate['field_data'];
        if ( 'base64' === $job_translate['field_format'] ) {
            $data = base64_decode( $data );
        }
        if ( is_numeric( $data ) ) {
            return true;
        }
        return $is_translatable;
    }

This line

  add_filter( 'wpml_tm_job_field_is_translatable', array( $this, 'wpmlsupp_7499_allow_translating_numbers', 10, 2 ));

Needs to be change to

add_filter( 'wpml_tm_job_field_is_translatable', array( $this, 'wpmlsupp_7499_allow_translating_numbers' ), 10, 2 );

Another issue Jobs could not be loaded on the Jobs tab in WPML → Translation Management.

You need to go to the wp_icl_translate_job table in the database and remove the two entries:

DELETE FROM `wp_icl_translate_job`
WHERE `rid` = '3077' AND ((`job_id` = '999') OR (`job_id` = '1004'));

Before proceeding with any changes, please make sure to back up your database first. I hope this helps.

October 13, 2023 at 8:12 am #14570551

Nicolas

Hi Andrey,

Thank you for your message.
I'll try your suggested solutions and let you know if everything is working fine.

October 13, 2023 at 9:02 am #14571307

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Sure, take your time. Let me know if this is still the issue.

October 17, 2023 at 12:40 pm #14594511

Nicolas

Hi Andrey,

Thank you for the provided solution, it seems to work but only if I delete all the entries (for a specific page) in the wp_icl_translate_job.
This is fine as the editor is working fine after that and we can update the content. However, I would like to ask you if there is any explanation for how this issue occurred.?

Thank you in advance!

October 18, 2023 at 1:32 pm #14604701

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Hi,

I am glad to hear that it works now. Regarding the error, the code in your theme contained a syntax error.

With the second issue, I cannot say why this happened, but the result is incorrect entries in the database. Maybe the database was moved from some other place. If you can replicate this, we will look at it further.