Error in EPiServer Self-Optimizing Block
This blog post is just to inform about a bug in EPiServer Self-Optimizing Block that other might encounter. I have reported it to support so it will be handled.
We are using EPiServer Self-Optimizing Block to test different versions of blocks on the site and now we have noticed that there are a error in this addon when it contains a block with a xform in it. The error is that the postback in the xform does not work and the user ends up on a erro page instead of the thank you page, like this:
We solved it by removing the Self-Optimizing Block so now the xform works but we are not able to test different versions of it.
If you would like to try it out yourself it can be reproduced in a standard Alloy site like this:
1: Create a new Alloy MVC site with the Visual Studio AddOn (the error is in both 7.19 and 8.2)
2: Add the addon EPiServer Self-Optimizing Block with nuget
3: Run the site and first create two FormBlock that use the Contact Us form
4: Create a Self-Optimizing block that use the two blocks you have just created
5: In one page add one of the formblock and add the other one on another page
6: In a third page add the Self-Optimizing block you have just created
7: Verify that the formblock works by trying them on the pages you have added them on
8: Try out the Self-Optimizing block and now you will have a error page when posting it.¨