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

Last updated by abdullaA-12 1 week, 4 days ago.

Assigned support staff: Mateus Getulio.

Author Posts
April 11, 2021 at 6:17 pm #8511179

abdullaA-12

I am trying to: translate a single page.

Link to a page where the issue can be seen: hidden link

When I do a string translation job, it just stays as processing. I can find in the error logs the following:

The XLIFF file could not be applied to the content of the job ID: 1

Also if I try to add a translation in the edit page sidebar, I'm getting the following error:

There has been a critical error on this website. Please check your site admin email inbox for instructions.

Both errors are attached.

Appreciate your support at the earliest.

Screen Shot 2021-04-11 at 9.12.26 PM.png
Screen Shot 2021-04-11 at 9.11.57 PM.png
Screen Shot 2021-04-11 at 9.12.37 PM.png
April 12, 2021 at 5:09 pm #8519649

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

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

Hey there,

I'll be happy to assist you with this.

Please try the following troubleshooting steps after a site backup and make sure the problem is existing or not:

- Go to WPML -> Support page
- Click on the Troubleshooting link (blue link in the middle of the page)
- On the Troubleshooting page, please click on the following options of the *Clean up* section. Wait for confirmation of processing after each one:

- Clear the cache in WPML
- Remove ghost entries from the translation tables
- Fix element_type collation
- Set language information
- Assign translation status to duplicated content

- After that, if the translation is in progress then cancel it in WPML -> Translation Management -> Translation jobs
- Go to WPML -> Translation Management and add the page that is not working, add it to the translation basket, and then to the translation job queue
- Proceed to translate the page, preferably from WPML -> Translations

If the problem persists, then we might be facing an interaction issue with a third-party functionality, in this case:

- Deactivate all the plugins that are not related to WPML
- Switch for a moment to a WordPress default theme like Twenty Twenty-one
- If the issue is gone, activate one by one to see with which one there is an interaction issue

Could you tell me the results of this investigation? Also, can you enable the debug mode? Please add the following code in your wp-config.php file:

// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );
  
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
  
// Disable display of errors and warnings 
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
  
// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
define( 'SCRIPT_DEBUG', true );

Please check the following links to read more about debugging with WordPress.
- https://codex.wordpress.org/Debugging_in_WordPress
- https://codex.wordpress.org/Debugging_in_WordPress#Example_wp-config.php_for_Debugging

After adding the code above, try to reproduce the issue again and check if you'll find a debug.log file inside the wp-content folder. If you locate it there, please send us the last lines here in the ticket.

Looking forward to your reply. Thanks,
Mateus.

April 24, 2021 at 11:59 am #8614325

abdullaA-12

Please find the content of the debug file below:

[24-Apr-2021 11:56:11 UTC] PHP Fatal error:  Uncaught InvalidArgumentException: Argument ID must be numeric and greater than 0. in /home/serenia/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php:29
Stack trace:
#0 /home/serenia/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element-factory.php(41): WPML_Translation_Element->__construct('0', Object(SitePress), NULL)
#1 /home/serenia/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element-factory.php(33): WPML_Translation_Element_Factory->create_post('0')
#2 /home/serenia/public_html/wp-content/plugins/wpml-media-translation/classes/media-translation/wpml-translation-editor/class-wpml-media-populate-media-strings-translations.php(33): WPML_Translation_Element_Factory->create('0', 'post')
#3 /home/serenia/public_html/wp-includes/class-wp-hook.php(292): WPML_Media_Populate_Media_Strings_Translations->populate(Array, Array, 'ar')
#4 /home in /home/serenia/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php on line 29