Posts

Showing posts with the label Sitecore

Donate

Syntax error, '>' expected in Sitecore CMS

When I was a developer in a large corporation before, I was assigned to a Sitecore CMS project. While working on the CMS's services in getting the contents, I encountered an error as mentioned in a title post. After doing some research, I found out that the CMS's parser does not recognize special characters of the data returned from it's search query. So the workaround that I found from an article was to surround the data returned with hash tags. In the sample codes below, I just added a snippet to insert hashtags to data returned from the parser. Sample Data Returned: Tel-Aviv Formatted data: #Tel-Aviv# Original method: 1 2 3 4 5 6 7 8 9 10 11 public static IEnumerable<IUniversity> GetSchoolsByState(Guid stateProvinceId, Language languageVersion) { if (stateProvinceId.Equals(Guid.Empty)) return null ; var stateProvinceReferenceItem = Context.Database.GetItem(ID.Parse(stateProvinceId)); if (stateProvinceReferenceItem == nul...

Donate