Export button function bug

workerLogger.js:78 function buttonSearch_click is registered as a static event handler but is not exported from the page code. Please remove the static event handler or export the function.

Before it was working and now no … the button handler have been add in the properties panel


(anonymous)@

Have you double checked that the handler is still assigned? If it is, try deleting the connection from the properties panel and recreating the function. (Would love to know if this works, because I realize this is a couple months old).

I am having this same issue, and I have tried everything. Deleted and added back, names the function something different, readded the button, but nothing seems to work.

Does anyone know how to fix this?

This is how I was able to fix the problem when it happened to me.

$w.onReady(function () {
    $w('#totehmize').onClick( (event) => {
        ''' Your logic here '''
    });
}

I put what I needed in the onReady function and it was able to work. or you could also try this.

$w.onReady(function () {
    $w('#totehmize').onClick( (event) => {
        totehmizeFunction(event)
    });
}

export function totehmizeFunction(event){
    ''' Your logic here '''
}

I did it this way on another website and it worked for me as well.
Hope this helps!