Use PDIs? Take our 5-minute survey to help shape the PDI roadmap.

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.

14 REPLIES 14

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

wildermount
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

 

yogeshpoyyara
Mega Expert

I came across this issue and noticed that both the client controller and controllerAs  are set to “c". However, when the widget is opened and edited in the Widget Editor (/sp_config?id=widget_editor), the configuration can be saved successfully without any errors or validation issues. I have created several widgets but never has faced this before.