Hi,
Did you were developing with SharePoint 2010 and found this error when working with Search Query?
This seems WCF service, isn't it? But you have no clue about the real problem, only a short "Property doesn't exist or is used in a manner inconsistent with schema settings" with an exception in Microsoft.Office.Server.Search.Query.InvalidPropertyException Stack = at Microsoft.Office.Server.Search.Query.FullTextSqlQueryInternal.Execute() .
Jsut don't get mad, we found that this exception (InvalidPropertyException) is related to a managed property that doesn't exist. So you should review the query and find if there are any missing managed properties.
Shouldn't this error be more descriptive?
Sure
Bye!
This has been a recurring problem in SharePoint: Although you add a publishingImage field to your layout and it gets indexed, the managed property mapped to this crawled property has no value.
This is related to two issues:
There are several solutions to resolved this scenario, but all they seem too complex (ex.: create a second field and update it with the url with an event receiver). Finally we get a simple solution without changing the product ;)
A sample of the webcontrol code:
using System.Web.UI; using System.Web.UI.WebControls; using System.ComponentModel; using Microsoft.SharePoint.Utilities; using Microsoft.SharePoint; using Microsoft.SharePoint.Publishing.Fields; namespace Microsoft.Services.WebControls { [DefaultProperty("Text"), ToolboxData("<{0}:IndexableImage runat=\"server\" />")] public class IndexableImage : WebControl { private static string getImageUrl(){ ImageFieldValue imgField = null; if (SPContext.Current.ListItem["metaImage"] != null) { imgField = (ImageFieldValue)SPContext.Current.ListItem["metaImage"]; if (imgField != null) { return imgField.ImageUrl; } } return string.Empty; } protected override void Render(HtmlTextWriter output) { output.Write("<meta"); output.WriteAttribute("name", "metaImage"); output.WriteAttribute("content", getImageUrl()); output.Write("/>"); output.WriteLine(); } } }
Namaste!
You may face that altough:
You still can't change the layout. This seems a bug, as the layout button is enable by the querystring EditMode. So try to add ControlMode=Edit parameter in the querystring, and page layout should be enabled if the prerequisites are met.