My website is buymobile.I already implement this code, our website made by opencart cms. Many time we try this code but show below error.
domain name (All values provided for https://search.google.com/structured-data/testing-tool/ must have the same domain.)
please help me
<script type="application/ld+json">
{ "#context" : "http://schema.org",
"#type" : "Organization",
"name": "buymobile.com.bd",
"url" : "https://buymobile.com.bd/",
"contactPoint" : [
{ "#type" : "ContactPoint",
"telephone" : "+880171++++++",
"email": "info#buymobile.com.bd",
"contactType" : "customer service",
"contactType" : "technical support",
"availableLanguage" : ["English","Bengali"],
"contactOption" : [],
"areaServed" : "Bangladesh"
} ] } </script>
Surely this error look like (All values provided for https://search.google.com/structured-data/testing-tool/ must have the same domain.) this. Actually tried a lot to solve this error in different ways. According to the Webmaster Central Help Forum this actually a bug of structure data testing tool.It's not an error you can go for it.
Related
I'm trying to update the fields associated with a list item via Graph Explorer, https://developer.microsoft.com/en-us/graph/graph-explorer (or a REST API call). For one of the fields, its value can be one item from a term set (managed meta data). I can see each of the elements in the term set and get each termguid when I visit https://XXX.sharepoint.com/Lists/TaxonomyHiddenList/AllItems.aspx.
I'm trying to do a PATCH request with a URL of something like https://graph.microsoft.com/beta/sites/XXX.sharepoint.com,FOO,BAR/drive/root/children/Test%20Document.txt/listItem/fields (or https://graph.microsoft.com/v1.0/sites/XXX.sharepoint.com,FOO,BAR/drive/list/items/1/fields) to identify the fields associated with a specific item
To update the CakeType field, I've set the request body to the following:
{
"CakeType": {
"Label": "Apple",
"TermGuid": "3a3ad73f-94ca-4d1e-a25c-XXXX",
"WssId": -1
}
}
When I then press the Run Query button, I get an InvalidClientQueryException with a message of "A value without a type name was found and no expected type is available. When the model is specified, each value in the payload must have a type which can be either specified in the payload, explicitly by the caller or implicitly inferred from the parent value."
So, I've been trying to figure out what datatype to specify and how to... In various examples online, I've seen adding a field named __metadata and others adding #odata.type, like CakeType#odata.type for the case here. I've tried adding these lines within the CakeType JSON and outside it, for the whole structure. Neither worked...
{
"CakeType": {
"__metadata" : {"type" : "SP.Taxonomy.TaxonomyFieldValue" },
"Label": "Apple",
"TermGuid": "3a3ad73f-94ca-4d1e-a25c-XXXX",
"WssId": -1
}
}
or
{
"__metadata" : {"type" : "SP.Taxonomy.TaxonomyFieldValue" },
"CakeType": {
"Label": "Apple",
"TermGuid": "3a3ad73f-94ca-4d1e-a25c-XXXX",
"WssId": -1
}
}
I've also tried using the field name in the type which I thought I saw somewhere...
"__metadata" : {"type" : "SP.Data.CakeType" },
and tried
"CakeType#odata.type" : "SP.Taxonomy.TaxonomyFieldValue" ,
"CakeType#odata.type" : "SP.Data.CakeType",
"#odata.type" : "SP.Taxonomy.TaxonomyFieldValue" ,
The only things that gave a different error message was when I put "CakeType#odata.type" : "SP.Taxonomy.TaxonomyFieldValue" , immediately after the opening { or without the CakeType part within the CakeType...
{
"CakeType#odata.type" : "SP.Taxonomy.TaxonomyFieldValue" ,
"CakeType": {
"Label": "Apple",
"TermGuid": "3a3ad73f-94ca-4d1e-a25c-XXXX",
"WssId": -1
}
}
and
{
"CakeType": {
"#odata.type" : "SP.Taxonomy.TaxonomyFieldValue" ,
"Label": "Apple",
"TermGuid": "3a3ad73f-94ca-4d1e-a25c-XXXXX",
"WssId": -1
}
}
Each gave an error of "A type named 'SP.Taxonomy.TaxonomyFieldValue' could not be resolved by the model. When a model is available, each type name must resolve to a valid type."
This makes me think that I have the right field name but the wrong type...
So... what should I be naming the type so I can update the managed meta data field? or... what must the JSON be if the above structure is so far off... or how can I update the field strictly using the Graph API.
Thanks.
I thought looking at schema extensions might help (GET https://graph.microsoft.com/v1.0/schemaExtensions) but it didn't...
Ultimately, I'm trying to update the managed meta data field from Java with the classes in com.microsoft.graph.... so if I can figure out the right stuff with Graph Explorer, I can then move over to Java. I've seen some examples of such in other languages but can't figure out the right way to do same in Java.
Here is how I was finally able to do this.
First you need the id of the hidden field which is the displayName corresponding to your field CakeType which should be CakeType_0.
I used this REST call to get find the id:
https://graph.microsoft.com/v1.0/sites/{sitid}/lists/{listid}/items?expand=hidden
This will return all your fields and you want the one with the _0 suffix:
..."displayName": "Cake_0",...
"name": "d39a5181f12f41a483acb1a4e47477b1"...
It is this name id you need to use to update the field.
So then the PATCH call on your item is like this:
https://graph.microsoft.com/v1.0/sites/{sitid}/lists/{listid}/items/{itemid}
Then the payload syntax is like this:
{"{FieldID}":"{TermNumber};#{Term}|{TermGuid}"}
So it would look like this (assuming Apple is the 4th tag although I think -1 might work there too):
{"d39a5181f12f41a483acb1a4e47477b1":"4;#Apple|3a3ad73f-94ca-4d1e-a25c-XXXX"}
For more than one tag separate them with ;# all within the same quoted string
I was having the same issue, and found this: https://microsoftgraph.uservoice.com/forums/920506-microsoft-graph-feature-requests/suggestions/33421180-support-for-setting-sharepoint-managed-metadata-t
The feature request:
Support for setting SharePoint Managed Metadata (taxonomy) column values and other complex column types on items via the Graph API
The response:
Thank you for your feedback! This work is on the backlog and currently isn’t scheduled. The feature will be updated here once dev work has started. -EY
I have used http://editor.swagger.io to produce swagger.yaml for my web.api application (node js). But I was confused when I saw the swagger with my methods. Button Authorize was hidden. But in editor it was shown and works.
The Difference is so:
In Editor everything is all right:
But when I insert same swagger.yaml in my application, Launch browser then I saw the diffrerent view:
You are using a very old version of Swagger UI (2.0?), whereas the Swagger Editor uses UI 3.x.
In UI 2.x, you can enter the API key in the text box in the header:
Note that UI 2.x is no longer maintained by developers. Consider using the latest version of Swagger UI instead.
I had the same problem. Unfornulately I don't remember the exact solution.
But I remember, it had something todo with a bug (in swaggerui) and security-definitions (type=basic must be present to show the button or something...).
This is from my swagger.json (and Auth-Button is shown):
<!-- snip -->
"/xx/xxx/xxx" : {
"post" : {
"responses" : {... },
"security" : [ {
"demouser" : [ ]
}, {
"api_key" : [ ]
} ]
}
}
<!-- snip -->
"securityDefinitions" : {
"api_key" : {
"type" : "apiKey",
"name" : "api_key",
"in" : "header"
},
"demouser" : {
"type" : "basic"
}
}
Edit Info:
You should also take a look at OpenAPI (swagger 3.0?!). It has much cleaner Specification and API! (swaggerui also supports OpenAPI/Swagger3!)
I'm working on a multiple-language website and I'm preparing Schema.org markups using JSON-LD. Important detail: this website uses subdirectories for languages. Let's consider 2 languages:
English: https://www.example.com/
French: https://www.example.com/fr/
I want to put Corporation and WebSite things on all localized HP. Everything goes fine but for #id, url and inLanguage properties: I don't quite know what I should fill.
For Corporation, I think I got it right: I'm going to use on all pages default url and base my #id on it:
{
"#context": "http://schema.org",
"#type": "Corporation",
"#id": "https://www.example.com/#organization",
"name": "Example",
"url": "https://www.example.com/",
...
But what would be the best move for WebSite properties, on my French HP?
Technically speaking, /fr/ subfolder is part of the example.com/ domain. But then, #id, inLanguage and url are not telling my website is also available for French-speakers.
{
"#context": "http://schema.org",
"#type": "WebSite",
"#id": "https://www.example.com/#website", // should this be "https://www.example.com/fr/#website" ?
"name": "Example",
"url": "https://www.example.com/", // should this be "https://www.example.com/fr/" ?
"inLanguage": "en", // should this be "fr" ?
...
I searched a lot about this and found nothing on this particular matter.
Does anyone have any experience on this?
You have two different (albeit translated) websites. It shouldn’t matter that they share the same domain/hostname.
Each website should get its own WebSite item, with its own #id, url, and inLanguage values, while they would refer to the same Corporation item.
{
"#context": "http://schema.org",
"#type": "WebSite",
"#id": "https://www.example.com/#website",
"url": "https://www.example.com/",
"inLanguage": "en",
"publisher": {"#id": "https://www.example.com/#organization"}
}
{
"#context": "http://schema.org",
"#type": "WebSite",
"#id": "https://www.example.com/fr/#website",
"url": "https://www.example.com/fr/",
"inLanguage": "fr",
"publisher": {"#id": "https://www.example.com/#organization"}
}
If the websites are primarily translations, you could use workTranslation/translationOfWork to link the WebSite items.
"workTranslation": {"#id": "https://www.example.com/fr/#website"}
"translationOfWork": {"#id": "https://www.example.com/#website"}
(This is a good case to see why the WebSite items should have different #id values, because otherwise you couldn’t refer to their translations like that. Using the url value instead of the #id value wouldn’t be a good idea, because this URI typically represents the homepage, not the whole website.)
I am trying to create some JSON-LD structured data for a list of products on an ecom-site but I am getting an error when using Google's Structured Data Testing Tool.
So far, I have this:
{
"#context": "http://schema.org",
"#type": "OfferCatalog",
"name": "Fresh Fruit",
"itemListElement": [
{
"#type": "ListItem",
"position": 1,
"item":
{
"#type": "Offer",
"price": "1.20",
"priceCurrency": "GBP",
"availability": "http://schema.org/InStock",
"url": "http://example.com/green-apples/",
"itemOffered": {
"#type": "Product",
"name": "Green Apples",
"url": "http://example.com/green-apples/"
}
}
}
]
}
Mostly it validates, but the Google tool throws the following error:
All values provided for url must point to the same page.
The error highlights line 11 ("#type": "Offer",).
The URL fields seem to be clashing with the #context declaration, because if I change the context to either a non-url string or http://example.com, it validates (although, this obviously causes its own issues). (This has been shown to be a red-herring, in the comments below)
What am I missing here? It feels like something blindingly obvious.
I think it is connected with pushing of accelerated mobile pages and its structured data.
Please check my thoughts here: All values provided for URL must point to the same page. My guess was about the problem in Google’s SDTT
So, to fix the problem with your structure data, please use the correct version of ItemList (there are Separately and Combined marked up ItemLists, please check here):
If your items are on the same page, please use the version with items
inside, the Combined one.
Otherwise, if you point to different pages inside and your items are
not on one page, please DON’T put item element with type and other
description inside, the Separately marked up one.
Now it's 2018.
Answer by Yash Pal above is close, but not quite right.
This is not an error from Google validator tools.
The error is valid and you need to fix it.
You use the "Single Page" approach ( there are two approaches "Summary page" and "Single page" )
For "Single Page" approach, you need each URL to be exactly same, and each of them should have "an anchor".
The Google developer doc clearly mentioned it.
I wrote the explanation details there
If your page contains some links to another page, then you should use "Summary Page" approach and it had different data structure ( much simpler one, I think )
I think the issues occurs when we mix two list types i.e Summary page + multiple full details pages and A single, all-in-one-page list.
Google stated on page - https://developers.google.com/search/docs/guides/mark-up-listings
If this is a summary page, the ListItem should include only the type,
position, and url properties.
If this is an all-in-one-page list, the ListItem should include all the additional schema.org properties for the data type that it describes (for example, Recipe or Course objects).
But Google should consider eCommerce category's product listing where people display numbers of product with more than 3 properties on summery page and these are obvious for eCommerce, like price and image are 2 important item on product listing page except the 3 listed above.
So we need to raise this issue with Google to address the concern.
No, it is NOT an error in Google's SDTT,
I have helped many people fix their structured data, including dynamic arrays. Read the instructions. Google clearly states "All values for the URL must point to the same page". Think about it, Google is trying to tell you something.
That something means this "Hey you are using a different item list from the example we provided, your item list has more than two item".
The solution:
Use anchors! Voila!
Please use this example snippet and you cannot go wrong. And another tip; use the Fetch Url option from SDTT:
<script type="application/ld+json">
/*structerd data markup compiled by http://www.iwanross.co.za */
{
"#context": "http://schema.org",
"#type": "ItemList",
"itemListElement": [
{
"#type": "ListItem",
"position": 1,
"item": {
"#type": "Recipe",
"url": "https://www.smokingchimney.com/#beetroot",
"name": "Beetroot Side Salad for the braai",
"image": "http://www.smokingchimney.com/recipe-pages/images/1x1/Beetroot-Salad-
for-the-Braai-800x451.jpg",
"author": {
"#type": "Person",
"name": "Marna Ross"
},
"datePublished": "2018-10-05"
}
},
{
"#type": "ListItem",
"position": 2,
"item": {
"#type": "Recipe",
"url": "https://www.smokingchimney.com/#carrot",
"name": "Carrot Cake",
"image": "http://www.smokingchimney.com/recipe-pages/images/16x9/carrot-cake-
recipe-picture-1024x576.jpg",
"author": {
"#type": "Person",
"name": "Marna Ross"
},
"datePublished": "2018-10-05"
}
},
{
"#type": "ListItem",
"position": 3,
"item": {
"#type" : "Recipe",
"url":"https://www.smokingchimney.com/#overnight",
"name": "Overnight Steak Marinade",
"image": "http://www.smokingchimney.com/recipe-pages/images/1x1/Overnight-steak-
marinade-700x465.png",
"author": {
"#type": "Person",
"name": "Marna Ross"
},
"datePublished": "2009-10-05"
}
}
]
}
</script>
It is surely an error in the validator. I checked with the examples google provided: https://developers.google.com/search/docs/guides/mark-up-listings .
If you click on the 2nd example you will see that it has the same error.
The error is shown even if you use 1 item:
{
"#context": "http://schema.org",
"#type": "ItemList",
"itemListElement": [
{
"#type": "ListItem",
"position": 1,
"item": {
"#type": "Recipe",
"url": "http://example.com/desserts/pies/#apple-pie",
"name": "Apple Pie",
"image": "https://example.com/300px-Apple_pie.jpg",
"author": {
"#type": "Person",
"name": "Carol Smith"
},
"datePublished": "2009-11-05"
}
}
]
}
you don't need to anchor every URL, you can add parameters to the URL as well ?i=1
like:
https://website.com/d/link?i=1
https://website.com/d/link?i=2
....
Use type OfferCatalog instead of ItemList. https://schema.org/OfferCatalog
I have tried the passbook tutorial:
http://www.raywenderlich.com/20734/beginning-passbook-part-1
which was recommended in some other SO thread a while ago.
Everything went smoothly, except:
I put the .pkpass file on a local web server, I tried clicking a direct link to the file, hoping it would open on my iOS sim/device, but all I got is "safari was unable to download the file". This also happened with the official iOS pass samples on the Passbook Programming Guide. While on the simulator, no errors come up on the console log.
I tried putting the pkpass in an email, open it from a real device, it comes up ok, but when I click "add", the coupon is not added to passbook. No errors come up either.
I tried creating a pass with passsource.com. If I use their "on the fly" method, I get a good coupon, and I am able to save it. If I choose "download pkpass file" and then use it as described above in #1/#2 - same errors.
The coupon is signed correctly, using correct team id and type id.
My JSON is (I garbled the team/type ids):
{
"formatVersion" : 1,
"passTypeIdentifier" : "pass.com.xxx.xx.xxx",
"serialNumber" : "123",
"teamIdentifier" : "XXXXXXXX",
"organizationName" : "my brand",
"description" : "my coupon",
"logoText" : "logo text",
"foregroundColor" : "rgb(255, 255, 255)",
"backgroundColor" : "rgb(135, 129, 189)",
"labelColor" : "rgb(45, 54, 129)",
"barcode" : {
"message" : "650438-5103453453",
"format" : "PKBarcodeFormatPDF417",
"messageEncoding" : "iso-8859-1"
},
"coupon" : {
"primaryFields" : [
{
"key" : "offer",
"label" : "for you",
"value" : "Free hug"
}
]
}
}
I tested the json with the online validation tool, it's valid.
any ideas why the coupon is not saved/downloaded?
tnx
I just found the cause of the issue. Seem that the Simulator supports drag-drop of a pkpass from Finder on the Sim. If I do that, I DO see a detailed error message in the system log (I am using the Console app), so I found the problem:
1. My json was changed after I created its sig in manifest.json, so I updated the sig
2. If I want the pkpass file to be served as a pass from a web server, it's not enough to provide a direct link to it, I also need to change the content type to application/vnd.apple.pkpass
After I handled both of these issues, I was able to serve the pkpass file from my web server.