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 Dražen 9 months ago.

Author Posts
August 29, 2024 at 2:18 pm #16120580

neringaC

Background of the issue:
I am trying to import a custom content field for my posts on hidden link. Most of the fields are filled except the one that is in a custom block with ACF WYSIWYG Editor.

Symptoms:
Unable to import CSV with WP All Import to fill ACF custom content block.

Questions:
How can I import a custom content field using WP All Import for a custom block with ACF WYSIWYG Editor?

August 29, 2024 at 3:06 pm #16120968

neringaC

I found out that the content is updated in the post_meta table a field of content is created with the translations from the csv, however, I am using ACF Gutenberg blocks and they are in the post table content column and it is not updated.

August 30, 2024 at 6:34 am #16122912

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

Thanks for contacting us.

While you wait for my colleague to take over the ticket, let me try to help you with the issue quickly.

As I understand issue also happens in the default language, can you please confirm if you have the same issue when wpml is disabled and you import in the default language? If yes, then this is not a WPML issue, and you should contact WP All Import for support and further info on how to achieve what you are trying.

Hope this helps.

Regards,
Drazen

August 30, 2024 at 7:14 am #16123141

neringaC

Solved it with a custom function in wp all import

<?php
/**
* Converts specific special characters in a string to Unicode escape sequences,
* and shows where newlines and carriage returns should be.
*
* @param string $text The input text to convert.
* @return string The text with special characters replaced by Unicode escape sequences.
*/
function convert_special_chars_to_unicode($text) {
// Define an array of special characters to replace with their Unicode escape sequences
$replacements = array(
' '\\\u003c',
'>' => '\\\u003e',
'"' => '\\\u0022',
"'" => '\\\u0027',
'{' => '\\\u007b',
'}' => '\\\u007d',
'&' => '\\\u0026',
'\\' => '\\\\\\u005c'
);

// Initialize the result string
$escaped_text = '';
$length = mb_strlen($text, 'UTF-8');

// Process the text
for ($i = 0; $i

Used it like this for the custom block ->