Clicking on Code Block generates huge bug

The code in Code Block does not generate any error.
Here is the code:

$field = '';
$fields = '';
$fields = get_field('clubvisiteur');
if( $fields ) {
	foreach( $fields as $field ) {
		$field_id = $field->ID;
		echo '<a href="' . get_permalink( $field_id ) .'">' . get_the_title( $field_id ) . '</a>';

but clicking on the display generates a huge error. Sometimes, a refresh of page is requested because of a massive error that stucks everything.

Clicking on the Code Block in navigator does not generate any error.
See the belowed video:

Environment info

  • WordPress version: 6.0.2
  • Gutenberg Plugin version: not installed
  • Cwicly Plugin version:
  • Cwicly Theme version: 1.0.3

Hi @weedor,

This isn’t specifically related to Cwicly as the Site Editor by the WordPress team doesn’t manage links properly and allows interaction with them.

We have added an option to the Code block → Prevent Clicks which should allow you to interact with the Code block without having to interact with the markup it generates.

Hope this helps. If you have any suggestions, remarks, please don’t hesitate.

1 Like

Sorry @Louis but I didn’t find where is the setting: Code block → Prevent Clicks
I looked at settings, Role editor, etc.
Can you help again please.

Hi @weedor,

On the code block itself. We preferred going down this route so that you can oscillate between different interactions states depending on your preferences for the code you input.

1 Like

Thank you @Louis