Open firstinternet opened 2 years ago
hey @firstinternet,
please read about this here: https://github.com/AdvancedCustomFields/acf/issues/729, it could be related to your issue. Do you have tried to use the second (not working) block like in the scheme of the first block?
Make sure the block pattern data contains the field name and the second underscore key like:
<!-- wp:acf/block_name {"name":"acf/block_name","data":{
"field_name_1":"0", "_field_name_1":"field_61a74f4183569",
"field_name_6":"0","_field_name_6":"field_62ebd50507f0a",
"field_name_10":"none","_field_name_10":"field_61adeeb4073cd"
},"mode":"preview"} -->
I'm pretty sure this is the reason your block isn't working. Now it remains to find out how this block pattern code was inserted?
Thanks for the reply @CreativeDive.
I've tried to following:
<!-- wp:acf/text \{
"id":"block_637e0c9f82056",
"name":"acf/text",
"data":\{
"text":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam eu turpis molestie, dictum est a, mattis tellus. Sed dignissim, metus nec fringilla accumsan, risus sem sollicitudin lacus, ut interdum tellus elit sed risus. Maecenas eget condimentum velit, sit amet feugiat lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Praesent auctor purus luctus enim egestas, ac scelerisque ante pulvinar. Donec ut rhoncus ex. Suspendisse ac rhoncus nisl, eu tempor urna. Curabitur vel bibendum lorem. Morbi convallis convallis diam sit amet lacinia.\r\n\r\nCurabitur tempor quis eros tempus lacinia. Nam bibendum pellentesque quam a convallis. Sed ut vulputate nisi. Integer in felis sed leo vestibulum venenatis. Suspendisse quis arcu sem. Aenean feugiat ex eu vestibulum vestibulum. Morbi a eleifend magna. Nam metus lacus, porttitor eu mauris a, blandit ultrices nibh. Mauris sit amet magna non ligula vestibulum eleifend. Nulla varius volutpat turpis sed lacinia. Nam eget mi in purus lobortis eleifend. Sed nec ante dictum sem condimentum ullamcorper quis venenatis nisi. Proin vitae facilisis nisi, ac posuere leo.",
"_text":"field_6329d5982c9a3",
"text_size":"standard",
"_text_size":"field_634fb2b975920",
\},
"align":"",
"mode":"edit"
\} /-->
Once imported in the editor I get the following:
When I switch to visual editor the block shows, however, no data is set.
@firstinternet I wonder where the backslashes come from?
<!-- wp:acf/text \{ <--
or
"data":\{ <--
Is it the pattern code result what you get from after the import? How looks the pattern from the original content?
Have you tried to remove all backslashes and copy and paste the block pattern in the editor directly?
@firstinternet In your last example pattern code:
"_text_size":"field_634fb2b975920",
There's a comma too many. The last entry should end without a comma in my opinion.
@firstinternet I wonder where the backslashes come from?
<!-- wp:acf/text \{ <--
or
"data":\{ <--
Is it the pattern code result what you get from after the import? How looks the pattern from the original content?
Have you tried to remove all backslashes and copy and paste the block pattern in the editor directly?
This is the format that I need to use when importing using WP ALL Import.
If pasting the block pattern code works without backslashes but not with them, you have the reason. Did you try?
Yep, I have tested it, backslashes not working in the pattern code.
Yep, I have tested it, backslashes not working in the pattern code.
Is this when using WP All Import?
Hello,
We're currently using Gutenberg blocks & ACF which works great, however, I need to import some content into these blocks and I'm stumbled across a bit of an issue.
I'm using WP All Import to import the .XML file and within the content I've created 2 ACF Blocks, like so:
The first block works perfectly, however, the second does not import.
Do I need to do anything differently?