X-data enabled by regex - not working?

Enonic version: 7.7
OS: MacOS

When upgrading from XP 7.2.3 with Content Studio 2.3.2 to XP 7.7.0 with Content Studio 3.3.0, I discovered that a couple of x-data forms that I had configured in site.xml suddenly disappeared from the UI. The x-data is applied to certain content types by using the allowContentTypes attribute and a regex, for instance:

<x-data name="my-x-data" allowContentTypes="^no.norsktipping.ntxp:(shadow|redirect)-page$" />

Our code has not been changed, still the form is no longer available in the content editor. I tried to remove the regex part from the attribute value, providing av single content type as plain text, which made the form reappear in the content editor.

I have not been able to identify any changes with regards to x-data in the releases notes. Has anyone experienced something similar? Could this be a bug?

Hi,

We experienced just the same thing. In 7.7 they changed things slightly, you must now put a * anywhere in that pattern to activate the regex-ness of it. For us we just added it after -page for one x-data, and for a non-vital part of the app name in another, like no.. Without the * XP7.7 will not interpret your pattern as regex, only as a plain old string.

Hope that solves your issues today, and that eventually Enonic mends this somehow.

1 Like

The fix for this issue is coming in XP 7.7.1 (most likely) this week.

2 Likes

Thank you, adding an asterisk in the expression did the trick :+1:

1 Like