How to fix "The review is for an item of type Thing which is not a supported type." - schema

How to fix this error Google Structured Data Testing Tool and what does it mean
The review is for an item of type Thing which is not a supported type.

Google only provides rich snippets (stars) for reviews of certain types of things. You can see the list here:
https://developers.google.com/search/docs/data-types/review-snippet
"Thing" is a catch all type of thing and also the default if you do not specify a type. You need to be more specific.

Related

Proprietary handling/collecting of user defined errors

I do not know how to implement a proprietary handling procedure of user defined errors (routines/algorithm stop) or warnings messages (routine/algorithm can proceed) without using Exceptions (i.e. failwith .... Standard System Exception).
Example: I have a Module with a series of Functions that uses a lot of input data to be checked and to be used to calculate the thickness of a Pressure Vessel Component.
The calculation procedure is complex, iterative and there are a lot of checks to be performed before getting a result, check that can generate "User Defined Errors" that stop the procedure/routine/algorithm or generate a "Warning Messages" proceeding on.
I need to collect these Errors and Messages to be shown to the User in a dedicated form (Wpf or Windows form). This later at the end.
Note: every time that I read a books of F# or C# or Visual basic or an Article in Internet, I found the same Phylosophy/Warning: raise of System/User-Defined Exception should be limited as much as possible: Exception are for unmanageable Exceptional Events ( not predictable) and cause "overload" to the Computer System.
I do not know which handling philosophy to implement. I'm confused. Limited sources available on internet on this particular argument.
Actually I'm planning to adopt this Phylosophy , taken from: "https://fsharpforfunandprofit.com/posts/recipe-part2/". It sounds good for me, ... complex, but good. No other references I was able to go find on this relevant argument.
Question: there are other Phylosophies that I can consider to create this Proprietary handling/collecting of user defined errors? Some books to read or some articles?
My decision will give a big impact on how to design and write my code (splitting problem in several functions, generate a "motor" that run in sequence functions or compose then in different ways depending on results, where to check for Errors/Warnings, how to store Errors and Warning Messages to understand what is going on or where "Errors/Warnings" are genetate and caused "By Which Function"?).
Many thanks in advance.
The F# way is to encode the errors in the types as much as possible. The easiest example is an option type where you would return None if the operation failed ans Some value when it succeeded. Surprisingly, very often this is enough! If not, then you can encode different types of errors AND a success "state" in a discriminated union, e.g.
[<Measure>]
type psi
type VesselPressureResult =
| PressureOk
| WarningApproachingLimit
| ErrorOverLimitBy of int<psi>
and then you will use pattern matching to "decide" what to do in each case. If you need to add more variants, e.g. ErrorTooLow, then you would add that to the DU and then the compiler will "tell" you about all places where you need to fix the logic.
Here is the perfect source with detailed information: https://fsharpforfunandprofit.com/series/designing-with-types.html

Get Knowledge Article Record Type using REST API

Is it possible to get the record type of articles using REST API? I can get a list of articles using this
/services/data/v38.0/support/knowledgeArticles?sort=ViewScore&channel=App&pageSize=3
but there's no record type available. Please help me. Thank You
Knowledge articles are spread across multiple objects. Try querying (or probably better to search with SOSL) the KnowledgeArticleVersion (Id, Title, Summary, ArticleType, KnowledgeArticleId) object and then depending on the article type you can search that specific knowledge article version object (__kav) for example Test__kav to get the specific article.
In summary try:
/services/data/v38.0/sobjects/KnowledgeArticleVersion
and then the article types specific to your org
Edit
This might be easier:
/services/data/v37.0/query/?q=SELECT+Id,+ArticleType,+KnowledgeArticleId+FROM+KnowledgeArticleVersion+WHERE+PublishStatus='online'
You might need to add language code if u have multiple languages enabled, but this would tell you the Article type for the articles in question

AtTask API Documentation / Examples

I am struggling with the AtTask API. Specifically, I'm finding the documentation to be confusing and the examples to be very limited. For instance, the API supports "Named Queries" but there seems to be no listing or documentation of them. One point says that they are listed under "Actions" in the API Explorer, but I find very little there, and the named query that is used in the example "myWork" is not listed.
Can anyone point me to better documentation or examples? I can muddle through by trial and error, writing all my own queries, but it would be nice to know if there is already a Named Query that does what I need to do. For Instance, I need to get a list of assigned tasks. myWork returns a list of tasks that have already started, but I also need the work requests.
Any help will be greatly appreciated.
Thanks,
Mark
There is no question that the AtTask documentation is very weak and that undocumented features exist. Very frustrating. One thing that does help sometimes is to call the meta data for an object.
To view a tasks meta data go to cl02.attask-ondemand.com/attask/api/v4.0/task/metadata
Then just copy and paste the result on this page http://json.parser.online.fr/
It's not the best, but I found a few undocumented features that way.
Regarding getting a list of assigned tasks, I would consider just querying the tasks object with a user ID set as the search critera. Something like
cl02.attask-ondemand.com/attask/api/v4.0/task/search?method=get&assignedToID=5419c3e90001c026e1b72b7014e8e694

Restricting a freebase search query to results that have only the type "/common/topic"

I'm trying to find results from a search where all the topics in the result have only the type: "/common/type". For instance, if I search for "BBQ Chicken" I'd like to get back "/en/barbecue_chicken" as the first, and, perhaps, only result, since it has no other types associated with it besides "/common/topic"
I did see an answer to a similar question at:
Freebase search_api and excluding results by specified type but I understand that mql_filter is no longer supported in the new api.
Also, I found an mql query that returns all topics that have only type "/common/topic" in the MQL Cookbook, but haven't been able to find a way to use it in search.
http://wiki.freebase.com/wiki/MQL_Cookbook#Find_untyped_topics_.28or_which_only_have_a_given_type.29
Freebase is a free open database that anyone can contribute to. Assuming that "BBQ Chicken" will never have another type assigned to it is not a good assumption to make. In fact, you should probably assume that over time most Freebase topics will acquire some type in addition to /common/topic.
I've gone ahead and added the type /food/dish so that now you can reliably find BBQ Chicken using the Search API like this:
https://www.googleapis.com/freebase/v1/search?query=BBQ+Chicken&type=/food/dish

schema.org: Brand of a Product an Organization?

We like to use HTML5 microdata in a website. But we are kind of puzzled how to apply the brand to our products. According to http://schema.org/Product, the brand is an Organization.
An example: If the iPhone is a brand of Apple Inc, how do I apply this to a iPhone 3GS product page?
Edit: I saw several examples providing a simple String as the brand, e.g. http://www.affiliatetuts.com/general/adding-microdata-to-your-markup/. Is that valid?
i markedup an example for you here: http://jsfiddle.net/jalbertbowdenii/GVuUw/ passed validation here: http://validator.nu/ and i got the information from: http://store.apple.com/us/product/MC555
On the ability to include strings instead of full inline descriptions, see http://schema.org/docs/datamodel.html
"While we would like all the markup we get to follow the schema, in practice, we expect a lot of data that does not. We expect schema.org properties to be used with new types. We also expect that often, where we expect a property value of type Person, Place, Organization or some other subClassOf Thing, we will get a text string. In the spirit of "some data is better than none", we will accept this markup and do the best we can."