Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jacob 41 posts 90 karma points
    Jan 29, 2014 @ 22:01
    Jacob
    0

    Error when saving document type properties: "Value is invalid, it does not match the correct pattern "

    Hi,

     

    I've created several document types and setup news/event feeds before with Umbraco, but lately I'm receiving an annoying error upon attempting to save a "News Item" under my News node.  The error states:

    "Value is invalid, it does not match the correct pattern"

     

    This is of course referring to the values I'm inputting for Textstring and RichTextEditor properties.  However, I have not configured any Regex validation for these fields and there is no reason this error should be occurring.  This is preventing content from being published, because Umbraco refuses to publish content it believes to contain errors, and of course it is making it difficult to review my work.

    The following link shows some insight regarding how this error occurs: 

    https://github.com/umbraco/Belle/blob/master/Umbraco.Belle/System/PropertyEditors/RegexValueValidator.cs

     

    That being said, this error is obviously attributed to the if (!regex.IsMatch((string)value)) line of code indicated on that page.  This doesn't make sense though, because Umbraco shouldn't be trying to use Regex to validate these fields in the first place; furthermore, there is nothing wrong with the values I'm inputting for a STRING property.   The values should be recognized as a string instead of being flagged for not matching some sort of pattern.

     

     

    Does anyone have any insight on why this is occurring and what can be done to circumvent this issue?

     

    Thank you,

     

    J Mills

  • Jacob 41 posts 90 karma points
    Jan 31, 2014 @ 15:12
    Jacob
    0

    Is this a bug associated with Umbraco 7?

  • Jacob 41 posts 90 karma points
    Jan 31, 2014 @ 15:36
    Jacob
    0

    It would seem that my content documents became corrupted over time somehow.  I resolved this issue after deleting the affected content pages and their associated document types and recreating them.

  • Charles Afford 1163 posts 1709 karma points
    Feb 01, 2014 @ 14:45
    Charles Afford
    0

    If you make the property a singlelinetext is there anything in the property?  maybe its picking something up?  Charlie

  • Jacob 41 posts 90 karma points
    Feb 01, 2014 @ 16:33
    Jacob
    0

    I tried both singlelinetext and richtext for the properties of my document type; however, in this scenario I received the mentioned error no matter what I attempted to save on the content page associated with that document type.  For example, I could enter blank text (none of the fields had validation or requirements), text without spaces, numbers, or anything else and I'd receive the error:

    "Value is invalid, it does not match the correct pattern"

     

    As I stated earlier, it was not until I deleted the document type and content pages and recreated them before the issue was resolved.  It's interesting because the source code from the following resource suggests this issue is regex related:

    https://github.com/umbraco/Belle/blob/master/Umbraco.Belle/System/PropertyEditors/RegexValueValidator.cs

     

    Of course, there was no regex validation associated with these fields and document types, so it would seem that Umbraco corrupted the files over time, which prompts this error to occur any time an attempt is made to create/edit associated content.

  • Charles Afford 1163 posts 1709 karma points
    Feb 01, 2014 @ 21:43
    Charles Afford
    0

    I have not experienced this on a new install of umbraco 7,  The only time i have had it is when i have switched doc types when the old data from the old type is then used in the new type.  If you can replicate it, please add it to the bug report @ http://issues.umbraco.org/dashboard

    Charlie :)

Please Sign in or register to post replies

Write your reply to:

Draft