<%@ Register TagPrefix="PublishingWebControls" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing, Version=, 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" />            

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!


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.

  • Is the prod site using the minimum download strategy by chance? Sep 4 '14 at 22:47
  • Prod is not using minimum download strategy..
    – Plexus81
    Sep 4 '14 at 22:55
  • this looks wrong, After="SharepointCssFile". Did you just forget the .css in your redacting or is it omitted entirely? Sep 4 '14 at 23:20

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.