EPi.CreatePageBrowserDialog can be called only once

Vote:
 

Helllo!

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

#147516
Apr 17, 2016 21:06
Vote:
 

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 }))
@Html.Raw(ClientResources.RenderResources("ShellCore"))
@Html.Raw(ClientResources.RenderResources("ShellWidgets"))
@Html.Raw(ClientResources.RenderResources("ShellCoreLightTheme"))
@Html.Raw(ClientResources.RenderResources("ShellWidgetsLightTheme"))
@Html.Raw(ClientResources.RenderResources("Navigation"))

<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>

#195837
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.