We have pushed updates to the Product Reviews and ...
# suitecommerce
s
We have pushed updates to the Product Reviews and Product List bundles. A patch for SCA sites is also required if you intend to use them: https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/article_4160229131.html#subsect_0108120330
šŸ‘šŸ» 1
g
I’ve got loads of these product list patches to install. First couple are the same. I’ve updated the code and deployed. I’ve updated the custom role on the service files. Everything seems to work in shopping but in my account all the lists are empty. Any idea what I missed?
s
That doesn't sound right.
šŸ¤·ā€ā™‚ļø 1
I can't find any open issues around that. We did recently fix an error in 24.2.10 with product lists where newly created lists returned an error and an empty set of lists
Raise a case if you're sure it's a bug
g
Just realised it’s the same in shopping. It finds the lists but they’re all empty.
No error.
s
No error? Hmm
And the service response is an empty array?
g
Copy code
,"items":[]}
s
wwhhhuttt
g
oh ok, here’s a full response. Should have a load of items in the list:
Copy code
{
  "internalid": "933",
  "templateId": "",
  "name": "BollƩ brands",
  "description": "",
  "owner": {
    "id": "4734",
    "name": "1000103 Fr Test"
  },
  "scopeId": "2",
  "scopeName": "private",
  "typeId": "1",
  "typeName": "default",
  "created": "24/11/2022 4:09 PM",
  "lastmodified": "24/11/2022 4:09 PM",
  "lastmodifieddate": "24/11/2022",
  "items": []
}
s
Yeah, I got nothing šŸ¤·šŸ»
g
ok, I’ll see if I can debug is somehow.
Is the ns.package.json wrong in the patch somehow?
s
If you mean the weird curly brace then yes
I've already flagged it with the tech writer
Did fixing that fix your problem?
g
Also it mentions Configuration.js is that wrong too. What should it be. I tried to fix it and I get the feeling it’s not overrwriting properly.
s
... yes? Why does it say Configuration.js?
g
{ ā€œgulpā€: { ā€œjavascriptā€: [ ā€œJavaScript/*.jsā€ ] }, ā€œoverridesā€: { ā€œsuitecommerce/{ProductList@X.Y.Z/SuiteScript/Configuration.jsā€ : ā€œSuiteScript/ProductList.Item.Model.jsā€, ā€œsuitecommerce/{ProductList@X.Y.Z/SuiteScript/Configuration.jsā€ : ā€œSuiteScript/ProductList.Item.Search.jsā€, ā€œsuitecommerce/{ProductList@X.Y.Z/SuiteScript/Configuration.jsā€ : ā€œSuiteScript/ProductList.Model.jsā€, ā€œsuitecommerce/{ProductList@X.Y.Z/SuiteScript/Configuration.jsā€ : ā€œSuiteScript/ProductList.ServiceController.jsā€ } }
s
Why is it also specifying that it should include JavaScript and not SuiteScript
g
I’ve no idea. This seems very wrong to me, but I can’t seem figure out the magic correct answer.
s
Well it should include SuiteScript and not JavaScript
And as the docs say, we are overriding ProductReviews.Model.js not Configuration.js
g
I think this is what it should be. Still no items for me. I’ll keep trying.
{ ā€œgulpā€: { ā€œjavascriptā€: [ ā€œJavaScript/*.jsā€ ], ā€œssp-librariesā€: [ ā€œSuiteScript/*.jsā€ ] }, ā€œoverridesā€: { ā€œCommons/ProductList/SuiteScript/ProductList.Item.Model.jsā€: ā€œSuiteScript/ProductList.Item.Model.jsā€, ā€œCommons/ProductList/SuiteScript/ProductList.Item.Search.jsā€: ā€œSuiteScript/ProductList.Item.Search.jsā€, ā€œCommons/ProductList/SuiteScript/ProductList.Model.jsā€: ā€œSuiteScript/ProductList.Model.jsā€, ā€œCommons/ProductList/SuiteScript/ProductList.ServiceController.jsā€: ā€œSuiteScript/ProductList.ServiceController.jsā€ } }
s
Which version are you patching?
g
Most of them are between 2019 and 2022. I’ve got 9 to sort 😩
s
Another problem with the docs is that they are written for old versions using the wrong paths
When you want to reference modules outside of the Advanced directory you have to do .. first
So ../Commons
g
I put my extensions folder outside of those folders.
s
Right, but did you do that when you updated the distro file?
Like am I being dense but surely this is wrong too?
Copy code
"modules": { "extensions/ProductReviews": "1.0.0", . . .
Shouldn't it be ../extensions/ProductReviews ?
g
The json I put in a couple of messages ago is definitely overriding now, but still no items. I’m trying to debug the saved search it’s using.
(Many hours later) This is what I’ve managed to work out. In the file ProductList.Item.Search.js > searchHelper it looks up the list of items using a suitescript saved search. The item type is null here where it should be something. const itemType = productListItemSearchRecord.getValue( ā€˜type’, ā€˜custrecord_ns_pl_pli_item’ );
I can fix this by defaulting this value to ā€œinventoryitemā€ if it’s null. or by changing the role to something beefy like ā€œCEOā€.
Seems like an issue with the new role to me.
s
OK, I have seen a couple of colleagues mention that this might be happening to some other customers too
šŸ‘ 1
Could you try using the original role but setting the Lists > Items > View permission?
g
That works! That’s annoying, one of the first things I did was try setting the items permission to Full and that didn’t work.
šŸ‘šŸ» 1
s
The team recognise this is as a problem. It currently only affects 25.1 instances, and an updated bundle is going to be pushed out that essentially implements what I just described
g
ok cool. At least it’s solved.
s
The team are also going to correct the incorrect code snippets in the docs too. Thanks for bringing both of these to my attention
šŸ‘ 1