locked
Content Query Webpart (CQWP) not showing columns for some users

    Question

  • Hi I am a first time poster,

    I created a content query webpart on my SP site.  Basically, I am doing a sitewide query for all tasks that belong to a certain content type, and then displaying the information of the task in 4 columns (Title, Assigned To, Status, Workflow Link).

    I am currently able to see all the columsn for this CQWP, but some of the users that will be using this tool cannot, they are only able to see the Title.

    I've searched in many different areas and cannot figure out the problem or if this has to do with column permissions (if that's even a possibility).
    Thursday, August 14, 2008 8:36 PM

Answers

  • Hi James,

    Although your suggestion is not the answer, it did help me get to the answer.  The webpart is truly a CQWP with a custom designed layout (I edited the ItemStyle.xls and ContentMain.xls to show the extra columns by using the CommonFields method to pull the extra columns).  I discovered this when you suggested to check the Selected View.

    When I checked it, what I found is that my end users were looking at the Default layout with Image on Left layout.

    The view that I am seeing is a custom view that I created with the added columns.  What was happening is that I edited the ItemStyle.xls file in the home directory Style Library.  I checked the permissions on that file and sure enough the end users had Limited Access on that file, which means that they wouldn't be able to get all the custom style layout that I developed.

    I changed their permission, and now it works just fine.

    Thanks guys!

    Edit:
    I also had the ContentQueryMain.xls, and ItemStyle.xls file uploaded as minor versions (1.1 instead of 2.0), and end users have access to only major version files.  Once I had published them as major versions, things started working normally.  So remember, whenever you create a CQWP and also have a custom layout via editing the .xls files, make sure to upload them as major versions.
    • Marked as answer by MTHasan Friday, August 15, 2008 4:22 PM
    • Edited by MTHasan Friday, August 15, 2008 5:39 PM Additional Information
    Friday, August 15, 2008 4:22 PM

All replies

  • What are the permissions of the people who can't see the data?

    What are the permissions of the lists that you are querying?
    Shannon Bray - MCT, MCPD, MCTS, MCITP
    Friday, August 15, 2008 3:49 AM
  • Hi MTHasan,

    It sounds very strange and I don't think it is causing by permissions setting. As far as I know there is no way  to set permissions on columns only.

    The only thing I can think of at moment is that, you and your user are seeing web part rendered by different XSLT? Check web part settings with both you and your users account logged in.

    Also, are you sure it is Content by Query Web Part?  To me it sounds like you are using Data Form Web Part or List View Web Part?

    If it is List View Web Part, maybe you are seeing different views.

    Please let us know more details or screenshot for this issue.

    -James
    - James Tsai
    Friday, August 15, 2008 5:35 AM
  • I am an admin level user, so I can all the lists and data within Share Point.  The user's should also be able to see the data within the lists that are being queried since their permission is set to that.  The page that I created that contains the CQWP has permissions set for the users that need to access it.

    Another anomaly that I see is that the users do not have all columns missing, only 3 out of the 4.  The can still see the column with the task name, just not the Assigned To, Status and Workflow Link columns.

    It looks like I can't paste a screenshot in this forum?  I can describe the screenshot.  The first screenshot, which is what I see as an admin, show's 4 columns.  The second screenshot, which is what the user sees, shows 1 column of the task title.

    Friday, August 15, 2008 3:12 PM
  • Here are the screenshots, hosted on TinyPic.

    Screenshot1:
    http://i33.tinypic.com/2ywfiok.jpg

    Screenshot2:
    http://i33.tinypic.com/2u5c65z.jpg
    Friday, August 15, 2008 3:22 PM
  • Hi MTHasan,

    Thank you for the screenshots to clarify what your problem is.

    From the screenshots and the way you describing it. I am pretty confident to say it is "List View Web Part" not "Content Query Web Part"? *But I could be wrong :p

    Let's assume it's a List View Web Part for now and see whether following steps can help to resolve your problem.

    1. You see that arrow icon on top right-hand corner of the web part? Click on it and select "Modify Shared Web Part"

    2. Now, in the web part setting panel on the right-hand side of the screen you should see "Selected View" section.

    3. Make sure in the "Selected View" drop down list, the same view has been selected for both you & your users account.

    4. If views are the same. Go click on "Edit the current view" and make sure all nessary columns are selected.

    I'll take my guess that in step 3. you will find different view has been used for both you and your users? Please do not hestate post more screenshots or describe what you see differently from what I have wrote. If you still cannot resolve this problem.

    Looking forward to your reply and for more details about List View Web Part - Microsoft Office Online

    -James


    - James Tsai | wwww.jamestsai.net | SharePoint Blog
    Friday, August 15, 2008 3:59 PM
  • Hi James,

    Although your suggestion is not the answer, it did help me get to the answer.  The webpart is truly a CQWP with a custom designed layout (I edited the ItemStyle.xls and ContentMain.xls to show the extra columns by using the CommonFields method to pull the extra columns).  I discovered this when you suggested to check the Selected View.

    When I checked it, what I found is that my end users were looking at the Default layout with Image on Left layout.

    The view that I am seeing is a custom view that I created with the added columns.  What was happening is that I edited the ItemStyle.xls file in the home directory Style Library.  I checked the permissions on that file and sure enough the end users had Limited Access on that file, which means that they wouldn't be able to get all the custom style layout that I developed.

    I changed their permission, and now it works just fine.

    Thanks guys!

    Edit:
    I also had the ContentQueryMain.xls, and ItemStyle.xls file uploaded as minor versions (1.1 instead of 2.0), and end users have access to only major version files.  Once I had published them as major versions, things started working normally.  So remember, whenever you create a CQWP and also have a custom layout via editing the .xls files, make sure to upload them as major versions.
    • Marked as answer by MTHasan Friday, August 15, 2008 4:22 PM
    • Edited by MTHasan Friday, August 15, 2008 5:39 PM Additional Information
    Friday, August 15, 2008 4:22 PM
  • thank you.  I had to publish the ItemStyle.xls as a major version and that took care of it for me.
    Wednesday, May 04, 2011 5:58 PM