Is there a way to add the the json-ld schema? or d...
# suitecommerce
k
Is there a way to add the the json-ld schema? or do we just have to add it in the templates?
k
Thanks Steve
s
You will need to scroll up and click "Show Inherited" first 😄
And as that implies, it's inherited by every other visual component, so you can use PDP.modifyViewJsonLd() for example
k
Yes - I found it. So within the function I can get use something like pdp.getItemInfo() to get the values I need to add I am assuming
s
I haven't tried it but that sounds right to me
k
ok - will report back ;>)
Just noticed that enabling this feature causes cms pages not to load so I think we need to turn it off.
s
Eh?
k
yep….blank cms pages
s
I'm not seeing that. Could you share more details?
k
here’s an example on a dev site https://tb.designedinthecloud.com/Shipping-Information
it is fine in Chrome, not so much in Firefox
s
Well I'm not seeing either of them work for me
Different errors in each
Ah no, same problem just different description of the error
k
ha - im running local in chrome so thats why its working for me
s
Ah ok. So you're not using modifyViewJsonLd... you've just switched over to using JSON LD
My guess then is that you haven't configured the properties for this page correctly
k
yes - we just flipped it in configurations….is there something else that needs to be done?
suiteanswers doesnt have much info
s
Not as far as I know
Is it all CMS pages or just this one
k
supposedly all
wondering if there is some third party conflict
hmmm….still an error with GTM out
Not seeing the issue in other accounts.
s
Yeah I spent some time looking around. I'm not sure why it's happening. The deepest I went was looking at how the breadcrumbs are being created, considered that's where the error is being thrown
SC.ENVIRONMENT.CMS.pages.pages
shows that your pages look properly configured
The trick would be to see what object is being passed to the breadcrumb generator just before it tries it but, with SCS that's a bit tricky as you can't edit the source files and add in some logs
Something like:
Copy code
var gvbcv = require('GlobalViews.Breadcrumb.View');
gvbcv.prototype.getJsonLd = _.wrap(gvbcv.prototype.getJsonLd, function (fn) {
    var method = fn.apply(this, _.toArray(arguments).slice(1));
    console.log(this.pages);
    return method
})
Could work but I'm pretty sure it will error before this could gets to run
My other thought was that it doesn't like pipes (|) in names but that didn't seem to error on my site
k
OK - that is where I’ll start….we have a customization around that
s
oh
well then yeah
lol
k
basically just using the name rather than the page title
and its broken for some other reason - it was next on my list so must be related
I de-activated the offending extension, reset the json-ld, and now the cms pages are fine. I have moved that extension up in priority to fix