Issue with Editor.css when upgrading site to CMS6 R2

Vote:
 

Hi

We have upgraded a site from CMS6 to CMS6 R2 for a customer and we get the following error when navigating to a page and choosing edit.

"Could not find file 'c:\myprojectpath\styles\Editor.css'

System.IO.FileNotFoundException Could not find file..

I've seen this article
http://world.episerver.com/Blogs/Linus-Ekstrom/Dates/2011/3/Improvements-in-TinyMCE-in-EPiServer-CMS-6-R2/

and have looked at these options:

  • Content CSS path in settings of PropertyXHTMLStringControl.
  • Dynamic property on page UIEditorCSSPaths (could be inherited from parent page).
  • Site settings attribute uiEditorCssPaths.

There are no dynamic properties defined and the uiEditorCssPaths are not set either. I'm not sure what to look for in the first option, but I've removed all external modules and plugins. 

If I copy the Editor.css file from c:\Program files\EPiServer\CMS\6.1.379.0\Application\Util\styles to my projectpath\styles it works fine, but thats not an option.

I can also omit the problem by uncomment these lines in web.config:

<!-- Uncomment the following two lines to get legacy editor in edit mode for PropertyXhtmlString and PropertyLongString-->
<register type="EPiServer.SpecializedProperties.PropertyXhtmlString, EPiServer" mappedType="EPiServer.Web.PropertyControls.LegacyPropertyXhtmlStringControl, EPiServer" />
<register type="EPiServer.Core.PropertyLongString, EPiServer" mappedType="EPiServer.Web.PropertyControls.LegacyPropertyXhtmlStringControl, EPiServer" />

But then I miss the recent updates to the TinyMCE-editor I guess

From stack trace:

[FileNotFoundException: Could not find file 'c:\myprojectpath\styles\Editor.css'.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +305
   System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) +1162
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) +66
   System.Web.Hosting.MapPathBasedVirtualFile.Open() +75
   EPiServer.Editor.TinyMCE.TinyMCEInitOptions.LoadCssStream(String cssVirtualPath) +56
   EPiServer.Editor.TinyMCE.TinyMCEInitOptions.ParseStyleFormats(IEnumerable`1 cssFilePaths) +104
   EPiServer.Editor.TinyMCE.TinyMCEInitOptions.AddStyleFormats(IDictionary`2 initOptions) +178
   EPiServer.Editor.TinyMCE.TinyMCEInitOptions..ctor(InitType initType, IDictionary`2 options, TinyMCESettings settings, PageBase page) +146
   EPiServer.Editor.TinyMCE.Editor..ctor(TinyMCESettings settings, PageBase page, InitType initType) +53
   EPiServer.Web.PropertyControls.PropertyXhtmlStringControl.CreateEditControls() +108
   EPiServer.Web.PropertyControls.PropertyDataControl.CreateChildControls() +21
   System.Web.UI.Control.EnsureChildControls() +87
   EPiServer.Web.PropertyControls.PropertyDataControl.SetupControl() +10
   EPiServer.UI.WebControls.PropertyDataForm.SetupPropertyControls(Control control) +139
   EPiServer.UI.WebControls.PropertyDataForm.SetupPropertyControls(Control control) +151
   EPiServer.UI.WebControls.PropertyDataForm.SetupPropertyControls(Control control) +151
   EPiServer.UI.WebControls.PropertyDataForm.SetupPropertyControls(Control control) +151
   EPiServer.UI.WebControls.PropertyDataForm.SetupPropertyControls(Control control) +151
   EPiServer.UI.WebControls.PropertyDataForm.SetupPropertyControls(Control control) +151
   EPiServer.UI.WebControls.PropertyDataForm.CreateChildControls() +1177
   System.Web.UI.Control.EnsureChildControls() +87
   System.Web.UI.Control.PreRenderRecursiveInternal() +44
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842

 

Any ideas?

#56196
Jan 11, 2012 12:48
Vote:
 

Hello,

You will find "Content CSS path in settings of PropertyXHTMLStringControl" in admin on each XHTML property under the 'Custom Settings' tab or in the 'Edit Custom Property Types' section and EPiServer.SpecializedProperties.PropertyXhtmlString.

#56204
Jan 11, 2012 18:39
Vote:
 

I totally forgot this case. I have to admit that I did a quick fix last time, because it only was a problem in my development environment. I just copied the edit.css-file to the required location.

But now I got the same problem in another project. Why does EPiServer look for the Editor.css file in my project templates? The content CSS path in the PropertyXHTMLStringControl in Admin mode is empty. The "onMouseOver-suggested-paths" are ~/Templates/Public/Styles/glossy/Editor.css.

I don't understand why it looks for the Editor css files in the project paths at all. These files are located in Program files x86\EPiServer ..

#58917
May 11, 2012 8:51
Vote:
 

Johan Petterssons tip worked for me. I inserted /Templates/Public/Styles/glossy/Editor.css into the property field "Content CSS Path" and then the error disappeared.

I'm a little curious to why this happen though. Seems a bit cumbersome to change this for all xhtml properties.

 

Here is the error I got (note: path have been changed for securityreasons):

Could not find file
'C:\<myproject>\<site>\NOT_A_VALID_FILESYSTEM_PATH'.

 

[FileNotFoundException: Could not find file 'C:\<project>\<site>\NOT_A_VALID_FILESYSTEM_PATH'.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +9724575
   System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath) +1142
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) +83
   System.Web.Hosting.MapPathBasedVirtualFile.Open() +75
   EPiServer.Editor.TinyMCE.TinyMCEInitOptions.LoadCssStream(String cssVirtualPath) +92
   EPiServer.Editor.TinyMCE.TinyMCEInitOptions.ParseStyleFormats(IEnumerable`1 cssFilePaths) +155
   EPiServer.Editor.TinyMCE.TinyMCEInitOptions.AddStyleFormats(IDictionary`2 initOptions) +276
   EPiServer.Editor.TinyMCE.TinyMCEInitOptions..ctor(InitType initType, IDictionary`2 options, TinyMCESettings settings, PageBase page) +230
   EPiServer.Editor.TinyMCE.Editor.OnPreRender(EventArgs e) +1010
   System.Web.UI.Control.PreRenderRecursiveInternal() +103
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496

#59097
Edited, May 21, 2012 15:05
Vote:
 

Seems like it's still problems to edit dynamic properties. I have changed the property as recommened in previous post on both page properties and dynamic properties. I have also changed the attribute uiEditorCssPaths in Episerver.config to ~/Templates/Public/Styles/glossy/Editor.css but the error above is still there.

Could use some help on this one, if any!? In advance thanks a lot   :)

#59101
May 21, 2012 17:00
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.