Web Part Connections Not working - Web Parts Disappearing off page - SharePoint Development & Administration + InfoPath

Thursday, July 22, 2010

Web Part Connections Not working - Web Parts Disappearing off page

Scenario:
Single Web Part being used to pass filter values to multiple web parts on a page.  After making changes to Web Part connections, only the most recent connection works.  All other connections previously configured on the source web part no longer worked.  The Web Parts being connected to were no longer displayed on the page.  In the end I was able to resolve the issue, but was not sure of the underlying cause.  My suspicions lean toward the custom web parts being used not being able to handle Web Part Connections properly.

Issue:
After completing the initial configuration of the various web parts on a page, I started configuring web part connections between the web parts.  I noticed that after configuring a connection, that it would be the only connection that works once applied.  Any previously configured connections to other web parts no longer worked and the web parts disappeared off the page.

I found that if configuring the connection from the source or destination web parts (“Send data to..” or similar) by editing the page using the browser, the web Part connections we able to be configured properly, and worked as expected once applied.  If continuing to use the browser to configure or make changes to Web Part Connections, the changes remained in place on all web parts once applied.

I then wanted to adjust the text displayed by a web part if there were no items that matched the filter criteria, which I did using SharePoint Designer as the Web Part was a Data View.  I loaded the page in SharePoint Designer and made the changes to the Data View Web Part, but upon saving the changes to the page, all except one Web Part Connection stopped working.

When viewing the page in a browser once saved, all Web Parts previously connected to the source web part were not visible on the page.  Adjusting or re-setting the Web Part connection settings using SharePoint Designer had no affect on the connections once saved again and viewed in a browser.

My next step was to revert back to using the browser to configure the Web Part Connections.  I then found that if trying to adjust the configuration of the connections, or even remove them using the browser was no longer working at all (because of making changes using SharePoint Designer).  Removing the connections using the browser did not work, and if the page was opened using SharePoint Designer, the connection details were still inside the <SPWebPartConnections> element even after attempting to remove using the browser.  Similarly, if adjusting the configuration of a connection using the browser, the changes seem to work for that particular connection after pressing ok, but after exiting edit mode, the web parts were not visible.

Solution:
To resolve the Web Part Connection issues, I needed to remove all connections using SharePoint Designer, then manually remove the connection details from the <SPWebPartConnections> element.  Once this was done, the web parts were visible on the page again, with no Web Part connections configured.

Note: If further changes need to be made to the page or web parts using SharePoint Designer, it needs to be done here, before configuring the connections using the browser or the same issue will arise.

Using the browser, I re-configured each Web Part Connection from scratch, ensuring that the settings were being applied successfully each time.  Once complete, I published the changes and did some testing until I was satisfied that the filter values passed by web part connections were working as intended.

I am not sure why the connections were playing up, as I have not come accross this issue before.  In the case where I may forget that using SharePoint Designer to make changes to this page will break it, I have documented the process above.  If anyone knows an explanation of the cause, I would be very interested to find out.
Share this article:
Stumble This Delicious
Delicious
submit to reddit
Facebook
MySpace
MySpace

1 comment:

mkamoski said...

The same thing is happening to me. Again, SharePoint is not working as advertized. Ug.

Post a Comment