Snippets are removing my form tags

Is anyone else experiencing this problem? We are running the latest version of Squiz and we want to use some DRY JS scripts to do repetitive tasks (like toggle hide/show divs in a form page).

 

So we have set the snippet up and everything and then created a new body copy in the page and used the snippet content type. What happens is that this snippet somehow removes the <form> tags from the page I've applied it to (custom form).

 

I've done some testing and found out what causes this, its the comment code. If I use the specific Squiz comment format that hides the comment from the 'view page source' like so:

<!--@@ comment is here @@-->
/*@@ another code comment here @@*/

This is what breaks something in the page and removes out the form tags and god knows what else. Would this be considered a bug? If I use the normal code comment syntax (without the @ symbols) the page/snippet work fine.

 

I'd really like to continue to use the Squiz code comment feature as its nice to keep some comments for the devs only ;)

1 Like

Update: this is not actually caused by using snippets. This is caused by using the Squiz Matrix comment syntax directly into the raw format bodycopy. Be really good if there was a solution to this as we use this comment syntax quite alot!

 

So whether its using snippets with Squiz Matrix comment code or inserting the comment code straight in - this problem persists in custom form page assets.

Hi there, I cannot replicate this in Matrix 5.3.2.0. 

 

I just created a Custom Form with a customised Page Contents.

 

In the Page Contents I print the %form_contents% and added <!--@@ comment is here @@-->

 

Is this the proper replication steps?

Yeah you are right. I just tried doing the same thing on another form on another website we host in Squiz Matrix and encountered no issues.

I think it must be something in the design or other nested content that is being affected by the comment syntax. The site that I am having problems with is an intranet behind a firewall.