SharePoint 2013 File Not Found Missing Page Layout - sharepoint

How do I detach a page layout from a page and attach a different one? Is there a powershell command. SharePoint Designer is throwing an error.
I deployed a new set of master pages and page layouts and removed my old ones. I missed detaching a couple pages from the page layouts and now when I try to open those pages I'm getting a File Not Found. I've recovered the old page layouts and I still cannot open the pages. I tried detaching the page layout in SharePoint Designer but it's throwing an error "operation is not valid due to the state of the object."

I found the solution:
I had to download the page and edit the properties in a text editor and then upload the file. DO NOT DELETE THE FILE on the SharePoint site and re-add. It but be copied over the original.
Steps to fix this issue.
Download the SharePoint Page.
Navigate to the location of the new page layout
Take note of the following:
1) Name
2) Title
3) ContentTypeId (IN THE URL).
Edit the Page in text editor - use the values from above without the "*" below.
Replace xxx.xxx.com with your site.
|mso:ContentTypeId msdt:dt="string"|***ContentTypeId*|/mso:ContentTypeId|
|mso:PublishingPageLayoutName msdt:dt="string"|Name|/mso:PublishingPageLayoutName|
|mso:PublishingPageLayout msdt:dt="string"|https://xxx.xxx.com/_catalogs/masterpage/Name, Title|/mso:PublishingPageLayout|
Upload the Page to the same location as the original.

Related

SharePoint 2013 Page Layout Error

I'm really finding it difficult to set up a new theme for my SharePoint 2013 site.
I have uploaded all other files to the design gallery. But when I uploaded the page layouts, and I try to change the Content Type to Page Layout, I get the error below:
Sorry, something went wrong List does not exist.
The page you selected contains a list that does not exist. It may have been deleted by another user.
Technical Details
Correlation ID: ce2b429d-0147-d0c2-bc23-32b039f7d8a6
Please what can I do to resolve this?
Thanks.
I got it working by disabling the publishing feature under > site settings > Site Collections Feature > SharePoint Server Standard Site Collection features
Deactivate
Reactivate
Rebooted the server (probably could have done an IISReset but
overkill!)
Now I can add layout pages under master pages gallery.
In the browser, go to your site, and on the Site Actions menu, click
View All Site Content, and then click the Pages document library.
Or you can browse directly to
http://your_site/pages/forms/allitems.aspx, where your_site is the URL
for your site, such as fabrikamweb/finance for the
http://fabrikamweb/finance subsite.
The Pages document library is created automatically by the publishing
feature and contains all of the pages in a site that are created from
page layouts. You can look in the Page Layout column to see which page
layout was used for a specific page and then click the link to view
that page in the browser.
https://support.office.com/en-us/article/Customize-a-publishing-page-layout-c10bda25-0145-44c6-ba14-7757176fb47f

Create Template Page in Sharepoint 2013

I am unable to create template page in sharepoint 2013.
Is there a way to do so ?
Thank You !
To create a page layout:
Browse to your publishing site.
In the upper-right corner of the page, choose the gear icon, and then choose Design Manager.
In Design Manager, in the left navigation pane, choose Edit Page Layouts.
Choose Create a page layout.
In the Create a Page Layout dialog box, enter a name for your page layout.
Select a master page.
The master page that you choose here will be shown in the preview for this page layout. This master page also determines what content placeholders get added to the page layout.
Note
After you choose this master page, you cannot preview the page layout with a different master page, even after you apply a different master page to the live site.
Select a content type. The content type for this page layout determines what page fields will be available for this page layout in the Snippet Gallery.
Choose OK.
At this point, SharePoint creates an HTML file and an .aspx file with the same name. In Design Manager, your HTML file now appears with a Status column that shows one of two possible statuses:
Warnings and Errors
Conversion successful
Click the link in the Status column to preview the file and to view any errors or warnings about the master page.
The preview page is a live server-side preview of your page layout. The top of the preview displays any warnings or errors that you may have to resolve by editing the HTML file in an HTML editor. Errors must be fixed before the preview will display the page layout correctly.
The preview page also contains a Snippets link in the upper-right corner. This link opens the Snippet Gallery, where you can begin replacing mockup controls in your design with dynamic SharePoint controls.
To fix any errors, edit the HTML file that resides directly on the server by using an HTML editor to open and edit the HTML file in the mapped drive. Each time you save the HTML file, any changes are synced to the associated .aspx file.
The preview of the page layout shows the page fields that were added automatically to the page layout. These page fields are site columns that are unique to the current content type. Now you are ready to style the page layout according to your original HTML mockups.
Source

Add a WebPart to a publishing page layout

