Validate Sharepoint site url using javascript
Hi All,
I have the below requirement.
User enters sharepoint site in a textbox and clicks on button.
On button click, we have to validate the entered sharepoint site exist or not.
All the code should be in client side. No server side code
This should be achieved using javascript.
So, if anyone has a solution for this, could you please help me in sharing the code for the requirement.
Thanks & Regards,
Kishore
Kishore
Hi Kishore
Please go through the links and below code..
It'll help
Validation of the entered SharePoint Site
1. _spUserId (Variable)
This variable gives the ID of the logged in user. For an anonymous user, this variable will be empty.
var uid = _spUserId;
You can test this variable in the address bar of your browser. Try
javascript:alert(_spUserId);
You will see an alert message with the ID of the logged in user.
2. JSRequest (Object)
Using this JSRequest object, we can get the querystring, pathname and filename. Before using any of these properties, you should call JSRequest.EnsureSetup();
Ex: page url is http://www.xyz.com?qid=15
To get a querystring value
JSRequest.EnsureSetup();
var q = JSRequest.QueryString["qid"]; // q = 15
Similarly, you can use
JSRequest.EnsureSetup();
var f = JSRequest.FileName; // current page name
var p = JSRequest.PathName; // server relative url
3. GetUrlKeyValue(parameter, noDecode, url) (Method)
GetUrlKeyValue() is a javascript function using which we can get the Query string parameter either from url in the browser or a url that we specify.
parameter(string): query string parameter from the url.
noDecode(bool): specifies whether the value has to be encoded or not. If false value is decoded, else returned as it is.(Optional)
url(string): the url from which Query string values are to be retrieved.(Optional)
Ex:
alert(GetUrlKeyValue('a', false, 'www.xyz.com?a=te%20st'));
The above statement will return the value ‘te st’. Here we are specifying our own url.
alert(GetUrlKeyValue('a', false));
The above statement will look for a query string variable ‘a’ in the browser url, and returns the decoded value.
alert(GetUrlKeyValue('a'));
The above statement will look for a query string variable ‘a’ in the browser url.
4. _spPageContextInfo (Object)
_spPageContextInfo object has several useful properties, some are
a. webServerRelativeUrl (for current web)
b. siteServerRelativeUrl (current site collection url)
c. webLanguage (for localization)
d. currentLanguage (for localization again)
e. webUIVersion
f. userId (current user id just like _spUserId)
g. alertsEnabled (more for current page if it has any alerts on it)
h. allowSilverlightPrompt (to have that prompt or not on the page)
i. pageItemId
j. pageListId (Guid)
We can get the webServerRelativeUrl simply by saying
var url = _spPageContextInfo.webServerRelativeUrl;
All the remaining object properties can be used in the same way.
5. escapeProperly(str) (Method)
This function returns the URL encoded value of a given string.
var s = escapeProperly("hello world!!"); //s = "hello%20world%21%21"
6. unescapeProperly(str) (Method)
This function decodes a URL encoded string.
var s = unescapeProperly("hello%20world%21%21"); //s = "hello world!!"
7. STSHtmlEncode(htmlString) (Method)
This function encodes an html string
var s = STSHtmlEncode("<p>sample text</p>");
//s = "<p>sample text</p>"
8. TrimSpaces(str) (Method)
This method trims out the leading and trailing white spaces of a string. It doesn’t remove spaces created by special characters such as ‘\n’, \t’
var s = TrimSpaces(" Hello World!! "); //s = "Hello World!!"
I intentionally put more spaces between ‘Hello’ and ‘World!!’ just to show that this method doesn’t remove any spaces between words.
9. TrimWhiteSpaces(str) (Method)
This method trims out the leading and trailing white spaces of a string. It also removes spaces created by special characters such as ‘\n’, \t’
var s = TrimWhiteSpaces("\n\nHello World!!\t\t"); //s = "Hello World!!"
10. LoginAsAnother(url, bUseSource)
This method is used to login as different user.(as the name says)
url(string): the url of the page to which the new user has to be sent after login.
bUseSource(boolean): A boolean that indicates that the source will be added to the url, otherwise the source will be the window.location.href. This parameter is optional, default is false.
<a href="#" onclick="javascript:LoginAsAnother('\u002f_layouts\u002fAccessDenied.aspx?loginasanotheruser=true', 0)">Log on as a different user</a>
11. STSPageUrlValidation(url)
This function validates a url if it starts with “http” or “/” or “:” ONLY. It returns the url value back if it is a valid url and an empty value if it is an invalid url. If the url is not valid, an alert message is displayed that says “Invalid page URL:”.
var s = STSPageUrlValidation("praneethmoka.wordpress.com"); //s = praneethmoka.wordpress.com
var s = STSPageUrlValidation(":praneethmoka.wordpress.com"); //s = "";
var s = STSPageUrlValidation("w.wordpress.com"); //s = "w.wordpress.com";
Now please don’t ask me what kind of a validation this is.
STSPageUrlValidation(url) in turn calls a method PageUrlValidation(url) and here’s the code for PageUrlValidation method
function PageUrlValidation(url)
{ULSA13:;
if((url.substr(0, 4) == "http") || (url.substr(0, 1) == "/") || (url.indexOf(":") == -1))
return url;
else
var L_InvalidPageUrl_Text="Invalid page URL: ";
alert(L_InvalidPageUrl_Text);
return "";
Indul Hassan
Microsoft Community Contributor
http://www.indulhassan.com
You Snooze.. You Lose !!
Similar Messages
-
How to pass a single quote in a URL using Javascript
Can someone tell me how to pass a single quote in a URL using Javascript. I have created a Javascript funciton in which I pass several column values from an APEX report.
The URL for the report link I am using is "JAVASCRIPT:passBack('#EMP_ID#','#Name#','#e-mail#')"
The problem occurs with the Name and e-mail columns contain a single quote (i.e. James O'Brien)Thank you Saad, that worked.
Since I built the report using type 'SQL Query (PL/SQL function fody returning SQL query)' I had to add some additional quotes to get it to work.
i.e.
replace(EMP_EMAIL_NAME,'''''''',''\'''''')
or
replace(EMP_EMAIL_NAME,chr(39),''\'''''')
Thanks for the help,
Jason -
hi friends
i am trying to set peoples or groups field in sharepoint list form with current user login name
here my code
<script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.0.js"></script>
<script type="text/javascript">
$(document).ready(function NewItemView () {
var currentUser;
if (SP.ClientContext != null) {
SP.SOD.executeOrDelayUntilScriptLoaded(getCurrentUser, 'SP.js');
else {
SP.SOD.executeFunc('sp.js', null, getCurrentUser);
function getCurrentUser() {
var context = new SP.ClientContext.get_current();
var web = context.get_web();
currentUser = web.get_currentUser();
context.load(currentUser);
context.executeQueryAsync(onSuccessMethod, onRequestFail);
function onSuccessMethod(sender, args) {
var account = currentUser.get_loginName();
var accountEmail = currentUser.get_email();
var currentUserAccount = account.substring(account.indexOf("|") + 1);
SetAndResolvePeoplePicker("requester",account);
// This function runs if the executeQueryAsync call fails.
function onRequestFail(sender, args) {
alert('request failed' + args.get_message() + '\n' + args.get_stackTrace());
function SetAndResolvePeoplePicker(fieldName, userAccountName) {
var controlName = fieldName;
var peoplePickerDiv = $("[id$='ClientPeoplePicker'][title='" + controlName + "']");
var peoplePickerEditor = peoplePickerDiv.find("[title='" + controlName + "']");
var spPeoplePicker = SPClientPeoplePicker.SPClientPeoplePickerDict[peoplePickerDiv[0].id];
peoplePickerEditor.val(userAccountName);
spPeoplePicker.AddUnresolvedUserFromEditor(true);
</script>
but it is not working
please help meHi,
According to your post, my understanding is that you wanted to set "peoples or groups" field with current user "login name" in SharePoint list form using JavaScript.
To set "peoples or groups" field with current user "login name”, you can use the below code:
<script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.0.js"></script>
<script type="text/javascript">
function SetPickerValue(pickerid, key, dispval) {
var xml = '<Entities Append="False" Error="" Separator=";" MaxHeight="3">';
xml = xml + PreparePickerEntityXml(key, dispval);
xml = xml + '</Entities>';
EntityEditorCallback(xml, pickerid, true);
function PreparePickerEntityXml(key, dispval) {
return '<Entity Key="' + key + '" DisplayText="' + dispval + '" IsResolved="True" Description="' + key + '"><MultipleMatches /></Entity>';
function GetCurrentUserAndInsertIntoUserField() {
var context = new SP.ClientContext.get_current();
var web = context.get_web();
this._currentUser = web.get_currentUser();
context.load(this._currentUser);
context.executeQueryAsync(Function.createDelegate(this, this.onSuccess),
Function.createDelegate(this, this.onFailure));
function onSuccess(sender, args) {
SetPickerValue('ctl00_m_g_99f3303a_dffa_4436_8bfa_3511d9ffddc0_ctl00_ctl05_ctl01_ctl00_ctl00_ctl04_ctl00_ctl00_UserField', this._currentUser.get_loginName(),
this._currentUser.get_title());
function onFaiure(sender, args) {
alert(args.get_message() + ' ' + args.get_stackTrace());
ExecuteOrDelayUntilScriptLoaded(GetCurrentUserAndInsertIntoUserField, "sp.js");
</script>
More information:
http://alexeybbb.blogspot.com/2012/10/sharepoint-set-peoplepicker-via-js.html
Best Regards,
Linda Li
Linda Li
TechNet Community Support -
Development on SharePoint on-line using JavaScript in an Script Editor
Hi,
I’m doing a SharePoint development on SharePoint on-line using JavaScript in a Script Editor. I've changed the Calendar NewForm.aspx in SharePoint designer and I should check the Start Date and End date and I should change the procedure of Save button.
The problem is I cannot have the component ID’s. I even tried to create new components and rebuild the form but my script sometimes working and sometimes not working.
I've also tried SharePoint Apps in Visual Studio 2013 and Napa but I have problems accessing SP lists.
Could you please advise me?Hi Sachin,
Before I read you reply, I had a "Eureka" moment that I was about to write about. I got my Javascipt to read my the value that was set in the Filterdropdown! However, you somewhat burst my balloon with the revelation about how re-sizing
window changes their size (i.e., Large to Medium, etc)? It is true, my function does not work when I click the "restore down" icon on the upper right corner of my window, then it works again when I maximize the window. That sucks : (
Oh, well. Thanks just the same!
For what it is worth, here is the script I wrote:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<script language="javascript">
//This function reads the digest using /contextinfo.
function ShowAlert()
alert(document.getElementById("Ribbon.ContextualTabs.MyWork.Home.Data-Large-2-1").textContent);
</script>
</head>
<body>
What filter am I set to? Click the Button snd I will tell you... <input type="button" value="Button" onclick="ShowAlert()";/>
</body>
</html>
\Spiro Theopoulos PMP, MCITP. Montreal, QC (Canada) -
How to call a url using javascript
Hi friends
Iam a newbie i have a requirement
i have to call some n number of URL using javascript i have all my url in one table .... i have to call all the url from that table ... and the output of the url should be saved in a flat file...The output of the url is in XML format... can any one please suggest me in doing my task ... and one more thing in which tool can i run the javascript coding...please give me ur suggestion and idea how it can be done ....
My URL for example ll be like this as shown below wen i run this url it ll give me an XML format output
HTTP://www.myserver.com/ev_api.action?user_id=<username>l&password=<password>&statevar=history&cutoff=<date>&id=<id>
Thanks in advance
Thilibanthilib wrote:
In this OTN is there is javascript forum can please give me the link for it
Thanks
thilibJust to rephrase Walter's reply: there is no javascript forum in OTN! -
Calling a URL using JavaScript even handler
When I'm trying to call another URL using JavaScript, it doesn't work.
I did following things,
1).Created a Button
2).In javascript event handler, I'm calling Javascript function doSearch()
3). I wrote this function in Header Text Section of the Form Tex as below
<SCRIPT language="JavaScript">
function doSearch() {
location="http://www.oracle.com"
</SCRIPT>
When I saw the source of that button, it shows me as following,
--<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0"><TR><TD>
<INPUT TYPE="BUTTON" NAME="FORM_TO_CALL_CUSTOM.DEFAULT.CALL_REPORT.01" VALUE="CALL_REPORT" onClick="doSearch(); do_event(this.form,this.name,1,'ON_CLICK','');">
</TD></TR></TABLE></TD></TR></TABLE>
But, it doesn't call that URL.
Plz. guide me.
nullSorry, the code for the CALL_Report button is as follow.
--<Tab BORDER="0" CELLSPACING="0" CELLPADDING="0"><TR><TD>
<INPUT TYPE="BUTTON" NAME="FORM_TO_CALL_CUSTOM.DEFAULT.CALL_REPORT.01" VALUE="CALL_REPORT" onClick="doSearch(); do_event(this.form,this.name,1,'ON_CLICK','');">
</TD></TR></TABLE></TD></TR></TABLE
null -
Since the latest update to version 35, many sites that use javascript to manipulate images tend to crash firefox and make either the guilty tab or all of firefox close suddenly. (Firefox on Debian 7 Wheezy Linux, all updates current). I use firefox daily for web development and this regression bug is VERY annoying for my workflow. I understand you cannot take every situation into account. I do not have the time to investigate what has made Firefox less stable. I really hope you can fix this performance problem. If I can do anything concrete to help besides jumping into the code, let me know.
'''[https://addons.mozilla.org/en-US/firefox/addon/flashblock/ Flash block]''' {web link}
Never be annoyed by a Flash animation again! Blocks Flash so it
won't get in your way, but if you want to see it, just click on it
If you have problems with current Shockwave Flash plugin versions then check this:
* see if there are updates for your graphics drive drivers
'''https://support.mozilla.org/kb/upgrade-graphics-drivers-use-hardware-acceleration'''
* disable protected mode in the Flash plugin (Flash 11.3+ on Windows Vista and later)
'''https://forums.adobe.com/message/4468493#TemporaryWorkaround'''
* disable hardware acceleration in the Flash plugin
'''https://forums.adobe.com/thread/891337'''
See also:
* '''http://kb.mozillazine.org/Flash#Troubleshooting''' -
hi friends
i have to people picker fields
pp1 and pp2
pp1 represents username
pp2 represents email id
here i problem is if user enters name in pp1, pp2 has to update with email id of corresponding user in pp1 dynamically.
using java script is there any solution for this.
please help meHope below will help
<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
<script type="text/ecmascript" language="ecmascript">
var user;
var visitorsGroup;
function runCode() {
var clientContext = new SP.ClientContext();
var groupCollection = clientContext.get_web().get_siteGroups();
// Get the visitors group, assuming its ID is 4.
visitorsGroup = groupCollection.getById(4);
user = clientContext.get_web().get_currentUser();
var userCollection = visitorsGroup.get_users();
userCollection.addUser(user);
clientContext.load(user);
clientContext.load(visitorsGroup);
clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));
function onQuerySucceeded() {
alert(user.get_title() + " added to group " + visitorsGroup.get_title());
function onQueryFailed(sender, args) {
alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
</script>
<input id="Button1" type="button" value="Run Code" onclick="runCode()" />
</asp:Content>http://msdn.microsoft.com/en-us/library/office/jj246835%28v=office.15%29.aspxhttp://msdn.microsoft.com/en-us/library/office/jj920104%28v=office.15%29.aspxhttp://stackoverflow.com/questions/20981226/sharepoint-2013-get-current-user-javascripthttp://sharepoint.stackexchange.com/questions/31457/get-user-via-javascript-client-object-model -
How do i get the absolute url using javascript?
I know this isnt a jsp problem but would be grateful if anyone can help.
In jsp the method request.getRequestURI() would be the equivilent of what I am looking for in javascript.document.location
-
Hi Folks,
I have list library with 2 columns. where as 1 column is people picker control and it is not mandatory filed .
When the user open newform.aspx and fill all the column values and submit it should show error message if user not enter any data in people picker control column though it is not a mandatory column.
How to achieve this by using javascript or sharpoint designer.Hello,
Here is script for that:
http://social.msdn.microsoft.com/Forums/en-US/f1c2a651-a0fb-484d-af33-e7084439b6c8/validate-sharepoint-people-picker-using-javascript?forum=sharepointgeneralprevious
http://ankursharepoint.blogspot.in/2012/10/javascript-validation-of-people-picker.html
Edit your newform.aspx page and add content editor webpart on that page. Then add script on HTML source section.
Hope it could help
Hemendra:Yesterday is just a memory,Tomorrow we may never see
Please remember to mark the replies as answers if they help and unmark them if they provide no help -
Hi Everyone,
We are developing SharePoint hosted apps for Office 365, for that we are going
to implement document rating functionality inside Sharepoint app. The host web contain document library (“Documents”) and from apps we need to rate each document. The rating functionality working fine with CQWP in team site using
JavaScript Object Model API.
But the same code is not working inside apps and giving error:-
If we are using app context than error will be:-
"List does not exist.
The page you selected contains a list that does not exist. It may have been deleted by another user."
And for Host context than error will be:-
"Unexpected response data from server."
Please help on this
Please see below code..
'use strict';
var web, list, listItems, hostUrl, videoId, output = "";
var videoLibrary = "Documents";
var context, currentContext;
var lists, listID;
var list, parentContext;
var scriptbase;
(function () {
// This code runs when the DOM is ready and creates a context object which is
// needed to use the SharePoint object model
$(document).ready(function () {
hostUrl = decodeURIComponent(getQueryStringParameter("SPHostUrl"));
context = SP.ClientContext.get_current();
SP.SOD.executeFunc('sp.js', 'SP.ClientContext', sharePointReady);
function sharePointReady() {
scriptbase = hostUrl + "/_layouts/15/";
// Load the js files and continue to the successHandler
$.getScript(scriptbase + "SP.Runtime.js", function () {
$.getScript(scriptbase + "SP.js", function () {
$.getScript(scriptbase + "SP.Core.js", function () {
$.getScript(scriptbase + "reputation.js", function () {
$.getScript(scriptbase + "sp.requestexecutor.js", execCrossDomainRequest);
//Query list from hostweb
function execCrossDomainRequest() {
//Load the list from hostweb
parentContext = new SP.AppContextSite(context, hostUrl);
web = parentContext.get_web();
list = web.get_lists().getByTitle(videoLibrary);
context.load(list, 'Title', 'Id');
var camlQuery = new SP.CamlQuery();
camlQuery.set_viewXml('<View><Query><OrderBy><FieldRef Name="Modified" Ascending="FALSE"/></OrderBy></Query><RowLimit>1</RowLimit></View>');
listItems = list.getItems(camlQuery);
context.load(listItems);
context.executeQueryAsync(onQuerySucceeded, onQueryFailed);
//Process the image library
function onQuerySucceeded() {
var lstID = list.get_id();
var ctx = new SP.ClientContext(hostUrl);
var ratingValue = 4;
EnsureScriptFunc('reputation.js', 'Microsoft.Office.Server.ReputationModel.Reputation', function() {
Microsoft.Office.Server.ReputationModel.Reputation.setRating(ctx, lstID, 1, ratingValue);
ctx.executeQueryAsync(RatingSuccess, RatingFailure);
function onQueryFailed(sender, args) {
alert('Failed' + args.get_message());
function failed(sender, args) {
alert("failed because:" + args.get_message());
function RatingSuccess() {
alert('rating set');
//displaystar();
function RatingFailure(sender, args) {
alert('Rating failed : : ' + args.get_message());
//Gets the query string paramter
function getQueryStringParameter(paramToRetrieve) {
var params;
params = document.URL.split("?")[1].split("&");
for (var i = 0; i < params.length; i = i + 1) {
var singleParam = params[i].split("=");
if (singleParam[0] == paramToRetrieve) return singleParam[1];
Thanks & Regards
Sanjay
Thank you in advance! :-)
Hi,
According to your post, my understanding is that you want to update list column in SharePoint hosted apps using JavaScript Client Object Model.
Based on the error message, it seems not retrieve the list object in context. I suggest you debug the code step by step using Internet Explorer Developer Tools to
find the problem.
Here are some demos about using JavaScript Client Object Model in SharePoint hosted app:
http://blogs.msdn.com/b/officeapps/archive/2012/09/04/using-the-javascript-object-model-jsom-in-apps-for-sharepoint.aspx
http://sharepoint.stackexchange.com/questions/55334/how-to-access-list-in-sharepoint-hosted-app
http://www.dotnetcurry.com/showarticle.aspx?ID=1028
Best regards
Zhengyu Guo
TechNet Community Support -
Is there a way using javascript to get the Site title?
I was wondering if there is a way to get the site title using javascript and then place that info in a workflow var?
Hi SPSADmin,
If you are using custom workflow then you can easily get site title in the workflow.Please go through below link to get site title
http://msdn.microsoft.com/en-us/library/office/gg749857(v=office.14).aspx
For Sharepoint designer workflow its bit tricky but you can achieve
http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/MS-SharePoint/Q_27910482.html
Regards
Soni K -
Add attachments to List Item using JavaScript Client object model in SP2010
Hi All ,
I have created custom form for submitng data in list using javascript client object model/jquery .
Now I want to add option to uplaod multiple attachments to that list item also .
Is there option with client object model for uplaoding attachment.
Thanks
M
Manesh GCan you try this and let me know
using (SPSite _site = new SPSite(SPContext.Current.Site.Url))
using (SPWeb _web = _site.OpenWeb())
//Let's suppose your Item Id is 1
int ItemId = 1;
SPList oList = _web.Lists["EmployeeList"];
SPListItem _item = oList.GetItemById(ItemId);
if (FileUpload1.HasFile)
_web.AllowUnsafeUpdates = true;
Stream fs = FileUpload1.PostedFile.InputStream;
byte[] _bytes = new byte[fs.Length];
fs.Position= 0;
fs.Read(_bytes, 0, (int)fs.Length);
fs.Close();
fs.Dispose();
_item.Attachments.Add(FileUpload1.PostedFile.FileName, _bytes);
_item.Update();
_web.AllowUnsafeUpdates = false; -
Copying SharePoint Site Page between SharePoint Sites with the MasterPage and Correct PageLayout
Hi All,
I have created a page in the following SharePoint Site Using a Custom SharePoint MasterPage and a Custom PageLayout.
https://devrussellportal.prod.ds.russell.com/sites/emeasandbox/Data-Governance/Pages/DataGovernanceHome.aspx
In this site I have a Page called 'DataGovernanceHome.aspx' in that site. I need to copy this page with the MasterPage and the PageLayout that I have used to build this Site Page to https://russellportal.prod.ds.russell.com/sites/datagovernance/ Site.
The old site is a sub site but the new site is not s sub site. But both them are Publishing Sites.
I was able to copy the MasterPage with all styles and images without any errors and applied successfully to the new site. I exported the desired page from the old SharePoint Site and imported to the new SharePoint Site via SPD. But when I tried to open the
page it gave me an error 'Sorry, something went wrong'.
I even edit the
<mso:PublishingPageLayout msdt:dt="string">https://russellportal.prod.ds.russell.com/sites/datagovernance/_catalogs/Russell SharePoint 3 Column.aspx, Russell SharePoint 3 Column </mso:PublishingPageLayout>
tag by updating the new SharePoint Site URL also. But did not solve the matter. So what is I am missing in here? Could someone help me to solve this matter?
Thanks and regards,
ChiranthakaHello,
In your "something went wrong screen" you should see a correlation ID
please run you SharePoint management Shell with this command
get-splogevent | ?{$_Correlation -eq "<GUID>" }| select Area, Category, Level, EventID, Message | Format-List
Replacing the <GUID> by the correlation ID and give us the result
Best regards, Christopher.
Blog |
Mail
Please remember to click "Mark As Answer" if a post solves your problem or
"Vote As Helpful" if it was useful.
Why mark as answer? -
Copying SharePoint Page between SharePoint Sites with the MasterPage and Correct PageLayout
Hi All,
I have created a page in the following SharePoint Site Using a Custom SharePoint MasterPage and a Custom PageLayout.
https://devrussellportal.prod.ds.russell.com/sites/emeasandbox/Data-Governance/Pages/DataGovernanceHome.aspx
In this site I have a Page called 'DataGovernanceHome.aspx' in that site. I need to copy this page with the MasterPage and the PageLayout that I have used to build this Site Page to https://russellportal.prod.ds.russell.com/sites/datagovernance/ Site.
I was able to copy the MasterPage with all styles and images without any errors and applied successfully to the new site. I exported the desired page from the old SharePoint Site and imported to the new SharePoint Site via SPD. But when I tried to open the
page it gave me an error 'Sorry, something went wrong'.
I even edit the
<mso:PublishingPageLayout msdt:dt="string">https://russellportal.prod.ds.russell.com/sites/datagovernance/_catalogs/Russell SharePoint 3 Column.aspx, Russell SharePoint 3 Column </mso:PublishingPageLayout>
tag by updating the new SharePoint Site URL also. But did not solve the matter. So what is I am missing in here? Could someone help me to solve this matter?
Thanks and regards,
ChiranthakaHi,
Having moved the Master Page, Page Layout and other supporting branding assets successfully is a great first step.
So now you are attempting to move the content page. The content page itself is really a list item in the pages library. The aspects of a given content page are simply stored in site columns. When you copy the content page from one library to another using
SPD, I do not believe everything will transfer.
What you could try next is to open your source site in SPD. Navigate to the pages library and then detach your specific content page from its page layout (right click the content page to see this option). Now open this page in SPD to see all content.
Do the same thing in your destination site. First create a new content page in your destination site, then open SPD. Detach this content page from its page layout and now copy and paste the contents from source to destination. Save and see if the destination
content page loads. If it does, try reattaching the page layout on the destination site. As you noticed before, you may need to change a mso property to the new page layout location.
Another hiccup could be the specific web parts you added to the content page, but I can't say for sure. Possibly a webpart is attempting to access data it does not have access to?
All else fails, can you simply recreate the content page on the destination site from scratch, then copy content and add web parts in to effectively recreate the page by hand?
Eric Overfield - PixelMill -
ericoverfield.com -
@EricOverfield
Maybe you are looking for
-
Key mapping question. (for mobile phones with PC-like keyboard)
For phones with mini keyboard (one button per one character, like a PC keyboard). I'm trying to implement a form with few text boxes. The goal is to let user type the message like they're using a PC keyboard (unlike in traditional phones, where you n
-
New Event Log Errors L355-S7902
These two are recurring daily and showing up in Event Viewer>Windows>Diagnostic Performance>Operational. I have noticed that shutdown is too long so I have copied the errors. Log Name: Microsoft-Windows-Diagnostics-Performance/Operational Sour
-
Field added by EEWB is read only
Hi, We added 2 fields (type char) in pricing table using EEWB but these fields are read only when we checked them in BOL browser. Can someone help us to resolve this issue? Thanks...
-
Pro*C/C++ Precompiler Error when using OTT and CODE=CPP
I am trying to precompile a Pro*C application for the company I am working. Generating Include file and Intype file with OTT succeeded. But invoking the Pro*C precompiler results in error messages concerning the processing of the "size_t" structure b
-
I'm trying to convert a pdf file to word and I continue to get the message "An error occurred while signing in". I believe I'm properly signed in, I can see my account, etc. Any suggestions?