SharePoint 2013: Workaround: Cannot add web part to Community Portal page
Requirement: Customer wants to add a Content Editor web part to Community Portal page
Problem: When user clicks on the Gear icon>> 'Edit Page', then clicks 'Add a Web Part' there is no response
Workaround: Below is an out-of-the-box workaround.
- Create a 'Web Part Page' (via
SPD 2013 (SharePoint Designer 2013) or the GUI).
NOTE: It doesn't matter where this page lives, it will serve as
nothing more than a place to create the Content Editor Web part and
configure it to export to your Community Portal page. - Add the Content Editor Web
part to this 'Web Part Page' and configure it as you wish. (I added some
text and a few hyperlinks.)
- Save this page.
- Open this page in SharePoint
Designer 2013 and choose 'edit file'. Locate the Content editor web part
code. The easiest thing to do is locate the tag
<WebPartPages:ContentEditorWebPart and click on it. Now look towards
the bottom right of SharePoint Designer and you will see a highlighted tab
that says <WebPartPages:ContentEditor…>. Click on that tab, it will
select all the code you need.
Copy the code (crtl+c)
Open the Community Portal in
SharePoint Designer 2013Right-click on 'default.aspx' and choose 'New from Existing Page'
This will create a copy of default.aspx called 'untitled.aspx'. Go to 'File>>Save As', and name
it something like 'default2.aspx'.In the code, locate the tag
<WpNs1:ExistingCommunitiesWebPart runat="server"
Title=""…Place your cursor in front of it and hit 'Return'. This
will give you some space to paste in the Content Editor Web Part
code
Paste the Content Editor code
(ctrl+v)Click 'Save'
Right-click on default2.aspx (or whatever you named this page) and choose 'Set as Home Page' (This will
now set this new page as the default home page so that when users browse
to your Community Portal via https://domain/sites/CommunityPortal ) it will automatically go
to this page (in my example default2.aspx)
Browse to your community
portal and you will now see the Content Editor Web part there.Note: I also deleted/commented out the search web part because it will now throw an
error up at the top right
Go back to the code for
default2.aspx page (or whatever you named it) and look for the tag
<spsswc:SearchBoxScriptWebPart, click on it. Just like before, a
highlighted tab will appear on the bottom right corner of your screen.
Click that tab to select the code you need to remove or comment out.
Comments
Anonymous
October 01, 2013
That's nice, but how to search for communities from this site right now?Anonymous
May 02, 2014
just use firefox or chrome... weird IE bugAnonymous
May 06, 2014
After edit the content search webpart I cannot save. It is still the same around apply your workaround.Anonymous
July 27, 2018
Thanks :)