none
Unknown error in the change query dialog of a search results webpart

    Question

  • I'm having an issue with a SharePoint 2013 search results webpart. I set up the web part and everything worked perfectly fine for a few weeks but then I went to edit the webpart and when I click the change query button I get the build your query dialog window that states "An unknown error occured". 

    Has anyone had this issue or can anyone point me to the error log where this type of event is logged?   

    * UPDATE: I've noticed this issue is only affecting one subsite and not any of the other subsites in its site collection. Also that it is site wide meaning any new search results webpart I add to any page in the site have the same unknown error occurs in the change query dialog window.

    Error Picture





    jeudi 13 juin 2013 20:01

Réponses

  • Okay, I found the issue and was able to fix my error.

    I closely watched the SharePoint log files while causing the error to happen and even without a correlation ID I saw the error on the QueryBuilder.aspx page as it was happening. (Exception in Query Builder OnLoad: System.ArgumentException: An entry with the same key already exists.) After a quick search for this error I found this technet article here that explains that this issue happens when a content type is added to the root site and to a subsite with the same name.

    In my case I had copied the default approval workflow in my root site so SharePoint Designer created a content type named 'Approval Workflow Task _x0028_en-US_x0029_ Copy' at the root level. Then I realize I wanted the same thing on a subsite and not on the root site so I copied the default approval workflow into the subsite in which case SharePoint Designer created a content type named 'Approval Workflow Task _x0028_en-US_x0029_ Copy' at the subsite level. Because the subsite had a content type with the same name as a content type on the root site the QueryBuilder.aspx page on the subsite would error out when trying to populate a dropdown box of content types.

    To resolve the issue I deleted one of the content type's named 'Approval Workflow Task _x0028_en-US_x0029_ Copy' and instantly the Build You Query dialog work again.

    Lesson learned: Always rename your content types to something unique!

    • Marqué comme réponse Tyler Cook lundi 8 juillet 2013 19:39
    lundi 8 juillet 2013 19:39

Toutes les réponses

  • Were you able to solve this problem. I am getting the same problem even in central admin

    jeudi 4 juillet 2013 05:25
  • No solution yet, I'm going to apply the June 2013 CU this weekend and then try to troubleshoot the Search Service Application some more. I'll post anything that I find.

    vendredi 5 juillet 2013 12:24
  • Sure thanks.
    lundi 8 juillet 2013 09:12
  • Okay, I found the issue and was able to fix my error.

    I closely watched the SharePoint log files while causing the error to happen and even without a correlation ID I saw the error on the QueryBuilder.aspx page as it was happening. (Exception in Query Builder OnLoad: System.ArgumentException: An entry with the same key already exists.) After a quick search for this error I found this technet article here that explains that this issue happens when a content type is added to the root site and to a subsite with the same name.

    In my case I had copied the default approval workflow in my root site so SharePoint Designer created a content type named 'Approval Workflow Task _x0028_en-US_x0029_ Copy' at the root level. Then I realize I wanted the same thing on a subsite and not on the root site so I copied the default approval workflow into the subsite in which case SharePoint Designer created a content type named 'Approval Workflow Task _x0028_en-US_x0029_ Copy' at the subsite level. Because the subsite had a content type with the same name as a content type on the root site the QueryBuilder.aspx page on the subsite would error out when trying to populate a dropdown box of content types.

    To resolve the issue I deleted one of the content type's named 'Approval Workflow Task _x0028_en-US_x0029_ Copy' and instantly the Build You Query dialog work again.

    Lesson learned: Always rename your content types to something unique!

    • Marqué comme réponse Tyler Cook lundi 8 juillet 2013 19:39
    lundi 8 juillet 2013 19:39
  • I was not working with content types. I was working with Synonym Dictionary & Query Rules section. Then it suddenly gave above error. I reverted whatever i had done. But still same issue.

    Thanks for updating. If you come to know of anything else, please let me know.

    jeudi 11 juillet 2013 06:53
  • Hello All,

    I am guessing this error occours in the SharePoint standard edition. I will update as i upgrade to enterprise edition and try all over again.

    Thanks!

    lundi 19 octobre 2015 20:37
  • I am having the same issue but i have checked Content Type in site and Sub site, all is fine. No same content type name and other things. Still problem exists and i have no clue and no other error in Log too. 

    vendredi 30 octobre 2015 12:09
  • Thanks so much for this, been driving me crazy the whole day!
    mercredi 11 novembre 2015 12:19
  • awesome - removing a duplicate content type resolved this for me. Thanks
    • Proposé comme réponse Jimbob7200 jeudi 14 juin 2018 01:01
    • Non proposé comme réponse Jimbob7200 jeudi 14 juin 2018 01:01
    jeudi 14 juin 2018 01:01
  • Thanks for the information, I run into the same issue and was able to fix it, by just renaming the content type since I was using it. 

    

    


    • Modifié aka_oax mardi 18 septembre 2018 23:47
    mardi 18 septembre 2018 23:46