Intermittent console error and trying to understan...
# suitecommerce
c
Intermittent console error and trying to understand why. Working on an extension for SC 2020.1 where I am extending the ProductLine.Stock.View using layout.addToViewContextDefinition(‘ProductLine.Stock.View’. What I am finding is every other page refresh, I get the following console error. INVALID_PARAM: The specified view_id (ProductLine.Stock.View) is not valid for the current component or the callback is not a function. Is there any reason why this error shows up? I have also tried using the PDP and PLP component, however I still get the error.
Bump
s
I don't know for sure, but it could be that your code is being called before the view you're trying to modify is ready. Can you bind your code to a loading event? Eg, beforeShowContent?
c
I will try binding the code
Still getting the same intermittent message… Exception on event handler for event beforeShowContent INVALID_PARAM: The specified view_id (ProductLine.Stock.View) is not valid for the current component or the callback is not a function.
k
@Christopher Dembek, i’ve been running into this error as well, but not for all views. I’ve had to prototype the view as a quick fix.
c
@Kearobi perhaps @Steve Goldberg or @Flo Meilan can assist