Required attributes on asset builder asset for comment


#1

Matrix Version: v5.3.4.0

I created an asset builder to create Comment asset. At the moment it is very simple. On both Not Logged In and Logged In I added the following:

%create_error%
%create_form%

All is working fine until I added required attributes. I want to make both Name and Comment required. By default it is only Name that is mandatory as it is the asset name (I can’t however find where I could customise the error message for this).

So on the Required Attributes screen I made Name and Comment mandatory with customised error message. After this, my create asset stops working. It keeps on telling me that the Name and Comment are missing even though I have typed in both of them.

Please help. I might have missed something obvious.


(Tbaatar) #2

Hi,

It used to work in Matrix 4, when we upgraded to early version of Matrix 5 the required attribute for comment failed. This was a known bug and I’m not sure if this was ever fixed. The alternative solution is to apply a Metadata as comment and then use the required attribute on that metadata.

Hope it helps.


#3

Thanks for your info @tbaatar.

I am hoping someone from Squiz would be able to confirm that the bug has not been resolved?


(Tbaatar) #4

From what I can see in Matrix 5.4.3.1 it works.

I should think the version you are on would have had a fix for it already.
Worth waiting for an answer from Squiz guru.


(Bart Banda) #5

Yes, this was a bug that was fixed in 5.3.4.1 https://squizmap.squiz.net/matrix/8899

I suggest you contact Squiz to get your system patch upgraded if this is an issue holding you back.

As a workaround, you could just use client side validation to ensure the comment field is filled out perhaps? Even use the HTML5 required attribute on the input field for the comment?


#6

Thanks for your confirmation @Bart. It is not holding us back at the moment and I think an upgrade has been considered to happen early next year.

So all good … I just wanted to make sure it wasn’t me doing something incorrectly.