Mendix Academy - Crash Course - Module 11 - Widget Loading Error

0
Hello! I’ve been working through the Crash Course training in Mendix Academy (the one for developers). I got through Module 11 where you’re creating a custom JavaScript widget, and when it came time to run the app at the end of the module to see the new widget, I went to the page the widget was on and was greeted with the error message seen in the picture below. If the text on the picture for whatever reason can’t be read, it says “Unknown widget ‘summerhill hospital shiftcalendar.ShiftCalendar’.” I had followed the module instructions to the letter for JavaScript, so I’m not quite sure why I came up with this error. My Shift_Overview page didn’t pop up on my security module, so I’m wondering if that has something to do with it, but I’m not sure how that would be connected to anything. If needed I can also provide code screenshots as well. I’m super new to Mendix so if there’s something I missed then please let me know haha. Also I can’t select the Mendix version below, but I’m using Mendix Studio Pro 8.15.2. Thanks so much in advance!
asked
3 answers
2

I just worked  through the Module 11 of Crash Course training and used JavaScript for creating the Pluggable widget. I also had the same problem.

After several times of trial and error, I finally can get the widget work after doing some changes.

  1. In ShiftCalendar.jsx, append “export default” before “class ShiftCalendar extends Component”.

 

  1. In CalendarContainer.jsx, change variable name “allViews” to “weekViews”.

answered
0

Did your build succeed and if so did you press F4 in Mx StudioPro to refresh whatever is created on the local directory? The 'Shift Calendar’widget should be visible in MxStudio Pro when you have a webpage open.

 

Hm, your problem was later, when you ran the project and viewed the page. Got the same problem following the typescript version.

answered
0

Mendix has released a new version of this course that no longer has this error.

answered