Any pointers of where to look when the SEO Page Ge...
# suitecommerce
s
Any pointers of where to look when the SEO Page Generator (seodebug=T) throws
Can't find variable: define
?
Copy code
Can't find variable: define at global code (<https://zr.staging.zxz-dev.com/sca-dev-2020-1/extensions/shopping_1.js?t=1603388405370:7303>)
I've seem to have eliminated all ES6 (let, const, =>, etc.) in our Extensions' code, so don't know where else to look. Full log in comments. Any guidance is greatly appreciated!
Copy code
Debug output:
[16:22:14.526] [    +1 ms ] Requested URL with SEO generator relevant params: <https://zr.staging.zxz-dev.com/?preview=43523434735245235&seodebug=T>
[16:22:14.526] [    +0 ms ] Source URL: <https://zr.staging.zxz-dev.com/sca-dev-2020-1/shopping.ssp?preview=43523434735245235&seodebug=T>
[16:22:14.526] [    +0 ms ] Rewrite Path: /s.nl?sitepath=/sca-dev-2020-1/shopping.ssp
[16:22:14.692] [  +166 ms ] Generated the frame page for the requested URL
[16:22:16.912] [ +2220 ms ] Got a response from Prerender
[16:22:16.914] [    +2 ms ] Memory usage:      5.484375MB
[16:22:16.914] [    +0 ms ] CPU usage:         0.120000s
[16:22:16.914] [    +0 ms ] Sub request total: 0.448000s
[16:22:16.914] [    +0 ms ] Details of 8 sub requests:
               GET <https://zr.staging.zxz-dev.com/sca-dev-2020-1/public/shopping.environment.ssp?lang=en_US&cur=null&X-SC-Touchpoint=shopping&t=1603388405370> [status 200]
               Requested at 2024-03-18T23:22:14.916Z and responded by 2024-03-18T23:22:15.017Z (which took 101ms)
               GET <https://zr.staging.zxz-dev.com/sca-dev-2020-1/public/shopping.environment.shortcache.ssp?X-SC-Touchpoint=shopping&t=1603388405370> [status 200]
               Requested at 2024-03-18T23:22:14.916Z and responded by 2024-03-18T23:22:15.015Z (which took 99ms)
               GET <https://zr.staging.zxz-dev.com/sca-dev-2020-1/languages/shopping_en_US.js?t=1603388405370> [status 200]
               Requested at 2024-03-18T23:22:14.917Z and responded by 2024-03-18T23:22:15.016Z (which took 99ms)
               GET <https://zr.staging.zxz-dev.com/cms/3/cms.js> [status 200]
               Requested at 2024-03-18T23:22:14.917Z and responded by 2024-03-18T23:22:15.026Z (which took 109ms)
               GET <https://zr.staging.zxz-dev.com/sca-dev-2020-1/extensions/shopping-templates_1.js?t=1603388405370> [status 500]
               Requested at 2024-03-18T23:22:14.917Z and responded by 2024-03-18T23:22:15.025Z (which took 108ms)
               GET <https://zr.staging.zxz-dev.com/sca-dev-2020-1/javascript/shopping.js?t=1603388405370> [status 500]
               Requested at 2024-03-18T23:22:14.918Z and responded by 2024-03-18T23:22:15.026Z (which took 108ms)
               GET <https://zr.staging.zxz-dev.com/sca-dev-2020-1/extensions/shopping_1.js?t=1603388405370> [status 200]
               Requested at 2024-03-18T23:22:14.918Z and responded by 2024-03-18T23:22:15.081Z (which took 163ms)
               GET <https://zr.staging.zxz-dev.com/api/cms/v2/sites/domain> [status 200]
               Requested at 2024-03-18T23:22:15.118Z and responded by 2024-03-18T23:22:15.227Z (which took 109ms)

[16:22:16.914] [    +0 ms ] Logs generated by console.log():
               [    +0 ms ] ReferenceError: Can't find variable: define
                            	at global code (<https://zr.staging.zxz-dev.com/sca-dev-2020-1/extensions/shopping_1.js?t=1603388405370:7303>)

[16:22:16.914] [    +0 ms ] *** All requested URLs with headers (begin) 
[16:22:16.915] [    +1 ms ] Header count: 9
[16:22:16.915] [    +0 ms ]
s
shopping_1.js?t=1603388405370:7303 So, shopping_1.js, line 7303
s
Yes, but that just points to this:
😕 1
Which is where extensions are added at the end of the file
s
Well, if you expect it's because of ES6 then I would start searching the file for telltale signs of ES6 -- use the keywords you mentioned above plus the syntax
g
If the NetSuite account is already in 2024.1, I'd say it's the same error as this one: https://netsuiteprofessionals.slack.com/archives/C29HR0BFG/p1710537586104319 You have a couple 500 internal error here: GET https://zr.staging.zxz-dev.com/sca-dev-2020-1/extensions/shopping-templates_1.js?t=1603388405370 [status 500] Requested at 2024-03-18T232214.917Z and responded by 2024-03-18T232215.025Z (which took 108ms) GET https://zr.staging.zxz-dev.com/sca-dev-2020-1/javascript/shopping.js?t=1603388405370 [status 500]
s
Thank you @GustavoBR @Steve Goldberg Is there a defect number so I can report this?
👍🏽 1