I have an issue that after I added a gadget on the dashboard, initially it displayed the whole dashboard correctly but after I refreshed the page, dashboard became empty.
Link to the screenshot: http://imgur.com/a/QUTbU
The gadget I added is my custom gadget which has a controller in the same project. Here is the code how I defined it.
[Gadget(Title = "Sales statistics")]
public class SalesStatisticsGadgetController : Controller
public ActionResult Index()
// action code here
But there were also other gadgets. This happens on the server but locally where I have only this gadget, it works fine.
Episerver log is empty. No errors or warnings.
What could happen with it and how to fix it?
Any JS error?
No, nothing in the Chrome Dev Tools console. Also, on the Network tab every request is 200.
I remember for adding new gadget needed to add this:
<add assembly="GadgetAssembly" />
And without this, it was working sometimes.
I found out that when I locally add Order Gadget, I get the same behavior.
I see in the module.config in the root of my site that it has assembly added like:
<add assembly="My.Web" />
As the gadget controller is in the My.Web project (same as the whole website).
After some testing, I found out that it doesn't like my gadget together with any of the Commerce gadgets. When I add my gadget and one of the Commerce gadgets - Order Gadget or Overview, then it stops working.
But it works fine when my gadget is added together with other gadgets. For example, BVN.404 redirect gadget.
Try to enable <clientResources debug="true" /> in the <episerver.framework> section. This will load the unminifed JS files and output more information in the console. Just make sure do not run this in production.
Thanks, Magnus, it did help to track the issue.
I found out that MenuPin caused that behavior. When I comment out it in my module.config, then everything works.
Now have to find out the way how to make it work with MenuPin enabled.
© Episerver 2017 |
About Episerver World