Client controller must contain a JavaScript function, see default value error

--oooo--
Tera Contributor

Hello All,

I am trying to make a clone of my custom widget but when clicking on the clone widget button I am getting an error.

I have attached the error screenshot below of why I am getting the error .can anyone please guide me on this?

Thank You.

13 REPLIES 13

j0unss
Tera Expert

Hi @--oooo--,

 

I had this exactly same error in our system when editing widgets, it was because there were too many or too few spaces in Client Controller code, see example below. After editing the code I was able to save my widget.

j0unss_0-1707380399712.png


Br,
j0unss

Robert Smith
Tera Expert

I got this error while trying to clone in the platform view, but was able to clone in the widget editor by using the options in the hamburger menu. 

Screenshot 2024-06-21 at 2.04.52 PM.png

Divya1231
Tera Contributor

client controller must starts with api.controller at line no1 only. here in the screenshot we have space at line no1. remove the first line space and try it will work.

shubhashri
Tera Contributor

I am also facing the same issue... Please find below screenshot

shubhashri_0-1731848437432.png