Script not working in SharePoint content editor webpart

Hi All,
<html>
<head>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script language="javascript" type="text/javascript">
$(document).ready(function () {
//Call your function here like
//retrieveListItems();
ExecuteOrDelayUntilScriptLoaded(retrieveListItems, "SP.js");
var siteUrl = '/vceo/PMO/EPMO/';
var close1 = ''; var close2 = ''; var high = ''; var low = ''; var medium = ''; var lowMedium = ''; var mediumHigh = '';
var open1 = ''; var open2 = ''; var high1 = ''; var low1 = ''; var medium1 = ''; var lowMedium1 = ''; var mediumHigh1 = '';
var count = 0; var count1 = 0;
var initiate = 0; var planning = 0; var execution = 0; var closing = 0;
var sumMinimal = 0; var sumModerate = 0; var sumCritical = 0; var sumSevere = 0;
var sumHighlyLikely = 0; var sumLikely = 0; var sumSomewhat = 0; var sumUnlikely = 0;
var sumBudget = 0; var sumCommitted = 0; var sumConsumption = 0;
function retrieveListItems() {
alert("Welcome to Dashboard");
var clientContext = new SP.ClientContext(siteUrl); alert("site url");
var oList = clientContext.get_web().get_lists().getByTitle('Project Issues and Risks');
var oList1 = clientContext.get_web().get_lists().getByTitle('Project');
var oList2 = clientContext.get_web().get_lists().getByTitle('Risk Impact');
var oList3 = clientContext.get_web().get_lists().getByTitle('Risk Probability'); alert("get by title");
var camlQuery = new SP.CamlQuery(); var camlQuery1 = new SP.CamlQuery(); var camlQuery2 = new SP.CamlQuery(); var camlQuery3 = new SP.CamlQuery(); var camlQuery4 = new SP.CamlQuery(); var camlQuery5 = new SP.CamlQuery(); var camlQuery6 = new SP.CamlQuery();
camlQuery.set_viewXml('<View><Query><Where><Eq><FieldRef Name="Project_x0020_Issue_x0020_Status" /><Value Type="Choice">Issue</Value></Eq></Where></Query></View>');
camlQuery1.set_viewXml('<View><Query><Where><Eq><FieldRef Name="Project_x0020_Issue_x0020_Status" /><Value Type="Choice">Risk</Value></Eq></Where></Query></View>');
camlQuery2.set_viewXml('<View><Query><Where><Eq><FieldRef Name="Overall_x0020_Status" /><Value Type="Choice">Open</Value></Eq></Where></Query></View>');
camlQuery3.set_viewXml('<View><Query><Where><Eq><FieldRef Name="Overall_x0020_Status" /><Value Type="Choice">Closed</Value></Eq></Where></Query></View>');
camlQuery4.set_viewXml('<View><Query><Where><IsNotNull><FieldRef Name="Project_x0020_Code" /></IsNotNull></Where></Query></View>');
camlQuery5.set_viewXml('<View><Query><Where><IsNotNull><FieldRef Name="Project_x0020_Code" /></IsNotNull></Where></Query></View>');
camlQuery6.set_viewXml('<View><Query><Where><IsNotNull><FieldRef Name="Project_x0020_Code" /></IsNotNull></Where></Query></View>');
this.collListItem = oList.getItems(camlQuery); this.collListItem1 = oList.getItems(camlQuery1); this.collListItem2 = oList1.getItems(camlQuery2); this.collListItem3 = oList1.getItems(camlQuery3);
this.collListItem4 = oList2.getItems(camlQuery4); this.collListItem5 = oList3.getItems(camlQuery5); this.collListItem6 = oList1.getItems(camlQuery6);
clientContext.load(collListItem); clientContext.load(collListItem1); clientContext.load(collListItem2); clientContext.load(collListItem3); clientContext.load(collListItem4); clientContext.load(collListItem5); clientContext.load(collListItem6);
clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));
alert("retrieve list");
function onQuerySucceeded(sender, args) {
alert("succeed");
var listItemEnumerator = collListItem.getEnumerator(); var listItemEnumerator1 = collListItem1.getEnumerator(); var listItemEnumerator2 = collListItem2.getEnumerator();
var listItemEnumerator3 = collListItem3.getEnumerator(); var listItemEnumerator4 = collListItem4.getEnumerator(); var listItemEnumerator5 = collListItem5.getEnumerator(); var listItemEnumerator6 = collListItem6.getEnumerator();
var sumClose = 0; var sumClose1 = 0; var sumHigh = 0; var sumMedium = 0; var sumLow = 0; var sumLowMedium = 0; var sumMediumHigh = 0;
var sumOpen = 0; var sumOpen1 = 0; var sumHigh1 = 0; var sumMedium1 = 0; var sumLow1 = 0; var sumLowMedium1 = 0; var sumMediumHigh1 = 0;
while (listItemEnumerator.moveNext()) { var oListItem = listItemEnumerator.get_current(); sumClose += oListItem.get_item('Close'); sumOpen += oListItem.get_item('Open'); sumHigh += oListItem.get_item('High'); sumMedium += oListItem.get_item('Medium'); sumLow += oListItem.get_item('Low'); sumLowMedium += oListItem.get_item('LowMedium'); sumMediumHigh += oListItem.get_item('MediumHigh'); }
while (listItemEnumerator1.moveNext()) { var oListItem1 = listItemEnumerator1.get_current(); sumClose1 += oListItem1.get_item('Close'); sumOpen1 += oListItem1.get_item('Open'); sumHigh1 += oListItem1.get_item('High'); sumMedium1 += oListItem1.get_item('Medium'); sumLow1 += oListItem1.get_item('Low'); sumLowMedium1 += oListItem1.get_item('LowMedium'); sumMediumHigh1 += oListItem1.get_item('MediumHigh'); }
while (listItemEnumerator4.moveNext()) { var oListItem4 = listItemEnumerator4.get_current(); sumMinimal += oListItem4.get_item('Minimal'); sumModerate += oListItem4.get_item('Moderate'); sumSevere += oListItem4.get_item('Severe'); sumCritical += oListItem4.get_item('Critical'); }
while (listItemEnumerator5.moveNext()) { var oListItem5 = listItemEnumerator5.get_current(); sumUnlikely += oListItem5.get_item('Unlikely'); sumSomewhat += oListItem5.get_item('Somewhat'); sumLikely += oListItem5.get_item('Likely'); sumHighlyLikely += oListItem5.get_item('HighlyLikely'); }
while (listItemEnumerator6.moveNext()) { var oListItem6 = listItemEnumerator6.get_current(); sumBudget += oListItem6.get_item('Project_x0020_Budget_x0020_Amoun'); sumCommitted += oListItem6.get_item('Committed_x0020_Budget'); }
count = this.collListItem2.get_count();
count1 = this.collListItem3.get_count();
while (listItemEnumerator2.moveNext()) {
var oListItem2 = listItemEnumerator2.get_current();
var stat = oListItem2.get_item('Project_x0020_Status');
if (stat == "Intiation") {
initiate = initiate + 1
if (stat == "Planning") {
planning = planning + 1
if (stat == "Execution") {
execution = execution + 1
if (stat == "Closing") {
closing = closing + 1
//alert("initiate" + initiate); alert("planning" + planning); alert("execution" + execution); alert("closing" + closing);
//alert("countOpen" + count); alert("closed:" + count1);
window.close1 = sumClose; window.close2 = sumClose1; window.high = sumHigh; window.low = sumLow; window.medium = sumMedium; window.mediumHigh = sumMediumHigh; window.lowMedium = sumLowMedium;
window.open1 = sumOpen; window.open2 = sumOpen1; window.high1 = sumHigh1; window.low1 = sumLow1; window.medium1 = sumMedium1; window.mediumHigh1 = sumMediumHigh1; window.lowMedium1 = sumLowMedium1;
drawChart();
function onQueryFailed(sender, args) { alert('Request failed.. ' + args.get_message() + '\n' + args.get_stackTrace()); }
google.load("visualization", "1", { packages: ["corechart"] });
function drawChart() {
var data = google.visualization.arrayToDataTable([['Task', 'Issues'], ['Close', window.close1], ['Open', window.open1]]);
var data1 = google.visualization.arrayToDataTable([['Task', 'Risks'], ['Close', window.close2], ['Open', window.open2]]);
var data2 = google.visualization.arrayToDataTable([['Program', 'High', 'Medium-High', 'Medium', 'Low-Medium', 'Low'], ['Category', window.high, window.mediumHigh, window.medium, window.lowMedium, window.low]]);
var data3 = google.visualization.arrayToDataTable([['Program', 'High', 'Medium-High', 'Medium', 'Low-Medium', 'Low'], ['Category', window.high1, window.mediumHigh1, window.medium1, window.lowMedium1, window.low1]]);
var data4 = google.visualization.arrayToDataTable([['Project', 'Status'], ['Closed', count1], ['Open', count]]);
var data5 = google.visualization.arrayToDataTable([['Project', 'Status'], ['Initiation', initiate], ['Planning', planning], ['Execution', execution], ['Closing', closing]]);
var data6 = google.visualization.arrayToDataTable([['Program', 'Impact'], ['Minimal', sumMinimal], ['Moderate', sumModerate], ['Severe', sumSevere], ['Critical', sumCritical]]);
var data7 = google.visualization.arrayToDataTable([['Program', 'Probability'], ['Highly Likely/Probable(76%-100%)', sumHighlyLikely], ['Likely(51%-76%)', sumLikely], ['Somewhat Likely(26%-50%)', sumSomewhat], ['Unlikely/Improbable(0%-25%)', sumUnlikely]]);
var data8 = google.visualization.arrayToDataTable([['Project', 'Budget'], ['Approved', sumBudget], ['Committed', sumCommitted]]);
var options = { title: 'Program Issues', width: 200, height: 300, legend: 'bottom', pieSliceText: 'value', pieStartAngle: 180, };
var options1 = { title: 'Program Risks', width: 200, height: 300, legend: 'bottom', pieSliceText: 'value', pieStartAngle: 180, };
var options2 = { width: 200, height: 200, legend: { position: 'top', maxLines: 3 }, bar: { groupWidth: '25%' }, isStacked: true, vAxis: { title: 'Open', titleTextStyle: { color: 'red' } } };
var options3 = { width: 200, height: 200, legend: { position: 'top', maxLines: 3 }, bar: { groupWidth: '25%' }, isStacked: true, vAxis: { title: 'Open', titleTextStyle: { color: 'red' } } };
var options4 = { title: 'Project Status', width: 225, height: 300, legend: 'bottom', pieSliceText: 'value', pieStartAngle: 180, };
var options5 = { width: 175, height: 200, legend: { position: 'top', maxLines: 10 }, pieSliceText: 'value', };
var options6 = { title: 'Program Risk Impact', width: 300, height: 300, legend: 'right', pieSliceText: 'value', };
var options7 = { title: 'Program Risk Probable', width: 300, height: 300, legend: 'right', pieSliceText: 'value', };
var options8 = { title: 'Project Budget', width: 300, height: 300, legend: 'bottom', pieSliceText: 'value', };
var chart = new google.visualization.PieChart(document.getElementById('chart_div3'));
chart.draw(data, options);
var chart1 = new google.visualization.PieChart(document.getElementById('chart_div'));
chart1.draw(data1, options1);
var chart2 = new google.visualization.ColumnChart(document.getElementById('chart_div1'));
chart2.draw(data2, options2);
var chart3 = new google.visualization.ColumnChart(document.getElementById('chart_div2'));
chart3.draw(data3, options3);
var chart4 = new google.visualization.PieChart(document.getElementById('chart_div4'));
chart4.draw(data4, options4);
var chart5 = new google.visualization.PieChart(document.getElementById('chart_div5'));
chart5.draw(data5, options5);
var chart6 = new google.visualization.PieChart(document.getElementById('chart_div6'));
chart6.draw(data6, options6);
var chart7 = new google.visualization.PieChart(document.getElementById('chart_div7'));
chart7.draw(data7, options7);
var chart8 = new google.visualization.ColumnChart(document.getElementById('chart_div8'));
chart8.draw(data8, options8);
</script>
</head>
<body>
<table >
<tbody>
<tr>
<td id="chart_div8" colspan="2" style="border-bottom:ridge;border-left:ridge;border-top:ridge"></td>
<td id="chart_div4" style="border-bottom:ridge;border-left:ridge;border-top:ridge"></td>
<td id="chart_div5" style="border-bottom:ridge;border-right:ridge;border-top:ridge"></td>
</tr>
<tr>
<td id="chart_div" style="border-bottom:ridge;border-left:ridge;"></td>
<td id="chart_div2" style="border-bottom:ridge;"></td>
<td id="chart_div3" style="border-bottom:ridge;border-left:ridge;"></td>
<td id="chart_div1" style="border-bottom:ridge;border-right:ridge""></td>
</tr>
<tr>
<td id="chart_div6" colspan="2" style="border-bottom:ridge;border-left:ridge;"></td>
<td id="chart_div7" colspan="2" style="border-bottom:ridge;border-left:ridge;border-right:ridge"></td>
</tr>
</tbody>
</table>
</body>
</html>
This content editor webpart not working in sharepoint page. Once I checked out to the page then chart is working. When i checkedin function not get called. How to fix this?
THanks in advance!

In SharePoint 2013, sp.js and sp.runtime.js does not load on the page in published mode. You need to explicitly load these files. You can check using IE developer tools in the Script section that in published mode these files are missing.
In order to fix this issue explictly refer these two js files on your page.
<script type="text/javascript" src="_layouts/15/sp.runtime.js"></script>
<script type="text/javascript" src="_layouts/15/sp.js"></script>
Geetanjali Arora | My blogs |

Similar Messages

  • How to work JQuery and content editor webpart functionality in sharepoint 2013?

    Hi all,
    I have a requirement to display the list data in share-point page by using JQuery and content editor web-part. could you please any one suggest the process to display the list data using JQuery and ContentEditorWebpart.
    Thanks in advance.
    Thanks,
    phani kumar
    Phani kumar

    Hi,
    From your description, my understanding is that you want to show a list data in a page using jQuery and Content Query Web Part.
    You could use SharePoint REST API to accomplish your requirement, please refer to this code below:
    <div id="listData">
    </div>
    <script src="https://code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script><script type="text/javascript">
    $(document).ready(function(){
    //replace your list title
    $.ajax({
    url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbytitle('customlist03')/items",
    type: "GET",
    headers: {"accept": "application/json;odata=verbose"},
    success: function (data) {
    if (data.d.results) {
    var obj = data.d.results;
    for(var i = 0; i < obj.length; i++)
    $("#listData").append("<div>title "+obj[i].Title+"</div>");
    error: function (xhr) {
    alert(xhr.status + ': ' + xhr.statusText);
    </script>​​
    The screenshot below is my result:
    Please refer to these articles:
    Working with lists and list items with REST
    https://msdn.microsoft.com/en-us/library/office/dn292552.aspx
    SharePoint 2013 – CRUD on List Items Using REST Services & jQuery
    http://www.plusconsulting.com/blog/2013/05/crud-on-list-items-using-rest-services-jquery/
    You can also get list data using JavaScript Client Object Model(JSOM), you could refer to this article:
    How to: Complete basic operations using JavaScript library code in SharePoint 2013
    https://msdn.microsoft.com/en-us/library/office/jj163201.aspx?f=255&MSPPError=-2147217396
    Here is a link about how to add code into page via Content Editor Web Part:
    http://blogs.msdn.com/b/sharepointdev/archive/2011/04/14/using-the-javascript-object-model-in-a-content-editor-web-part.aspx
    Best Regards,
    Vincent Han
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to Add Content Editor WebPart in PageLayout

    Hi
    I have copied the Content Editor webpart snippet and pasted it in my Page layout.
    But nothing is showing in page edit mode. 
    Can anyone tell me how to add this if the following is not correct?
    <div style="width:100%">
                    <div data-name="WebPartZone">
                        <!--CS: Start Content Editor Snippet--><!--SPM:<%@Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint,
    Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>--><!--MS:<WebPartPages:ContentEditorWebPart xmlns:WebPartPages="namespace" runat="server" webpart="true">--><!--PS: Start of READ-ONLY
    PREVIEW (do not modify)--><div class="ms-webpart-chrome ms-webpart-chrome-fullWidth "><div class="ms-webpart-chrome-title" id="WebPart_ChromeTitle"><span title="$Resources:core,ContentEditorWebPartTitle;
    - $Resources:core,ContentEditorWebPartDescription;" id="WebPartTitle" class="js-webpart-titleCell"><h2 style="text-align:justify;" class="ms-webpart-titleText"><nobr><span>$Resources:core,ContentEditorWebPartTitle;</span><span
    id="WebPartCaption"></span></nobr></h2></span></div><div WebPartID="00000000-0000-0000-0000-000000000000" HasPers="true" id="WebPart" width="100%" class="ms-WPBody ms-WPBorder
    noindex ms-wpContentDivSpace " OnlyForMePart="true" allowDelete="false" style=""><div class="ms-rtestate-field"></div><div class="ms-clear"></div></div></div><!--PE:
    End of READ-ONLY PREVIEW--><!--MS:<WebPart xmlns="http://schemas.microsoft.com/WebPart/v2">--><!--MS:<Title>--><!--SPM:$Resources:core,ContentEditorWebPartTitle;--><!--ME:</Title>--><!--MS:<Description>--><!--SPM:$Resources:core,ContentEditorWebPartDescription;--><!--ME:</Description>--><!--MS:<PartImageLarge>--><!--SPM:/_layouts/15/images/mscontl.gif--><!--ME:</PartImageLarge>--><!--MS:<ID>--><!--SPM:g_4998626c_cd3f_4f31_962c_51e943923c4f--><!--ME:</ID>--><!--ME:</WebPart>--><!--ME:</WebPartPages:ContentEditorWebPart>--><!--CE:
    End Content Editor Snippet-->
                    </div>
                </div>
    S H A J A N

    Hi  ,
    For adding the Content Editor Web Part to a SharePoint Layout , you can add the  code between the <Zonetemplate> tags:
    <!-- CEWP -->
    <WebPartPages:ContentEditorWebPart ID="ContentEditorWebPart1" runat="server" __MarkupType="xmlmarkup" WebPart="true" __WebPartId="{F40E10C3-ED3A-473D-8538-996344EE795C}" >
    <WebPart xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/WebPart/v2">
    <Title>Content Editor Web Part</Title>
    <FrameType>TitleBarOnly</FrameType>
    <Description>Use for formatted text, tables, and images.</Description>
    <IsIncluded>true</IsIncluded>
    <PartOrder>2</PartOrder>
    <FrameState>Normal</FrameState>
    <Height />
    <Width />
    <AllowRemove>true</AllowRemove>
    <AllowZoneChange>true</AllowZoneChange>
    <AllowMinimize>true</AllowMinimize>
    <AllowConnect>true</AllowConnect>
    <AllowEdit>true</AllowEdit>
    <AllowHide>true</AllowHide>
    <IsVisible>true</IsVisible>
    <DetailLink />
    <HelpLink />
    <HelpMode>Modeless</HelpMode>
    <Dir>Default</Dir>
    <PartImageSmall />
    <MissingAssembly>Cannot import this Web Part.</MissingAssembly>
    <PartImageLarge>/_layouts/images/mscontl.gif</PartImageLarge>
    <IsIncludedFilter />
    <ExportControlledProperties>true</ExportControlledProperties>
    <ConnectionID>00000000-0000-0000-0000-000000000000</ConnectionID>
    <ID>g_f40e10c3_ed3a_473d_8538_996344ee795c</ID>
    <ContentLink xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor" />
    <Content xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor"><![CDATA[Edit this text.]]></Content>
    <PartStorage xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor" />
    </WebPart>
    </WebPartPages:ContentEditorWebPart>
    For more information, you can refer to the thread:
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/1ba645f2-2481-4560-a4c3-3be9f9e878bc/adding-the-content-editor-web-part-to-a-sharepoint-layout-aspx-page?forum=sharepointcustomizationlegacy
    http://hiren-j-patel.blogspot.com/2012/07/hello-all-today-we-will-add-content.html
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Content editor webpart error "cannot retrieve properties at this time"

    Hi,
    Everytime I try to editor content within the content editor web part I receive the error message "cannot retrieve properties at this time".
    I can edit the content within the web part when I use http. The error only seems to occur to when using https and SSL.
    I've looked at the following web site and KB articles to implement a workaround however still get the same error.
    http://support.microsoft.com/default.aspx/kb/912060
    http://www.sharepointblogs.com/agoodwin/archive/2007/09/03/content-editor-webpart-error-quot-cannot-retrieve-properties-at-this-time-quot.aspx
    http://support.microsoft.com/kb/830342
    Can anyone else suggest anything else?

    My symptoms
    1.  CEWP & Sharepoint Designer could not retrieve data.
    2.  Event id 5000 "ulsexception12,p1 w3wp.exe ..."
    Problem
    1. Upgraded Small Farm WSS and SPS 2007 to SP2.
    2. Unhandled exceptions and access denieds int the uls logs no specifics to run down.
    3. Crawl issues and had to reset the crawl index.
    Solution
    1. ASPNet user account had certain rights stripped by gpo, check your permission with Tech Net "IIS and Built-in Accounts 6.0"  or I found a much easier product to use Mircrosofts "Authentication & Access Control Diagnostics 1.0"
    2. Ran the "stsadm -o sync -listolddatabases 0" to check for unsyn'd databases  then ran the "stsadm -o sync deleteolddatabases 0"  to clear those databases.
    Havn't seen any further issues, this was a tuff nut to crack hope this helps someone else.jellywood

  • Content editor webpart- unable to see the list data if given the url in the content link?

    HI,
    In content editor webpart,unable to see the list data
    when try to give the list url in the content link?
    please help on the above issue.
    and also want to see the styles to the list.
    how to add the styles to the list row by row.

    Hi sudhir,
    If you click the ellipsis beside the content link, it will pop up a window for you to input the file link. No list option will be offered to be chose.
    When I add a content editor web part to a list, I usually save the code into a Notepad file and save it to a document library. Then copy the url of the document and then paste it into content link.
    Also, you could click Edit HTML Source, then directly add code into the popup window. It works as the same as the above method.
    Regards,
    Rebecca Tu
    TechNet Community Support

  • How to center a content editor webpart on a page

    I've a content editor webpart with a linked js that display a searchbox. I'd like center my webpart in the page
    Here is the html in my js file
    <div style="display:table; margin:0 auto;width:100%">
        <div style="float:left">
            <input type="text" id="tbSearch" name="tbSearch" class="ms-sbplain" style="width: 368px;" onkeydown="if (event.keyCode == 13){launchSearch();return false;}">
        </div>
        <div style="float:left;border-width: 1px; border-style: solid; border-color: #c3c3c3; border-left-width:0 ">
            <img  onClick="launchSearch();return false;" title="Search" class="srch-gosearchimg" onmouseover="this.src='\u002f_layouts\u002fimages\u002fgosearchhover30.png'" onmouseout="this.src='\u002f_layouts\u002fimages\u002fgosearch30.png'"
    alt="Search" src="/_layouts/images/gosearch30.png"/>
        </div>                                  
    </div>

    You could wrap the contents of your content editor web part in a div and apply styling/attributes
    to the div to center it on the page.
    as 
    You should be able to get the ID of the Search Web Part and then use the align center code.
    align="center"

  • How to download aspx page with Content Editor Webpart

    Hi All
    I have lots of aspx pages (with CEWP) in my Sitepages library. I have to replace some RegEx from all pages.
    When I am downloading those pages from Sitepages using 'open in explorer', actual content of page is not coming up i.e. CEWP and its HTML code is missisng.
    Is there anyway, can I download those page with content or is there powershell script using which I can remove those regular expression from sitepages library itself.

    Hi,
    If you want to modify the content in the Content Editor Web Part in all pages in a batch, a solution is that you can loop through all the site pages and read/write the content
    of the specific Content Editor Web Part using SharePoint Object Model.
    ContentEditorWebPart.Content property will help to get or set embedded
    HTML that provides content for this Web Part:
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webpartpages.contenteditorwebpart.content.aspx
    WebPartManager.WebParts Property can get a reference to all WebPart controls
    tracked by the WebPartManager control on a Web page:
    http://msdn.microsoft.com/EN-US/library/h8dcy47h
    Two code demos in the threads below:
    http://stackoverflow.com/questions/1522046/retrieve-a-list-of-web-parts-on-a-page
    http://stackoverflow.com/questions/633633/sharepoint-how-can-i-find-all-the-pages-that-host-a-particular-web-part
    Best regards
    Patrick Liang
    TechNet Community Support

  • Office Web Apps not working externally SharePoint 2013

    In the production farm we have connected office web apps server which is FQDN server name ( xxx.xxx.corp.local) , we can open the sites internally without any issues, but when we open from externally office web apps asking for authentication and not working
    properly.
    Please help me how to make it work  in external. 
    Thanks, Ram Ch

    You will need a public facing URL or IP address. Check below
    You need to configure your OWA for internet
    New-OfficeWebAppsFarm –InternalUrl "md1xxx95.jdaxx.corp.local" -ExternalUrl "http://198.xxx.xxx.xxx" -EditingEnabled
    Set-SPWOPIZone –zone
    “external-http”
    Detailed steps in
    http://social.technet.microsoft.com/wiki/contents/articles/19039.sharepoint-2013-how-to-enable-office-web-apps-to-work-in-both-internal-and-external-environments.aspx
    Set-SPWOPIZone –zone “external-http”
    Set-SPWOPIZone –zone “external-http”
    If this helped you resolve your issue, please mark it Answered

  • Alert to group not working on Sharepoint 2010!

    Hello,
    We have a SharePoint 2010 Server which on the front page we have a news list. We have migrated to 365 and since then the alerts are not working properly. We have a local SMTP server that we use to rely to 365 since SharePoint does not support TLS by itself.
    The SMTP server is working because we can set up alerts on individuals and the emails are coming. The issue is with the group. I have tried several groups but still the same issue. On some groups we receive the initial email about the creation of the alert,
    but no mails after that. I have checked also the Immediate Alert service and is successful. I have checked in the  mail flow on 365 and I can see the initial creation of the alert mail sent to all in the group, but the alerts on changing anything on the
    list does not come into 365, so it must be a SharePoint issue which I can`t determine since the immediate alert service is running...
    Can you please provide a feasible solution for this issue?
    Thank you very much.
    DOVC
    Best Regards, Valentin Doru System Administrator

    Hi Valentin,
    please also open a thread at o365 community, because seems this issue happened at o365.
    to try, perhaps you can re-add the group also, because it may refresh the properties from the AD group to o365.
    and you may check these workaround for testing:
    Option 1: Use a Redirection User
    created a user in Office 365. This user is licensed to use SharePoint Online and Exchange Online.
    In Exchange Online, create Distribution Groups, which are standard Distribution Group that allows however in Delivery Management also Senders outside of organization, as the SharePoint Sender is not part of the Exchange Org.
    In Exchange Online for the User Exchange Forwarder, created Inbox Rules. The rule is checking the Subject for a keyword and as action redirect the E-Mail to the DG and deletes it right away.
    repeat this for other DGs as well.
    In SharePoint Online grant the user Exchange Forwarder access to the Site to access the List
    Now there are two important steps:
    1)      The Alert Title needs to include the token we look for in the Exchange rule
    2)      The “Send Alerts To” needs to be our “Exchange Forwarder”
    When everything is set up an Alert will be received by Exchange Forwarder and then forwarded to the DG.
    Option 2: Use a custom Workflow with the Send E-Mail To Activity
    In Exchange Online creat a Distribution Groups, which are standard Distribution Group that allows however in Delivery Management also Senders outside of my organization, as the SharePoint Sender is not part of the Exchange Org.
    Using SharePoint Designer create a custom Workflow like the one below. In the Send E-Mail activity I specified the external SMTP Address of the DG as To-Address.
    When the Workflow is executed an E-Mail is sent directly to the DG:
    Background:
    When sending an Alert, SharePoint is doing a Security Trimming. So SharePoint wants to be sure the recipient of the Alert has permissions to see the List Content the Alert is about. Therefore we cannot enter an SMTP-Address for an Alert but need to specify
    a Security Principal known to SharePoint.
    In a Workflow we don’t need to do this kind of Security Trimming. The creator / designer of the Workflow need to take care whom to send what information.
    Side note: Alerts and Workflow Send E-Mail To Activities are the only possibilities in SharePoint Online to send E-Mails. Custom solutions (Sandboxed Solutions) will not work.
    Regards,
    Aries
    Microsoft Online Community Support
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Event manager script not working as expected

    On a Cisco 4900M running Version 12.2(53)SG1, trying to capture certain information requested by Cisco TAC to troubleshoot periodic high cpu usage on the device causing it to momentarily not respond to HSRP packets from the HSRP partner.
    This is the script in place today:
    event manager applet capture_cpu_spike
    event snmp oid 1.3.6.1.4.1.9.2.1.56 get-type next entry-op ge entry-val "80" exit-time 10 poll-interval 1
    action 1.0 syslog msg "CPU Utilization is high"
    action 2.0 cli command "en"
    action 3.0 cli command "show proc cpu sort | redirect bootflash:cpuinfo1.txt"
    action 3.1 cli command "show int summ | redirect bootflash:cpuinfo2.txt"
    action 3.2 cli command "show proc cpu sort | redirect bootflash:cpuinfo3.txt"
    action 3.3 cli command "show int summ | redirect bootflash:cpuinfo4.txt"
    action 3.4 cli command "show platform cpu packet statistics | redirect bootflash:cpuinfo5.txt"
    action 3.5 cli command "show platform health | redirect bootflash:cpuinfo6.txt"
    action 4.0 cli command "end"
    Problem is, when the cpu does spike, only action 3.1 is executed.
    How do I modify this script to run all the commands listed?
    TIA
    dom

    Let me first explain why your script is not working for you.
    Basically, the problem you encounter is a result of a common misconception about copyin(). It is intended to be used to copy content of userspace memory into a scratch buffer so that it can be accessed directly from within kernel space (where the DTrace core executes). That said, it is often interpreted as somehow being equivalent to malloc() whereas in reality it actually works like alloca() instead. So, what you are seeing is basically the artefact of the scratch buffer being overwritten with other data. And unfortunately, that is perfectly legal.
    The content of the scratch buffer pointed to by self->addr in your script is only valid for as long as the specific probe enabling is executing (it is clause-local). So, your clauses to print out the actual bytes in the buffer are looking at a buffer that is for all intends and purposes no longer reserved, and therefore you are looking at it after other data was written to the scratch space.
    So... in order for this to work, you should do things a bit different. Rather than trying to get a copy of the buffer in one clause, and then read from it in following clauses, you can simply collect the buffer address in the entry read:entry clause, get the number of bytes read in the first read:return clause, and then for every clause in which you print 4 bytes do the following (example for bytes 4-7):
    syscall::read:return
    /execname == "foobar" && self->nbytes > 4/
    this->addr = (char *)copyin((uintptr_t)self->bufferaddr + 4, 4);
    printf(" 4- 7: %02x %02x %02x %02x\n", this->addr[0], this->addr[1], this->addr[2], this->addr[3]);
    So basically, for every clause that print 4 bytes you copyin those bytes, and then print them out.

  • How to pass query string from content editor webpart to another?

    Hi All,
    I am using content editor web-part to show GooglePiechart  for workflow status column in a list. When user click on chart, i need to show particular clicked area data in another list web-part. So that, i need to pass the query value from content editor
    web-part to another web-part. How to achieve this scenario?

    Hi Sam,
    What you can do is using SPD create a data view webpart which excepts query string value as filters as shown in the below article
    http://madanbhintade.wordpress.com/2012/01/08/sharepoint2010dataviewwebpart/
    http://sharepoint.stackexchange.com/questions/55184/how-to-filter-dataview-webpart-dvwp-from-query-string
    Then When you click on the pie charts particualr section perform a post back  by appending the required query string paramter to the same page on which your webpart exist
    Raghavendra Shanbhag | Blog: www.SharePointColumn.com
    Please click "Propose As Answer " if a post solves your problem or "Vote As Helpful" if a post has been useful to you.
    Disclaimer: This posting is provided "AS IS" with no warranties.

  • How add the Video in Content Editor Webpart

    Hi All, 
    I have task to add the video in Content Editor Web-part.Can any one help me how can
    I add the video in Content Editor Web-part
    Samar

    Hi Samar,
    In addition to John’s suggestion, if you simply want to display a video file on a page, it is not necessary to use a Content Editor Web Part as a holder, in my opinion,
    Media Web Part would be a better choice for you.
    With the OOTB Media Web Part, there are more settings available which can help to manage video in a more comfortable way:
    https://support.office.com/en-ca/article/Add-video-or-audio-to-a-page-e5eff318-cd9d-4d77-bd79-1c282db23b46
    More information about Media Web Part:
    http://blogs.msdn.com/b/sanjaynarang/archive/2010/05/26/media-web-part-in-sharepoint-2010-faq.aspx
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • Script not worked in Photoshop

    Hi !
    My script is worked in  ExtendScript Toolkit, but doesn't worked in PS SC6 via export from Configurator 3. What is problem ?
    #target photoshop;
    var mainFolder = "~/testFolder";
    var PrinterFolder = mainFolder  + '/printer';
    var myFoldersArray  =[];
    var content = [];
    myFoldersArray = readFolder(this.PrinterFolder);
    alert(myFoldersArray );
    function readFolder(folderName){//----------------------------------------------------------------------------------------------------
    myFolder = new Folder(folderName);
    myFoldersArray  =[];
    myFoldersArray = myFolder.getFiles( function( file ) { return file instanceof  Folder} );
    return myFoldersArray  ;

    Not right, I'm used this markers in other parts of scripts- all worked. I'm thing what mistake (are marked):
    var myFoldersArray =[];
    myFoldersArray = readFolder(this.PrinterFolder);
    function readFolder(folderName, newName){//----------------------------
    myFoldersArray =[];
    I'm change name of the array myFoldersArray1 in the function and delete link "this" - script are worked.

  • Scripts not working in Numbers

    Applications:  OS X Yosemite 10.10.1  Script Editor 2.7  Numbers 3.5.2  Excel in Office for mac 2011
    I write a simple script...
    tell application "Numbers"
    activate
    open "Macintosh HD:users:xxx:desktop:testfile.numbers"
    set the vale of cell "c4" to "23"
    end tell
    I am told...    Numbers got an error: Can’t set cell "c4" to "23"
    The script works fine if I use the Excel app and and Excel test file?  It does not work with Numbers.  I enabled Apple Script under security settings and can figure anything else to try.
    Any ideas?!?
    tell a

    You tell Numbers to set a value for cell "C4" but cells don't belong directly to Numbers; a cell belongs to a table which belongs to a sheet which belongs to a document which belongs to Numbers.
    So you have to do something like :
    set value of (cell "C4" of table 1 of sheet 1 of document 1) to "23"
    or:
    set a_table to table "sometablename" of sheet "somesheetname" of front document
    tell a_table
    set the value of cell "c4" to "23"
    end tell

  • Stemming not working on SharePoint 2013 Search

    We have SharePoint search enabled on our farm. There are close to 20 million items in the farm. Looking through the logs and user's feedback, we were able to find that the stemming feature is not actually working 
    When i search for "Order" i couldnt see a document whose title contains ordering in the search result. 
    This is horrible. Am i missing any thing??
    Sreeharsha Alagani | MCTS Sharepoint 2010 |
    Linkedin | Blog

    Hi,
    Stemming means that nouns and adjectives in a query are expanded to different possible inflections. Stemming essentially performs searches for words that share the same stem. Stemming in SharePoint 2013 is enabled by default.
    You can export your Search Result Web Part and Open the Web Part in a text editor, then verify whether the  value for EnableStemming is ture.
    Reference:
    http://stevemannspath.blogspot.com/2013/04/stemming-in-sharepoint-2013-search.html
    https://social.technet.microsoft.com/Forums/en-US/1e507083-0664-4c3f-b49d-b785a11960f5/fast-search-stemming-not-working?forum=sharepointadminprevious
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

Maybe you are looking for