Error while creating SharePoint Custom Page Layout 2016 - sharepoint

In SharePoint on premises(2016).I have created a custom page layout which got deployed successfully and feature got activated. After that in site while creating the layout with the help of that layout I an getting "Sorry Something Went wrong Error message"

Check the steps from the article below:
How To Create A Page Layout (PageLayout) With ContentType
And get more error message from ULS log, for SharePoint 2016, by default, ULS log locates in
"C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\LOGS"

Related

SharePoint 2013 custom pages

I use SPWebApplication.UpdateMappedPage to update the default application pages with my custom pages. This seems to work with Sharepoint 2010. However, when I use the same code in SharePoint 2013 on any WebApplication, it does not reflect the changes. It defaults back to the specific SharePoint page (ex: 15\layouts\accessdenied.aspx) and does not use my custom page (ex: 15\layouts\custompages\accessdenied.aspx).
When I use this command:
Get-SPCustomLayoutsPage -Identity "AccessDenied" -WebApplication MyWebApp
it shows that the WebApplication is updated with the new value.
I have followed the steps from : http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spwebapplication.updatemappedpage.aspx but does not work on SharePoint 2013.
Is there something that I'm missing here?
This is an identified issue and will hopefully be resolved in a future hotfix. Here are my findings: http://blog.randomdust.com/index.php/2013/07/custom-access-denied-page-in-sharepoint-2013/
PowerShell Script:
We created and applied the custom Access Denied page in the web applications
Create the “custompages” folder in Layouts folder and WEB FRONT END server:
"c:\Program files\Common Files\Microsoft Shared\Web Server Extensions\
15\TEMPLATE\LAYOUTS\ custompages \Accessdeniederror.html"
Run PowerShell Command :
Set-SPCustomLayoutsPage –Identity "AccessDenied" –RelativePath
"/_layouts/15/custompages/Accessdeniederror.html" -WebApplication "http://raghuserver/"
Check Custom Layouts Pages Applied:
Get-SPCustomLayoutsPage –WebApplication “http://raghuserver/”
Run iisreset.exe.

Where does SharePoint store elements.xml and schema.xml for custom content types and list?

As described in the title I'm just trying to find out where SharePoint 2010 stores the elements.xml and schema.xml files for custom content types and list definitions if anyone could help please.
What I'd like to do is rather design my custom content type and list in the SharePoint GUI in the browser and then go and extract the SharePoint generated files in order to use in a solution built in Visual Studio instead of coding everything manually from scratch.
Hope that makes sense! Thanks!
You will not find them stored on your hard disk but rather in your Content_DB.
If you need to access them to grab the schema, you could use SharePoint Manager 2010, and navigate to your content type from it and copy the Schema Xml tab.
Here "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES"
For example, "Contact List Template" located at "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES\ContactsList"
Mhd. Yasseen was correct. The default built-in templates from Microsoft are in the 14 hive but anything custom by the user is stored in the Content Database for that web application. Another common approach you may look for is to save the site as a template, and then create a SharePoint project based on that WSP. This means everything is already setup for you, and you only need to delete the things you don't want from the site.

sharepoint showing error after uploading a new webpart

I am new to Sharepoint and was playing with the webparts. I downloaded a zip file called LyteBoxForSharePoint and uploaded the webpart using add a web part function. Now I am getting errors. The good thing is, that it's only my dept page. The bad thing is I have no clue what happened. All other pages beside the dept landing page is working. So, I am guessing it's only the landing page that has the issue. Is there a way to find out what code was added or to revert to old code. The error I get is the following, and it keeps on changing every time I refresh the page.
An unexpected error has occurred.
Troubleshoot issues with Microsoft SharePoint Foundation.
Correlation ID: e8eca359-70f9-42d0-b41e-834fbe0fc910
Date and Time: 2/23/2012 2:47:39 PM
Could be anything, most common error in SharePoint is authentication errors where a web part is trying to reach content the logged in user cannot reach
You should check the logs, they are available in the directory C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS
Open the last modified log file and search for your Correlation ID, e8eca359-70f9-42d0-b41e-834fbe0fc910
When you find the errors there you will now and also be able to post something that we can use to help you.
Then there is always the webpart maintenance page: /_layouts/spcontnt.aspx?url= http://sharepointserver.com/_layouts/spcontnt.aspx?url=default.aspx
Rex,
first browse the page which is giving webpart error and copy the new correlation id and go to the log folder under 14 hive and open the latest log file and find the correlation id. it should give you the error details if logging is not disabled.
also you can go to the webpart manger on the page to revert the page to the previous state by adding contents=1 as query string and in this page you will get list of webparts with checkbox against each. select the faulty one and revert to previous version if any or delete it.
you can also use SPD2010 to remove the webpart with error. alternating powershell can be also used.
One way to check if the webpart is installed is to type ?contents=1 after your url. There is also stsadm -o preupgradecheck and unfortunitely stsadm has another command to list all webparts but I cannot think of it at this time

