EPi.CreatePageBrowserDialog can be called only once



I'm trying to use EPi.CreatePageBrowserDialog to show Page selector dialog in my Episerver plugin. The first call shows the dialog and user can select page, but I get an error in browser console:

dialog.js:155 Uncaught TypeError: EPi.AddEventListener is not a function

After closing the dialog all further attempts to open page selector fails with error:

dialog.js:133 Uncaught TypeError: Cannot read property 'epiDialogCover' of null

The same behaviour when I call EPi.CreateDateBrowserDialog.

Does anyone have any ideas on this? 

Thanks in advance!

EpiServer v.8.11

Apr 17, 2016 21:06

It's likely you have missed a few javascript files in your view. Please make sure that the following are included in the MVC view:

@Html.Raw(ClientResources.RenderResources("Dojo", new[] { ClientResourceType.Style }))

<script type="text/javascript" src="@EPiServer.UriSupport.ResolveUrlFromUtilBySettings("javascript/episerverscriptmanager.js")"></script>
<script type="text/javascript" src="@EPiServer.UriSupport.ResolveUrlFromUIBySettings("javascript/system.js")"></script>
<script type="text/javascript" src="@EPiServer.UriSupport.ResolveUrlFromUIBySettings("javascript/dialog.js")"></script>
<script type="text/javascript" src="@EPiServer.UriSupport.ResolveUrlFromUIBySettings("javascript/system.aspx")"></script>

Edited, Aug 09, 2018 4:14
* 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.