Optimizely Forms Inline Block NRE

Hi there,

We have a site on CMS 13.2.0 and Forms 6.0.1.

When a user tries to create an inline form container block, there is an NRE thrown.

This is becuase the EPiServer.Forms.Controllers.FormContainerBlockController InvokeComponent method tries to access currentBlock.Content.ContentGuid, where Content is null when the block is created inline.

I've minimally recreated the error in an Alloy solution on the latest versions of Forms (6.0.2) and CMS 13 (13.3.0). Screenshot attached below of the content area (the default content area on the alloy homepage) and the error being caught in the decompiled Forms DLL.

Has anyone else seen this issue, and has a workaround/fix? Should we just disable inline blocks entirely if using Forms?

#343458
Oct 07, 2026 11:49
Mardy

I can reproduce this with CMS 13 and Forms 6.0.2 using the Alloy sample.

Creating the Form Container inline in a Content Area and browsing the published page results in the same NRE. Creating the Form Container as a shared block works correctly.

I checked FormContainerBlockController.InvokeComponent() as well. On the GET request, the controller creates a FormIdentity using currentBlock.Content.ContentGuid without a null check. In the inline case, I confirmed in the debugger that currentBlock.Content is null at that point.

The shared Form Container has its own content identity, while the inline Form Container is part of the page and does not have its own IContent identity. The Forms controller expects that identity when creating the FormIdentity.

For now, using a shared Form Container seems to be the practical workaround.

#343460
Oct 07, 2026 16:51
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.