I've been trying to figure out a way to add a web part onto a page layout. Whenever I try to add a web part zone or web part via the menus in SharePoint Designer, nothing happens. The web part I selected is highlighted blue, but nothing happens.
I have been trying to add the .webpart code on the .aspx page layout with zero luck.
<WebPartPages:WebPartZone>
<ZoneTemplate>
.webpart code in here!
</ZoneTemplate>
</WebPartPages:WebPartZone>
The above just shows the web part zone, and the ability to add a web part, but doesn't show my web part.
I've tried placing the code outside the Zone Template and the WebPartZone, but I typically just get everything between the property tags displaying as text.
You cannot add the codes to get your webpart embeded on a page , you have to open the page layout in a designer and drop the webpart on that specific area - there may not be anyother work around for this
Regards
Arjun
SharePoint was not updated to support creating the snippet of code to add the WebPart to the Page Layout like it is possible with old fashioned WebParts.
Even when inserted in the Page Layout .html file, it is stripped out when the corresponding .aspx file is generated.
We found a workaround which is far from ideal but works:
Edit your Page Layout as you would normally in HTML
Add a WebPart zone where you would like to see the WebPart
Save the HTML and let SharePoint generate the aspx file
Manually edit the aspx file -- don't use SharePoint Designer, as it will strip out what you added -- with a plain text editor and insert the code from the webpart definition (the XML file)
Save the aspx and when you create a page using the page layout, your SPFx webpart should be there
Note that for the WebParts parameters, it is stored as a JSON structure encoded in HTML. To figure out how to setup default parameters in the inserted WebPart, insert it into a regular page manually and look at what has been generated in the aspx file. Then find the long line that has the encoded JSON structure and copy it back to your edited aspx file.
Finally, never edit/save your page layout HTML file since it ewill then simply override your changes. I would keep a copy of your edited aspx file just in case!
It sounds like you're trying to use a Visual Web Part with SharePoint Online, which you can't do. Web parts for SharePoint Online need to be packaged as a part of a solution.
To deploy a solution to SharePoint Online you need to:
Navigate to the solutions gallery: https://<yourfarmsite>/catalogs/solutions/forms/allitems.aspx
Providing that you are logged in with the correct account and have permissions, this will take you to the solution gallery, where you can upload and activate custom web parts for site.
Click the Solutions Menu
Click Upload Solution
Browse to your custom .wsp file and click OK
After the web part has been uploaded, you can activate it; select the web part and click Activate
Now that the custom web part is uploaded and activated in the Solution Gallery, you can edit the site page that you want to add it to and then add it as per a normal web part.

How to get Site Icon to properly update in Sharepoint 2010 Web Part Page

I'm working on creating a reusable and extensible web application in SharePoint 2010. I've created a master page to apply across all pages in the site. However, whenever I create a web part page and navigate to it, the site icon does not display. Instead of my custom site icon being displayed it shows the default SharePoint icon. I can get around this by placing the icon directly into the master page, but that would require me to create a new master page if I ever wanted to extend this web application.
Does anyone know why this is happening? My initial thought was that the web part page had somehow been customized to not use the default master page, but that does not seem to be the case: if I update the master page it is reflected in the web part page.
Googling around and checking this site yielded little answers. I only found one post out there that reported the same issue I am observing but there was no solution.
If it helps, I did notice one phenomena when navigating to this page. Before the page completely loads, the correct site icon appears for a split second before being replaced with the default site icon. Hope that helps.
I ran into the same issue this morning and didn't want to create a custom master page just for this, but luckily it was quickly resolved by following admlcrunch's suggestion (on SharePoint 2010):
Go to the desire page
Click on the "Page" tab at the top
Click on the "Title Bar Properties" at the right (in the ribbon)
In the Image Link section on the right, paste in the image URL
Click OK
The only bad thing about this is, you have to update every Web Part page that you want custom icon image to display.
I was just having the same issue. Web Part Pages have their own icon that you can set.
To set the icon click Page > Title Bar Properties. This will open the Web Part Page Title Bar dialog. In this dialog there is an area to set the Image Link. You can set the icon here. I just copied the URL to the site icon.
Open the page in designer and remove the custom titlebar place holder:
[WebPartPages:TitleBarWebPart]
from the :
[asp:Content ContentPlaceHolderId="PlaceHolderPageTitleInTitleArea"]

SharePoint Document Library 404 Error

Help-
Any idea what would cause sharepoint's doc library's tree view navigation to break?
What-
We have a sharepoint site that uses the template Document Center to hold all of our docs. In the master page of the site there is a site hierarchy showing a tree view for all the folders in the document library. When clicking on the folders from the tree view we get a 404 error but navigating to the folder from the document viewer webpart on the child page works fine.
When-
The issue started yesterday when my boss was playing around w/ the appearance of the document library web part's Chrome type trying to add a link to the top to get better breadcrumb navigation when using the folder links in the webpart.
Example:
Clicking on the root folder of the document library named "Documents" goes to this url w/ a 404 Error:
http://portal.domain.net/firmdocs/Documents
Go here we get a listing of the items:
http://portal.domain.net/firmdocs/Documents/Forms/AllItems.aspx
What did I try
We didn't change the name of the doc library recently
I am going to do an IIS reset tonight
Tried changing the chrome type back to what it was w/ no luck.
Checked the master page and child page back up versions from a few months ago and no luck. Also the current fiels have not been edited anytime soon.
Did you modify any of the views for the DocLibray? It could be a link to an invalid view.
This usually happens when the original ListViewWebPart in the view is tampered with in some way.
Check to make sure your boss hadn't accidentally closed the original ListViewWebPart in AllItems.aspx
To do that, navigate to http://portal.domain.net/firmdocs/Documents/Forms/AllItems.aspx?contents=1 (the ?contents=1 is the important part)
You should see only one ListViewWebPart in that list.
The other thing you can try is opening AllItems.aspx in SharePoint designer. Make any change to the page (insert a space in the markup, for example) and save it, clicking yes on the prompt to customize a page from the site definition. Once it's saved, right click on it and "Revert to Site Definition."

Resources