Content Query web part problems
Hello,I have been having some problems with the content query web part and I am hoping that some of you may have some ideas on what to try. So far I have run into the following three problems.1. First off, trying to filter by scheduling start date and scheduling end date doesn't work at all. If you set that filter then it simply returns nothing. This has been mentioned before in articles such as this one http://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/01c8b5d0-e820-4676-ab5c-63e0cddd117f/. In other articles that I have read that a common work around for this is to filter on 'Approval Status' since item scheduling will automatically place an article into the approved status on the scheduling start date, and will place it back into draft on the scheduling end date. (I really do not understand why it was done that way)2. Filtering by 'Approval Status' appears to work, but it really doesn't work completely. If you can contribute to the site/list (where the news article resides) then filtering works fine;however, if you filter by 'Approval Status', and someone with 'Read' only permission goes to the site where the CQWP is, then they can see articles that are in draft or pending status. This means they see all of the old articles since the brilliant method of item scheduling is to automatically set the approval status to approve/draft on the schedule. I think the problem here is that people with Read access do not have permission to view the 'Approval Status' column, but they do have permssion to read all of the list items and the CQWP does not handle this.3. My last thought was to try and filter based on Article Date greater than [Today-30]. However, date fields do not allow volatile functions in the CQWP settings so that doesn't work either.Onething I would like to know is if any of you have the same problems as #2? This is one that I have not seen a solution to, probably because most people don't think to sign in with a user that has 'Read' only permission to see what happens. Also, our SharePoint system is on service pack 2, so the issues have not yet been resolved in any of the current service packs.As mentioned in the article linked above it is obvious that others are having the same problem as #1. Work arounds involve exporting, modifying and reimporting the CQWP to get some kind of descent use out of the web part. Anyone else frustrated?-Eric
November 25th, 2009 2:25am

To answer your three questions: 1. It is a known issue that Content Query Web Part cannot be filtered by filed Scheduling Start Date and Scheduling End Date. I think the cause of the issue is that the Scheduling Start Date and Scheduling End Date fields are set to use date and time mode, but the Content Query web part is using the date mode for filter, so the filter cannot work properly in such scenario. The workaround is to create a new site column as date mode and set its value the same as Scheduling Start Date column, then filter by date field. 2. I am sorry I cannot reproduce the issue. If a user has read permission, he will see all the items in the Content Query web part if he has permission to visit these items. Please try to check if these approved items has break permission from parent, so the user has no permission to read these items. 3. You can try to create a calculated site column, set its formula as =[Article Date]+30 and its data type of date format, finally filter the Content Query web part by the new column is greater than [Today]. Hope it helps. Xue-Mei Chang TechNet Subscriber Support in forum If you have any feedback on our support, please contact tngfb@microsoft.com Xue-Mei Chang
Free Windows Admin Tool Kit Click here and download it now
November 25th, 2009 10:26am

Hello Xue-Mei,Thanks for the response. I just figured out the problem in #2. The problem presents itself if users have read access to the document library, but then the document library has "Who should see draft items in this document library?" set to "Only users who can edit items". By setting the permissions to the site or library to contribute for everyone I was basically removing anyone with read only permissions, and therefore bypassing this setting. A better alternative (for my setup anyway) is to set "Who should see draft items in this document library?" to "Any user who can read items".I figured this out by browsing to the library where the articles reside, and when signed in as a reader I saw that all items still said "Approved". Then I realized that the CQWP would read the approval status based on the user that was signed in, and readers were still seeing the approved article instead of the new draft/minor version. So the key is that the article had to make it to an Approved status, and then be placed back in draft after the scheduling end date. If you were not able to recreate the problem then it might have been because the article never made it to an approved, major version.It would be nice if CQWP would escalate permissions when checking the Approval Status, or at least have it as an option. If it were an option then maybe it wouldn't have taken me so long to figure out what was going on. Just an idea for the next version.-Eric
November 25th, 2009 7:20pm

we are using content query web part for display on all site project task data. it is working. but it is not working filter in assigned to column. Also under Title of task displayed <div></div>. how to solve this issue?
Free Windows Admin Tool Kit Click here and download it now
May 18th, 2011 2:49am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics