Skip to content

Missing XFormFolders in EPiServer

January 16, 2017

Last week I had problems with missing xform-folders. I do not know if it has something to do with upgrading to EPiServer 10. It’s after upgrading to 10 I stepped into the problem.

When you click on a xform-property you get to the xform-selector, ~/EPiServer/CMS/edit/XFormSelect.aspx?form=THE-FORM-GUID. Choosing the folder-option “All forms” made it crash with a NullReferenceException. It turned out that som xforms belonged to xform-folders that no longer existed.

Looking at EPiServer.XForms.XFormFolder with a decompiler gives that the root-folder guid is 89ED3722-9625-4de2-BEC6-ECDD162DCBDC. So I wrote the following SQL to find missing XFormFolders:

DECLARE @Guid UniqueIdentifier = '89ED3722-9625-4de2-BEC6-ECDD162DCBDC';
 
SELECT
	DISTINCT(Guid01)
FROM
	tblSystemBigTable
WHERE
	StoreName = 'XForms' AND
	Guid01 <> @Guid AND
	Guid01 NOT IN (SELECT [Guid] FROM tblBigTableIdentity WHERE StoreName = 'XFormFolders')
ORDER BY
	Guid01;

And to upgrade all references from the missing folders to the root-folder i used:

DECLARE @Guid UniqueIdentifier = '89ED3722-9625-4de2-BEC6-ECDD162DCBDC';
 
UPDATE
	tblSystemBigTable
SET
	Guid01 = @Guid
WHERE
	StoreName = 'XForms' AND
	Guid01 <> @Guid AND
	Guid01 NOT IN (SELECT [Guid] FROM tblBigTableIdentity WHERE StoreName = 'XFormFolders');

After that my problem was solved.

Advertisements

From → EPiServer

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: