locked
Anomaly with lookup fields in CQWP, one causes it to error whilst the other works RRS feed

  • Question

  • I'm having a serious issue where if I use varying lookup fields I get different behaviour in my CQWP.


    The below works:

    <property name="CommonViewFields" type="string">VacancyReferenceNumber,Text;ClosingDate,DateTime;NewsCategory,Lookup;</property>


    The below doesn't work (notice the different lookup field):

    <property name="CommonViewFields" type="string">VacancyReferenceNumber,Text;ClosingDate,DateTime;VacancyDivision,Lookup;</property>


    The one which doesn't work returns: There was an error retrieving data to display in this Web Part.



    The site column NewsCategory is not part of this solution and is used succefully on another custom CQWP.

    The site column VacancyDivision is part of this solution and is used in the content type/page layout I am trying to return.

    Both the site columns are built using the same technique (just in different solutions). The technique is xml passed from a feature property to the feature receiver. This has to happen since List IDs for the the target list can vary.

    I've compared both site columns and they are identical in properties. I dont't know what to check next. This is driving me insane!
    • Edited by Mike Walsh FIN Sunday, February 14, 2010 3:51 PM ! removed from Title
    Friday, January 8, 2010 2:49 PM

All replies

  • Weirdly if I set the Source property to target any site in the hierarchy other than Root then it starts to work.

    Source:
    - Show items from all sites in this site collection < this results in the error
    - Show items from the following site and all subsites < this works as long as it targets below the root site collection
    - Show items from the following list
     

    Note: Content must be found in order to see the error. With no content (i.e the content type it's searching for) it will successfully show the "no results" message.


    Question Is though why do I have to set the traget site to a sub site other than root? My older solution works fine and is identical other than being different fields etc. Luckily targeting a site this time isn't that bad and it is a workaround. BUT I'd like to get to the bottom of this so any takers on suggestions?
    Friday, January 8, 2010 3:35 PM