Cannot find category for slug:xxxxxx in commercetools - commercetools

i am creating new products for commerce tools with the below data, but getting the slug exception.
categories:
key,externalId,name.de,slug.de,name.en,slug.en,name.it,slug.it,parentId,orderHint,webImageUrl,iosImageUrl
c5,5,Collection,collection,Collection,collection,Collection,collection,,0.0005,,
c551,551,The Home of Golf,collection-The-Home-of-Golf,The Home of Golf,collection-The-Home-of-Golf,The Home of Golf,collection-The-Home-of-Golf,5,0.000188,,
products:
productType,variantId,sku ,prices ,tax ,categories ,images ,name.en ,description.en,slug.en ,metaTitle.en,metaDescription.en,metaKeywords.en,name.de ,description.de,slug.de ,metaTitle.de,metaDescription.de,metaKeywords.de,name.it,description.it,slug.it,metaTitle.it,metaDescription.it,metaKeywords.it,creationDate,articleNumberManufacturer,articleNumberMax,matrixId ,baseId,designer ,madeInItaly,completeTheLook,commonSize,size,color,colorFreeDefinition.en,details.en,colorFreeDefinition.de,details.de,colorFreeDefinition.it,details.it,style ,gender,season,isOnStock,isLook,lookProducts,seasonNew,variantKey
main,1,M0E20000000EEUD,EUR 16875;EUR 11066 b2b;US-USD 16875;USD 11066 b2b;DE-EUR 13500;IT-EUR 13500;GB-EUR 13500;DE-EUR 13095#sunrise-store-berlin;EUR 17719#sunrise-store-vienna;DE-EUR 14445#sunrise-store-munich;DE-EUR 12960#sunrise-store-cologne;DE-EUR 12825#sunrise-store-hamburg;US-USD 13095#sunrise-store-boston-2;USD 17719#sunrise-store-chicago;US-USD 14445#sunrise-store-boston-1;US-USD 12960#sunrise-store-sanfrancisco;US-USD 12825#sunrise-store-newyork,standard,Collection>The Home of Golf,https://s3-eu-west-1.amazonaws.com/commercetools-maximilian/products/081403_1_medium.jpg,T-Shirt Majestic Filatures silver,,majestic-filatures-tshirt-E150904-silver,,,,T-Shirt Majestic Filatures silber,,majestic-filatures-tshirt-E150904-silber,,,,,,,,,,,E15 09 04 644,81403,M0E20000000EEUD,81403,majesticfilatures,no,,xs,0,silver,silver,,silber,,,,sporty,women,s15,,,,,M0E20000000EEUD
,2,M0E20000000EEUE,EUR 16875;EUR 11066 b2b;US-USD 16875;USD 11066 b2b;DE-EUR 13500;IT-EUR 13500;GB-EUR 13500;DE-EUR 13230#sunrise-store-berlin;EUR 15356#sunrise-store-vienna;DE-EUR 13230#sunrise-store-munich;DE-EUR 13905#sunrise-store-cologne;DE-EUR 14445#sunrise-store-hamburg;US-USD 13230#sunrise-store-boston-2;USD 15356#sunrise-store-chicago;US-USD 13230#sunrise-store-boston-1;US-USD 13905#sunrise-store-sanfrancisco;US-USD 14445#sunrise-store-newyork,,,https://s3-eu-west-1.amazonaws.com/commercetools-maximilian/products/081403_1_medium.jpg,,,,,,,,,,,,,,,,,,,,E15 09 04 644,81403,M0E20000000EEUE,81403,majesticfilatures,no,,s,1,silver,silver,,silber,,,,sporty,women,s15,,,,,M0E20000000EEUE
---------------------error log:
{
"stack": "Error: collection-the-home-of-golf\n at /mnt/c/commercetools-data/dist/lib/products.js:74:11\n at Array.map ()\n at withCategories (/mnt/c/commercetools-data/dist/lib/products.js:70:77)\n at /mnt/c/commercetools-data/dist/lib/products.js:241:17\n at Array.map ()\n at /mnt/c/commercetools-data/dist/lib/products.js:273:44\n at processTicksAndRejections (node:internal/process/task_queues:96:5)"
}

Thanks for your request, for this issue you will be better served by creating a support ticket on the commercetools support portal.
https://jira.commercetools.com/servicedesk/customer/portal/1
Please attach a sample product from your import file and the steps you take to import the file.
Best Regards
Brian

Related

Adding passages.fields parameter to Watson Discovery

