PublishingWebControls EditModePanel do not work in production environment - can't recieve css file when pagemode edit

sharepoint.stackexchange https://sharepoint.stackexchange.com/questions/114153

Question

<%@ Register TagPrefix="PublishingWebControls" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

<PublishingWebControls:EditModePanel runat="server" PageDisplayMode="Edit">
    <SharePoint:CssRegistration ID="CssRegistration5" Name="/_layouts/15/COMPANY.Publishing/css/editMode.css" runat="server" After="SharepointCssFile" />            
</PublishingWebControls:EditModePanel>

this is in my masterpage..

Problem: I can't get the editmode.css file when the page is in edit mode.

Is there something wrong I'm doing here? This works on my dev environment but NOT in production environment. I've tried to retract wsp and deploy it without any luck! I've also re-enabled the masterpage site collection feature.

I've also checked that the css exist. If I put the css file outside the PublishingWebControls:EditModePanel the page gets the css file. But not in pagemode edit!

UPDATE

I've tried to change the "control" and it seems like the page do not know when the page is in editmode!! When I changed the property PageDisplayMode to Display the css file always loaded .. even if the page was in editmode.

Was it helpful?

Solution

Had to reenable feature publishing infrastructure and publishing. That fixed the problem!

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top