Friday, January 5, 2018

Resolving Fast Query Error:"End Of string expected at position 5"

Writing a fast Query in Sitecore pretty simple.

Fast query will helpful to get the Immediate Children and Grand Children as well. 
sitecore query only get the immediate children. 

It is easy to write the queries with Xpath Builder.you can access the Xpath Builder at

http://[Your Domain]/sitecore/shell/default.aspx?xmlcontrol=IDE.XPath.Builder in Sitecore 8+ versions.

sometimes the fast query will work in Xpath Builder perfectly. but it will not work in real Template fields like droplist,multilist,Treelist fields.

error:"End of string expected at position 5"

if you get the above error:

1) Make Sure if you have any Spaces in the fast query,enclosed with '#'

fast:/sitecore/content/#Hello world#/Articles//*[@@templatename='One Column']

2) Make sure you wrote the Query with "query:fast:" whenever passing some conditions like get Only Specific Items based on the Template Id or Template Name syntax as below

query:fast:/sitecore/content/#Hello world#/Articles//*[@@templatename='One Column'] 

No comments:

Post a Comment