Sharepoint calendar web part not working in Chrome Browser - sharepoint

I have a calendar web part in my SharePoint site which works fine in Firefox and IE but does not work in chrome browser.
This is the same situation i am facing.
http://answers.flyppdevportal.com/categories/sharepoint2010/sharepoint2010programming.aspx?ID=9dde800d-7ce0-4069-93d7-2adf2c53d94b
Any suggestions ?
One more thing to add here is that , I have a content Query web part which will rotate the Promotions using JQuery cycle plug in. It is on the same page where I have put the list and library web part with calendar Month view as a default view.
If I remove that CQWP with Promotions everything works fine but if it there it wont work
Any suggestions? I have checked for the Jquery conflicts but could not find any of them .
Thanks

I think that I have find the root cause of my problem
There is one CQWP placed on the same page with this Calendar view list.
This CQWP ha call to jquery cycle plugin which will cycle the content after some interval , due to this JQuery conflicts my calendar control is not working in chrome.
Whem I Remove this CQWP everything works like a charm!!!

1st, try to revert back to the OOB v4.master to see if the problem disappears. If it works as expected, this mean that your masterpage have some issue.
One of the most ridiculous bug in SP is that if you don't have the SiteAction control declared before the ribbon control, some javascript codes will fails.
In one of my custom master page, I have to create a second siteactions control, just before the ribbon control. I've put it into a invisible DIV to completely hide it from the user.
It ends with something like this :
<SharePoint:SPRibbon ID="SPRibbon1" runat="server" PlaceholderElementId="RibbonContainer"
CssFile="">
<SharePoint:SPRibbonPeripheralContent ID="SPRibbonPeripheralContent1" runat="server"
Location="TabRowLeft" CssClass="ms-siteactionscontainer s4-notdlg">
<!-- Here is the hidden site actions control -->
<div style="display: none">
<SharePoint:SiteActions runat="server" AccessKey="<%$Resources:wss,tb_SiteActions_AK%>"
ID="SiteActionsMenuMain" PrefixHtml="" SuffixHtml="" MenuNotVisibleHtml="&nbsp;">
<CustomTemplate>
</CustomTemplate>
</SharePoint:SiteActions>
</div>
<asp:ContentPlaceHolder ID="PlaceHolderGlobalNavigation" runat="server" Visible="false">
<SharePoint:PopoutMenu
runat="server"
>
.... Removed for readability ....
</SharePoint:PopoutMenu>
<div class="s4-die">
<asp:ContentPlaceHolder ID="PlaceHolderGlobalNavigationSiteMap" runat="server" Visible="false">
</asp:ContentPlaceHolder>
</div>
</asp:ContentPlaceHolder>
</SharePoint:SPRibbonPeripheralContent>
<SharePoint:SPRibbonPeripheralContent runat="server" Location="TabRowRight" ID="RibbonTabRowRight"
CssClass="s4-trc-container s4-notdlg">
.... Removed for readability ....
</SharePoint:SPRibbonPeripheralContent>
</SharePoint:SPRibbon>
For your information, this behavior is due to one the inner control of the site action (PublishingConsole if I'm right). This inner control will produces some javascript global variable declaration (language and one another). This global variables are required by the ribbon control to works as expected.

Related

Change the subsite Logo URL IN SharePoint

I have created a main site and I have created many subsite under the main site.
When I am in any main page and click on the logo icon, the page redirects to the home page.
But, when I am in any subsite and click on the logo icon, the page redirects to the subsite homepage rather than the main hompage.
I would like to change the navigation URL to the root site. Let me know if I have to edit any masterpage, or is there any common page that will inherit to all the child application.
Thanks
We have 2 ways to do this.
Method 1:
From the Snippet Gallery, copy and paste the default SiteLogo code snippet into your master page into the appropriate place you want it to be displayed.
In the SiteLogo code, search for SharePoint:SPSimpleSiteLink to find the relevant opening and closing tags. Now simply change the tag names to SharePoint:SPLinkButton instead.
Then simply add the attribute NavigateUrl to this tag and set it’s value to “~sitecollection/”.
Example:
Default snippet code:
<!--MS:<SharePoint:SPSimpleSiteLink runat="server" CssClass="ms-siteicon-a" ID="x7917ecc8c38d4bd69f58e338eab54c8c">-->
...
<!--ME:</SharePoint:SPSimpleSiteLink>-->
Should become this:
<!--MS:<SharePoint:SPLinkButton runat="server" NavigateUrl="~sitecollection/" CssClass="ms-siteicon-a" ID="x7917ecc8c38d4bd69f58e338eab54c8c">-->
...
<!--ME:</SharePoint:SPLinkButton>-->
Ref link
Method 2:
We are going to add custom js in the master page => our site is a publishing site
We find the site logo in the below hierarchy(in a rendered page).
<div id='DeltaSiteLogo'>
<a href='site url'>
<img src='siteIconPath.png/whatever extension'/>
</a>
</div>
So we may try the following for redirecting to the site collection/root web url on click of the logo.
// Add the following js in the '.html' design file that associates with the corresponding masterpage.
<script type="text/javascript">//<![CDATA[
$(document).ready(function(){
$("div#DeltaSiteLogo a").attr("href",_spPageContextInfo.siteAbsoluteUrl);
});
//]]>
</script>
It works.
Edit on the SharePoint Designer Master Pages > seattle.master .
Crtl F - Search for DeltaSiteLogo
DEFAULT:
<SharePoint:SPSimpleSiteLink CssClass="ms-siteicon-a" runat="server" id="onetidProjectPropertyTitleGraphic" >
<SharePoint:SiteLogoImage CssClass="ms-siteicon-img" name="onetidHeadbnnr0" id="onetidHeadbnnr2" LogoImageUrl="/_layouts/15/images/siteIcon.png?rev=47" runat="server"/>
</SharePoint:SPSimpleSiteLink>
Change To This (copy & paste the script):
<SharePoint:SPLinkButton runat="server" NavigateUrl="~sitecollection/" CssClass="ms-siteicon-a" ID="x7917ecc8c38d4bd69f58e338eab54c8c">
<SharePoint:SiteLogoImage CssClass="ms-siteicon-img" name="onetidHeadbnnr0" id="onetidHeadbnnr2" LogoImageUrl="/_layouts/15/images/siteIcon.png?rev=47" runat="server"/>
</SharePoint:SPLinkButton>

Sharepoint master page asp:repeater tag

I am currently working on generating a master page for a sharepoint instance. It is however giving some issues when attempting to convert over an ASP repeater
The following works in generating a repeated text:
<!--MS:<asp:Repeater ID="TopMenu" runat="server" DataSourceID="selectedSiteMap">-->
<!--MS:<HeaderTemplate> -->
<!--ME:</HeaderTemplate> -->
<!--MS:<ItemTemplate> -->
<li>test</li>
<!--ME:</ItemTemplate> -->
<!--MS:<FooterTemplate> -->
<!--ME:</FooterTemplate> -->
<!--ME:</asp:Repeater> -->
<!--MS:<asp:SiteMapDataSource SiteMapProvider="CurrentNavigation" ShowStartingNode="false"
StartFromCurrentNode="false" StartingNodeOffset="0" StartingNodeUrl="sid:1002"
EnableViewState="true" ID="selectedSiteMap" runat="server" /> -->
However the following does not work:
<!--MS:<asp:Repeater ID="TopMenu" runat="server" DataSourceID="selectedSiteMap">-->
<!--MS:<HeaderTemplate> -->
<ul id="main_menu_ul" class="">
<!--ME:</HeaderTemplate> -->
<!--MS:<ItemTemplate> -->
<li><a href=<!--MS:"<%# Eval("Url")%>"--> class="link">
<!--MS:<%# Eval("Title")%>--></a></li>
<!--ME:</ItemTemplate> -->
<!--MS:<FooterTemplate> -->
</ul>
<!--ME:</FooterTemplate> -->
<!--ME:</asp:Repeater> -->
<!--MS:<asp:SiteMapDataSource SiteMapProvider="CurrentNavigation" ShowStartingNode="false"
StartFromCurrentNode="false" StartingNodeOffset="0" StartingNodeUrl="sid:1002"
EnableViewState="true" ID="selectedSiteMap" runat="server" /> -->
So far I have identified the issue is 2 fold:
1. the converter is does not like the fact that the opening ul and closing ul dont exactly match
2. the converter does not like the eval tags at all.
Any help anyone could give to getting this repeater to work properly would be very helpful. Thank you
The other possibility is that you are manually uploading your master page (as opposed to deploying it using a feature). The <%# Eval("Url")%> tag is seen as server-side code, and it turns out that there is a security limitation that server-side code is not allowed in customized pages - in other words, ones that are unghosted.
So if you customize a master page using SharePoint designer, the new copy exists in the content database, and this is regarded as customized.
I hit this recently - deployed an aspx master page (with a repeater control in it) using a feature, download a copy, re-upload it (with no changes) and bang - error. Code blocks not allowed in this file.
As you're putting this in an html master page, you're probably just masking the real reason for the error. You could try adding an entry to the web.config (see, for example, this blog) to specify that your master page can have code blocks.
It might because You have opened
MS: before you Eval("") but there is no closing ME: after eval tag.

Setting Page.Title from the codebehind of a Sitecore sublayout (user control) doesn't work

I'm having an issue setting Page.Title for a page from the codebehind of a usercontrol (sublayout).
We have a layout, MainLayout.aspx. I can set the page title from the codebehind of this page, and it works fine. However, if, after this, I try to set the page title in the codebehind of MySublayout1, the new value is set for the Page.Title property, but the change is not reflected on the page.
I've tried moving the code from the Page_Load to the OnInit events for both the page and the control, but nothing seems to work. Any idea why this doesn't work?
The best approach for this is creating an new rendering or sublayout that renders the -section of your page. So you can set the values in literals or sc:text controls in the sublayout instead of setting only the Page.Title from codebehind.
This way you can set more properties all at once like the meta-keywords and meta-description, based on the current Sitecore Item.
I'd add the following to the layout or sublayout that is in it:
<head runat="server" id="_Head">
<title><sc:FieldRenderer ID="frTitle" runat="server" FieldName="title" /></title>
</head>
Also make sure that you call DataBind(); or set Sitecore.Context.State.DataBind to true.
If you want the Sublayout to override the title set in the Layout, you can move the code in the Layout to Page_Init and use Page_Load in your Sublayout.
If that doesn't work, then your Sublayout may have trouble accessing the Page. You can try using WebUtil.CurrentPage.Title to access the current page title. It might also require that you set runat="server" on the head and title elements as follows:
<head runat="server">
<title runat="server"></title>
You can simply use this:
< title> <%=Sitecore.Context.Item["PageTitleFieldName"] %> < /title>
It works fine to render page title from given field.

SharePoint 2010 WebPart Personalize Layout

I have a homepage on an Intranet. It has at 15+ webparts (news, weather, etc.) I want to allow the users to customize the page by moving the webparts around or deleting them. At present I don't let them see the ribbon at the top so they don't have access to the "Edit page" button. I have pulled it out from the Ribbon
<a unselectable="on" href="javascript:;" onclick="return false;" class="ms-cui-ctl-large" aria-describedby="Ribbon.WebPartPage.Edit.Edit.Menu.Actions.Edit_ToolTip" mscui:controltype="Button" role="button" style="height: auto;" id="Ribbon.WebPartPage.Edit.Edit-SelectedItem">
<span unselectable="on" class="ms-cui-ctl-largeIconContainer">
<span unselectable="on" class=" ms-cui-img-32by32 ms-cui-img-cont-float">
<img unselectable="on" alt="" src="/_layouts/1033/images/formatmap32x32.png" style="top: -160px; left: -96px;">
</span>
</span>
<span unselectable="on" class="ms-cui-ctl-largelabel" style="height: auto;">Edit<span unselectable="on">
</span>Page</span>
</a>
Unfortunately it is not working. Any thoughts?
I will be doing the same with the "Stop Editing" button as well.
According to this post: http://artykul8.com/2011/03/useful-sharepoint-shortcuts/
the trick is to use the MSOLayout_ToggleLayoutMode(); javascript function.
According to a comment in that same page, in SP2010, that javascript function is only available when you already have a web part in the page. The behavior I observed differs from this one, given that, to me, this function only worked when the page was in edit mode already (and it worked even when the page had no web part added).
I was able to find the javascript file where that function is defined, which is the ie55up.js. You can load it in your masterpage by doing:
<SharePoint:ScriptLink language="javascript" name="ie55up.js" OnDemand="false" runat="server" />
For information about how to build a web control that uses that javascript function, see here: http://www.codeproject.com/KB/sharepoint/SwitchWPMode.aspx
Hope this helps
I finally found the answer to this question. It was very simple after the JS call was determined. I believe this should be for a webpart only page.
To put the page in edit mode for Personalization via a Javascript call:
ChangeLayoutMode(true); // how simple is that??
To stop the editing of the page via a Javascript call:
MSOLayout_ToggleLayoutMode(); // same as given in the other post
The "Stop" edit mode I believe is the same for all pages no matter if it's a personalized page, all webparts page, etc.

SharePoint Search on default Masterpage

I am trying to enable the search bar on my default master page. In the source code of the master page there is the following:
<asp:ContentPlaceHolder id="PlaceHolderSearchArea" runat="server">
<SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox"/>
</asp:ContentPlaceHolder>
In the render of the page in design mode it says [DelegateControl]. When I publish the page, I do not see a search box, I see nothing... can someone point me in the direction as how to enable search on my default master page, thanks.
I had the exact same problem but eventually found a very simple solution. You just need to make sure your asp:ContentPlaceHolder is within an html form. I don't know exactly why this is the case, but simply changing your code to
<form id="Form1" runat="server">
<asp:ContentPlaceHolder id="PlaceHolderSearchArea" runat="server">
<SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox"/>
</asp:ContentPlaceHolder>
</form>
should solve the problem.
I found this very simple application.master page: http://blogs.microsoft.co.il/blogs/justguy/archive/2008/08/31/empty-application-master.aspx
When the search boxes worked using this simple master page, I was able to track down the problem and find the needed element.
Are you certain that you MOSS Search service is correctly configured?
If not, check this article:
http://www.mysharepointblog.com/post/2008/10/Configure-Search-On-MOSS-2007-(Microsoft-Office-SharePoint-Server).aspx
Have you activated the "Office SharePoint Server Standard Site Collection features" from the site features?

Resources