I'm cutting my teeth on Blocks, so I started with a simple app. The app is released and installed on a free site I'm using for development. I have defined a custom event in the blocks editor, which appear in the API panel of the Blocks Editor. The widget in the site editor works (it runs onReady), but the event does not appear in the Events & Properties Tab, so I can't catch the event.
#Widget events (and properties) not showing in site Events & Properties Tab
15 messages · Page 1 of 1 (latest)
@restive bough
//site code
$w('#myWidget').onStateChange((event)=>{console.log(event)});
The logs above and below are all from the widget. The widget works as expected, except for catching events at the site level.
I'm using a Wix free site for app development and SDK. Since I'm using the local editor for my premium site, maybe I'd be better off with the Wix CLI approach, from what I've read about it so far.
Is the element the widget id in page?
Yes. Also, I can't get Wix logs working. Could this be a free site issue?
I asked the assistant about the onStateChange method - that's a multi-state box method. (I also tried onPropChange, but that is a $widget() method/callback. )
No issue with free site.
(I keep forgetting to use the reply button.)
Hmmm - I think I'll try the CLI approach
Correctly released the test version?
It's not too complex to setup. And the code panel should not be showing any issues
Maybe do a simple proof of concept
I've been using release versions
The app is simple, no CMS, but it does have an embedded widget, all of which is working. I'm definitely in the proof-of-concept stage.
OK - everything works if I use a test version. Possibly the free sites don't let you use release versions?
Duh - I just realized that StateChange is the name of my custom event. 😅
Now I have to figure out how to put the green checkmark on this thread to indicate resolved.
Thanks a million!
Glad you got it