Community forums
Hello world Widget
Quote from Pritesh Dhameliya on March 13, 2020, 5:30 pmI have taken Akumina developer training and build a simple Hello world widget 4 months ago. It is working fine but when I started from scratch and following all the steps as per the instruction now, it is not working. I can build the widget, package and deploy successfully. when I add the widget instance on the page, it is not loading the widget. I looked at the Akumina debug window. It says "Widget Type not found". Widget Class: blank
I can see below the error in the debugger tool window.
WidgetIssue: Could not find widget apart of 'ec7cc713-6660-4512-ba59-0148ab55423c', please contact your developer (Cannot read property 'Widgets' of undefined).
I have tried with regenerate widget cache.
https://community.akumina.com/community-forums/topic/error-loading-sitebreadcrumb-widget/
I have kept alert message in Init function but it seems it is not reaching to Init function.
I have taken Akumina developer training and build a simple Hello world widget 4 months ago. It is working fine but when I started from scratch and following all the steps as per the instruction now, it is not working. I can build the widget, package and deploy successfully. when I add the widget instance on the page, it is not loading the widget. I looked at the Akumina debug window. It says "Widget Type not found". Widget Class: blank
I can see below the error in the debugger tool window.
WidgetIssue: Could not find widget apart of 'ec7cc713-6660-4512-ba59-0148ab55423c', please contact your developer (Cannot read property 'Widgets' of undefined).
I have tried with regenerate widget cache.
https://community.akumina.com/community-forums/topic/error-loading-sitebreadcrumb-widget/
I have kept alert message in Init function but it seems it is not reaching to Init function.
Quote from Scott Kearney on March 18, 2020, 9:48 amPritesh - most likely your namespace is different than what you have in your config.
In the browser developer console, for what you have listed as your namespace, if you type it in, does it return the class? Or undefined? For example, if your widget is
MyCompany.Widgets.SomeWidget
What is returned in the developer console for it?
If nothing, then try this:
In your webpack.config.js file in the developer tools (VS Code):
var jsClientName = "Akumina"; //[ClientName].Widgets.WidgetNameJust note, whatever you have configured here will determine the name of the widget. So if your namespace isMyCompany.Widgets.SomeWidget
and in that file you have Akumina, the widget will be created as
Akumina.Widgets.SomeWidget
Which you can also see in the browser's developer console.
Pritesh - most likely your namespace is different than what you have in your config.
In the browser developer console, for what you have listed as your namespace, if you type it in, does it return the class? Or undefined? For example, if your widget is
MyCompany.Widgets.SomeWidget
What is returned in the developer console for it?
If nothing, then try this:
In your webpack.config.js file in the developer tools (VS Code):
MyCompany.Widgets.SomeWidget
and in that file you have Akumina, the widget will be created as
Akumina.Widgets.SomeWidget
Which you can also see in the browser's developer console.