Hi All, I'm facing an weird Issue with the local f...
# suitecommerce
s
Hi All, I'm facing an weird Issue with the local files. When I try to run the gulp extension:local I'm seeing the errors with few objects like Profile Model, Ajaxrequestkiller etc. I tried to get the Instance using AjaxRequestsKiller.getKillerId() . It work's fine when I deploy it and I'm not able to see any errors in the live site but in local It's throwing an error saying that AjaxRequestsKiller is not a function. When I tried to add the syntax like this (AjaxRequestsKiller. AjaxRequestsKiller.getKillerId()) it's working fine in local. The same thing happening with profile model. I need to refer the objects two times to get it working in the local system. Does anyone encountered the same Issue?
c
Have you enabled “EXTENSIBILITY LAYER SAFE MODE” in the configuration? Advanced tab > Extensions > EXTENSIBILITY LAYER SAFE MODE
s
Hi Chris, Thanks for the response. I couldn't able to see the extensions tab in the configuration record
message has been deleted
c
What version are you on?
s
SuiteCommerce Advanced - Dev 2020.1
Extension Developer Tools - 2020.2.3
@Christopher Dembek Did you ever encountered this Issue? Is it resolved by enabling the checkbox you mentioned? Can you please confirm that?
c
No, I have not encountered an issue. Without seeing the code, it is difficult to troubleshoot. The correct markup should be
AjaxRequestsKiller.getKillerId()
and not
AjaxRequestsKiller.AjaxRequestsKiller.getKillerId()
. However, I encourage you to read the following article, specifically Allowed Core Modules. https://developers.suitecommerce.com/build-sustainable-and-stable-extensions.html
In the define/function, have you included
AjaxRequestsKiller
?
s
Thanks Chris for the suggestions. Yes, I have Included the module at the top. The Issue is not only AjaxKiller, It is also with Profile model. When I try to get the Instance using ProfileModel.getInstance() then It's throwing an error saying ProfileModel.getInstance() is not a function. When I try to refer ProfileModel.ProfileModel.getInstance() then It's working.