I'm using IBM Watson Discovery. I'm using python to craete a discovery query. I want to add passages.fields query parameter to get the passage out gf html instead of text. I've tried the below code:
import json
from ibm_watson import DiscoveryV2
from ibm_cloud_sdk_core.authenticators import CloudPakForDataAuthenticator
authenticator = IAMAuthenticator('xxxxx')
discovery = DiscoveryV2(
version='2020-08-30',
authenticator=authenticator
)
discovery.set_default_headers({'x-watson-learning-opt-out': "true"})
response = discovery.query(
project_id='xxxxx',
natural_language_query='zero',
passages.fields: "html"
).get_result()
However, I'm getting the below error:
File "<ipython-input-92-730c62f58ce1>", line 18
passages.fields: "html"
^
SyntaxError: invalid syntax
Any help please?
Thanks,

Error "AADSTS50194: Application 'xxxxxxxx' is not configured as a multi-tenant application" when using 'azure/msal-browser' reactjs package

I have a SPA app that is trying to login to Azure AD using 'azure/msal-browser' reactjs package.
The app is set to use a single tenant authentication at Azure App registration.
The authConfig.js file is set to use single tenant Authentication as well, but i keep getting the error:
AADSTS50194: Application 'xxxxxxxx' is not configured as a multi-tenant application
I found similar posts but all then point to set authority parameter, what i had already done.
The scenario i am trying to implement is the silent login with page redirect. This is the official sample that i'm basing my implementation.
Here the steps to recreate:
install msal-browser
Configure the AuthConfig.js file according with your app registration:
const msalConfig = {
auth: {
clientId: "Application (client) ID",
authority: "https://login.microsoftonline.com/<Directory (tenant) ID>/",
redirectUri: "<app url(must be a allowed URL redirect for SPA application type)>"
},
...
export const loginRequest = {
scopes: ["openid", "User.Read"]
};
And the code to acquire the token:
import { PublicClientApplication } from "#azure/msal-browser";
import { loginRequest} from "../../authConfig";
// this is my simplified version of the method `getTokenRedirect` present in the sample.
export const acquireIdToken = async (msalInstanceParam) => {
const msalInstance = new PublicClientApplication(loginRequest);
const activeAccount = msalInstance.getActiveAccount();
const accounts = msalInstance.getAllAccounts();
const request = {
scopes: ["User.Read"],
account: activeAccount || accounts[0]
};
const authResult = await msalInstance.acquireTokenSilent(request);//throws http code 400 error with message 'AADSTS50194 ...'
return authResult.idToken
};
The funny thing is that i'm able to login successfully, be redirect to the SPA app, get the token, retrieve the user name from the token, but for some reason the app calls https://login.microsoftonline.com/common/oauth2/v2.0/token and i get this error in the console.
Any clues?
The browser log (updated):
[HMR] Waiting for update signal from WDS...
authConfig.js:36 [Thu, 23 Jun 2022 17:09:59 GMT] : #azure/msal-react#1.3.1 : Info - useAccount - Updating account
authConfig.js:36 [Thu, 23 Jun 2022 17:09:59 GMT] : #azure/msal-browser#2.22.1 : Info - Emitting event: msal:handleRedirectStart
authConfig.js:36 [Thu, 23 Jun 2022 17:09:59 GMT] : #azure/msal-react#1.3.1 : Info - MsalProvider - msal:handleRedirectStart results in setting inProgress from startup to handleRedirect
authConfig.js:36 [Thu, 23 Jun 2022 17:09:59 GMT] : [78728aa2-9ecd-4399-994a-4d8ab8801b13] : msal.js.browser#2.22.1 : Info - handleRedirectPromise called but there is no interaction in progress, returning null.
RequestInterceptor.tsx:27 Wrapped Fetch started for resource planning
GetToken.js:22 acquire token ...
authConfig.js:36 [Thu, 23 Jun 2022 17:09:59 GMT] : #azure/msal-react#1.3.1 : Info - useAccount - Updating account
authConfig.js:36 [Thu, 23 Jun 2022 17:09:59 GMT] : #azure/msal-browser#2.22.1 : Info - Emitting event: msal:handleRedirectEnd
authConfig.js:36 [Thu, 23 Jun 2022 17:09:59 GMT] : #azure/msal-react#1.3.1 : Info - MsalProvider - msal:handleRedirectEnd results in setting inProgress from handleRedirect to none
RequestInterceptor.tsx:27 Wrapped Fetch started for resource https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=https://login.microsoftonline.com/common/oauth2/v2.0/authorize
authConfig.js:36 [Thu, 23 Jun 2022 17:09:59 GMT] : #azure/msal-react#1.3.1 : Info - useAccount - Updating account
RequestInterceptor.tsx:27 Wrapped Fetch started for resource https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration
RequestInterceptor.tsx:27 Wrapped Fetch started for resource https://login.microsoftonline.com/common/oauth2/v2.0/token
RequestInterceptor.tsx:33
RequestInterceptor.tsx:33 POST https://login.microsoftonline.com/common/oauth2/v2.0/token 400 (Bad Request)
Apparently, by inspecting the log, the endpoint discovery is providing the authority url that overrides the setting:
https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=https://login.microsoftonline.com/common/oauth2/v2.0/authorize
First, authority needs to target the organizations (for work or student accounts) or common (for all the aformentioned plus personal accounts) endpoints and not the tenant specific. E.g.
{
authority: "https://login.microsoftonline.com/organizations/",
// authority: "https://login.microsoftonline.com/common/",
}
Finally, you need to configure your app registration as multi-tenant. Update its app manifest and ensure signInAudienceis set to AzureADMultipleOrgs or AzureADandPersonalMicrosoftAccount. The latter requires accessTokenAcceptedVersion to be set to 2.

GATSBY | MATERIAL UI | ERROR ON BUILD | WebpackError: ReferenceError: document is not defined (from plugin: gatsby-plugin-material-ui)

Creating a friend a site using Gatsby 4.0 and thought I would use the material UI template. looks nice and works in develop.
I go to build and I get the following errors, I presume its the material UI plugin with using the withStyles function but I am a noob and I can't find a solution online (If I find, at least it's recorded):
failed Building static HTML for pages - 2.794s
ERROR #95312
"document" is not available during server side rendering.
See our docs page for more info on this error: https://gatsby.dev/debug-html
72 | var _options = options,
73 | _options$window = _options.window,
74 | window = _options$window === void 0 ? document.defaultView : _options$window;
| ^
75 | var globalHistory = window.history;
76 |
77 | function getIndexAndLocation() {
WebpackError: ReferenceError: document is not defined (from plugin: gatsby-plugin-material-ui)
index.js:74
[leighton]/[history]/index.js:74:1
index.js:82
[leighton]/[react-router-dom]/index.js:82:26
index.js:22
[leighton]/[decode-uri-component]/index.js:22:1
index.js:25
[leighton]/[decode-uri-component]/index.js:25:1
index.js:31
[leighton]/[decode-uri-component]/index.js:31:1
index.js:30
[leighton]/[decode-uri-component]/index.js:30:4
index.js:41
[leighton]/[decode-uri-component]/index.js:41:1
gatsby-ssr.js:33
[leighton]/[gatsby-plugin-material-ui]/gatsby-ssr.js:33:47
api-runner-ssr.js:92
leighton/.cache/api-runner-ssr.js:92:28
static-entry.js:266
leighton/.cache/static-entry.js:266:11
dev-404-page.js:15
leighton/.cache/dev-404-page.js:15:11
WebpackError: ReferenceError: document is not defined (from plugin:
gatsby-plugin-material-ui)
The source of the issue is in the SSR (Server-Side Rendering). Summarizing a lot, when your un gatsby develop the code is interpreted by the browser, where you can play with window, document, and other global objects. However, gatsby build runs in the Node server where there's no window or document because has not even been created yet. That's why works in development and not in build mode.
This issue can by easily bypassed by adding the following condition before the usage of those global objects:
if (typeof window !== 'undefined'){
// code here
}
Or wrapping the code in a useEffect with empty deps ([]). This will ensure that the DOM tree is loaded thus there's a window (or document) available.
In your case, without any code samples or implementation of gatsby-plugin-material-ui it's impossible to know where's the code source of the issue.

Winter 18' release and Service Cloud Toolkit API cannot be used with your browser

When I try to use any of the workspace API javascript Library features now that winter 18' has been released for salesforce lightning, I get the following error when trying to open a subtab:
workspaceAPI.getFocusedTabInfo().then(function(response) {
var tabId = response.tabId;
var ptabid = tabId.split('_');
workspaceAPI.openSubtab({
parentTabId: ptabid[0],
url: '/one/one.app?source=aloha#' + strBase64,
focus: true
});
});
in the console: "uncaught exception: Error: Could not locate focused tab."
FYI: This code appeared to work in our sandbox pre final Winter 18" release. It just started to break today (post Winter 18').
Anyone else having this issue? Any help would be appreciated.

Joined: 10/13/2008 Posts: 89 error on Arabic language setting with DNN 7

i have a site with 2 language
English (default) & i add the new language Arabic(ar-SA) in ddn 7
the issue that i cant access any setting for module or site setting or edituser for example
its give me an error
A critical error has occurred. Valid values are between 1318 and 1450, inclusive. Parameter name: year
Saudi Arabia uses the Islamic calendar.
Currently, it's the year 1434, hence why you see the error.

Resources