Skip Navigation

Resolved

Topic Tags: Compatibility

Overview of the issue

When using the Cornerstone page builder with WPML, translations for classic widgets are not being displayed on the front-end, despite being available for translation within the WPML interface.

Workaround

You can try any of the following workarounds:

Option 1 (recommended)

  • Edit the pages and replace the classic widgets with the new elements (e.g. replace “Classic Text” element with “Text”).

Option 2

Please, make sure of having a full backup of your site before proceeding.

  • Open the …/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Cornerstone/class-wpml-cornerstone-translatable-nodes.php file.
  • Look for line 178.
  • Change:
    public static function get_nodes_to_translate() {
    		return [
    
  • For
    public static function get_nodes_to_translate() {
    		return [
    			'classic:custom-headline'                => [
    				'conditions' => [ '_type' => 'classic:custom-headline' ],
    				'fields'     => [
    					[
    						'field'       => 'content',
    						'type'        => __( 'Classic headline text content', 'sitepress' ),
    						'editor_type' => 'VISUAL',
    					],
    				],
    			],
    			'classic:text'                => [
    				'conditions' => [ '_type' => 'classic:text' ],
    				'fields'     => [
    					[
    						'field'       => 'content',
    						'type'        => __( 'Classic headline text content', 'sitepress' ),
    						'editor_type' => 'VISUAL',
    					],
    				],
    			],
    
  • Do a small modification on the original page
  • Translate the page.
    Keep in mind that the fields will be duplicated on the Classic Translation Editor

 

Option 3