Page Not Found Error on SharePoint Sites in TFS

I'm in big trouble here, today i was asked to add a new user to TFS, the first thing I do is adding it to SharePoint, but now every time I tried to enter the project portal (Team Explorer -> right click on project -> Show project portal) I got an page not found error, with every single project, Here are some basic info about the setup:
2 Tier TFS, TFS server, ReportServices and SharePoint are on the same server.
If I try to enter administration portal on this server (cd21vids1 is the tfs server)
http://cd21vids1:17012/ -- I get Directory Listing Denied
http://cd21vids1:17012/default.aspx -- I get the default page, which works OK.
If i enter a project site i get this results (88 is the default port for SharePoint in this server):
http://cd21vids1:88/Sites/Cnbv.Framework/ -- Page not found
http://cd21vids1:88/Sites/Cnbv.Framework/default.aspx -- I get the page but with no styles and the layout is wrong, also i get an error on the "remaining work" report (directory listing denied), the reports that have problems are "Issues List" and "Exit Criteria Status" (Directory Listing Denied on both cases).
Everything else seems to work OK, (builds, check-ins), I hope you can help me out, thanks.
Juan Zamudio
UPDATE: I did some more tests, i get a page not found error in the url
http://cd21vids1:88/Sites/Cnbv.Framework/_styles/core.css
Maybe this is way I get the default page without the correct layout.
UPDATE2: Also when I click the "Windows Sharepoint Services Site Administration" link I get this error:
"The Team Foundation Server could not locate the online Site Administration application for this team project portal in Windows SharePoint Services. The most likely cause of this error is that the language settings on the team project portal do not match the current language of your Visual Studio client. The location of Site Administration is specific to the language of the project portal. Contact the Team Foundation Server administrator for availability information of Site Administration for this project portal. For more information, see the Windows SharePoint Services Administrator's Guide."
Someone changed the language to the server from English US to Spanish MX, I changed the language back to English and restarted the server but no dice (BTW I already had a folder named 2058 in "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\" like explained in this post
my SharePoint problem is fixed, here are the details.
Run "SharePoint Product Technologies Configuration Wizard"
1.1. Select do not disconnect from this server farm, click next
1.2. Select No, this machine will continue to host the web site, click next.
1.3 Click Next
Restart IIS
I have had the same problem with the core.css file. I didn't want to use Sharepoint designer to solve it cause it would have unghosted my site!
So I tried this (it works) : on the site administration, go to "master page", and down the page you have a way to redefine the css used for the site. So i put there the url :/_layouts/1036/Styles/core.css (1036= French, so use 1033 if you are site is in english!), and after validation it worked.
The problem is that the page still try to get the core.css from http://MYServeur/_styles/core.css ..and return a 404!
But at least I have my style back. I just post it in case... I still hope a real better solution...
AJ

"The selected files was not found" on an InfoPath form in Sharepoint

When using a file attachment control on a InfoPath form as part of a SharePoint workflow I get the error "The selected files was not found".
Found this online somewhere but can't find it again to link. You need to modify the following file:
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\WrkTaskIP.aspx
Add:
<script type="text/javascript">aspnetForm.encoding = "multipart/form-data";</script>
into the file just before the first table opening tag. iisreset and then the attachment control of the form should work when hosted inside a workflow.

Resources