• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

RESOLVED Woody snippets blocks in Gutenberg always show first snippet in dropdown menu

jhotterb

New member
Messages
4
Likes
0
Points
1
#1
When you add a Woody snippets block in Gutenberg, you can select the snippet you want to use in the dropdown menu and optionally enter the attribute values in the "Block" section. This works well however if you update the page and then come back to it later, the block always shows the first snippet in the dropdown menu even though the correct snippet has been saved in the database. Strangely enough, if you reselect the correct snippet in the dropdown menu, the values you had entered the first time for the attributes appear in the "Block" section. I am only using PHP snippets so I don't know if it's also the case with Text and Universal snippets.

Jean
 

alexkovalev

Program developer
Staff member
Messages
267
Likes
19
Points
18
#2
Hi, Jean
Do you have a similar problem, as in this topic?
Gutenberg block works but…there is a bug? | WordPress.org

Please open the developer console on the page with the Gutenberg block and try to save. Here is the instruction how to open the developer console:
How to open the developer console in the most popular browsers? | Clearfy - wordpress optimization plugin and ultimate tweaker

Take a screenshot of the errors, they are highlighted in red or make a video that you see in developer console. This information will help me learn more about the problem.

Best regards, Alex
 

jhotterb

New member
Messages
4
Likes
0
Points
1
#3
Hi Alex,

I presume it's the same problem. I checked Safari console when saving and retrieving the page and I don't see any error (see first attached picture). Note that the problem doesn't seem to be when saving the page since the correct snippet is saved in the database. One more information. When you go back to the page and select the snippet block, the "Block" section show the correct attributes even though the wrong snippet is displayed in the dropdown menu (see second attached picture). In this page there are two snippets. First "DB connection" then "Travels code". Here, I selected the second block which shows "DB connection" in the dropdown menu while it should be "Travels code". "DB connection" snippet does not have any attribute and the "Block" section on the right shows the attributes for "Travels code".

Hope this helps,

Jean
 

Attachments

jhotterb

New member
Messages
4
Likes
0
Points
1
#4
Note that the problem is the same if there is only one snippet block in the page (see attached picture). In this case, the snippet should be "Event-group pictures code" which has the three attributes displayed on the right.
 

Attachments