Reputation: 21
What I thought was an issue creating a reusable dataview webpart that would be parameter fed to work across sites based on the WebURL has turned into a larger problem for me. Until yesterday, I hadn't had any issues creating dataviews on the pages library. Now, I try and create a dataview and bring in just the @Title
field, make it work across sites by changing the ViewFlag
property from '8' to '0' and the ListID
parameter to ListName
and send it to the gallery.
Attempting to add it to any page receives:
An error occurred while attempting to add the item to the page.
Again, I have created multiple data-views on the pages library already that are much more complex using the same steps. I've even made the WebURL parameter fed so I can use this webpart to grab data from the pages library of sub sites.
I've tried checking the error log and am unable to fully comprehend its meaning given my lack of experience.
Other things I have noticed:
My webpart works 100% in SharePoint Designer with all of the filtering/styling applied. Trying to change the parameters in the browser receives this error:
Cannot save all of the property settings for this Web Part. An error has occurred.
UPDATE: The reason that this error occurs is because after I change the parameter in the parameter's editor, I checked the XSL editor and it is wiped clean.
Furthermore, I've created the same columns in a custom list and was able to implement everything perfectly fine leading me to believe that the problem resides with the data source.
Any help or even a point in the right direction would be helpful. This is a complete show stopper for my current engagement.
Upvotes: 1
Views: 962
Reputation: 184
Just to let anyone else know who is looking for a solution to this error, this can seemingly be caused by too many entries in the parameter for DataFormWebParts / XSLTListViewWebParts
I have been able to confirm, with a client's particularly unwieldy list (a survey based list as it happens), that SP Designer was adding all of the lists' many columns to this tag, despite my having only selected a small number of them for a list view. Trying to append any changes from the browser resulted in the error detailed in the OP.
Reducing the fields present in the tag to only those required for my view to function, corrected this issue.
Upvotes: 0
Reputation: 21
The problem was not at all what I had thought. It ended up stemming from a column I added to the page content type. once removed from all the pages libraries everything worked as normal.
Upvotes: 1
Reputation: 281
I would start by creating the web part exactly like you want it on the same site as the data source (on a test page). When you have it like you want it, you can then do the viewflag/listID thing to make it work across site and implement it on a subsite.
Upvotes: 0