locked
After upgraded to sharepoint 2007 from 2003 , can not edit page RRS feed

  • Question

  • After upgraded to SharePoint 2007 from 2003,

    the web part can not edit, after clicking the "Edit the shared web part" , alert me need check out the file,

    then After clicking the checkout file, error display "the file or folder contains characters that are not permitted"

    Any idea to solve this problem , thanks

    Thursday, May 2, 2013 12:40 PM

Answers

  • That error is a good place to start.  You're not getting an http 403 or an SharePoint permissions denied. 

    SharePoint has banned characters that it doesn't allow in file names.  I believe that this has been pretty consistent. This article explains what characters can't be used: http://support.microsoft.com/kb/905231

    If you're happy playing with ode, this snippet (taken from here) will allow you to remove any illegal characters from your files.  I've not tried it myself yet though.  Another useful link may be this one

    public string ConvertToValidSharePointFileName(string originalFileName)  
    2 {  
    3 char[] InvalidFilenameCharacters = new[] {'\\', '/', ':', '*', '?', '"', '<', '>', '|', '#', '{', '}', '%', '~','&' };  
    4 string[] InvalidFileNameStrings = new[] { ".files", "_files",  
    5 "-Dateien", "_fichiers", "_bestanden","_file",  
    6 "_archivos", "-filer", "_tiedostot", "_pliki",  
    7 "_soubory","_elemei", "_ficheiros", "_arquivos",  
    8 "_dosyalar", "_datoteke","_fitxers", "_failid",  
    9 "_fails", "_bylos", "_fajlovi", "_fitxategiak"};  
    10    
    11 string validSharePointFileName = originalFileName;  
    12    
    13 //Remove Invalid characters  
    14 validSharePointFileName = validSharePointFileName.Remove(InvalidFilenameCharacters);  
    15    
    16 //Remove consecutive periods(..)  
    17 while (validSharePointFileName.Contains(".."))  
    18 {  
    19 validSharePointFileName = validSharePointFileName.Replace("..", ".");  
    20 }  
    21    
    22 //Remove reserved words from end  
    23 foreach (string s in InvalidFileNameStrings)  
    24 {  
    25 if (validSharePointFileName.EndsWith(s))  
    26 {  
    27 if (validSharePointFileName.Length > s.Length)  
    28 {  
    29 validSharePointFileName = validSharePointFileName.Substring(0, validSharePointFileName.Length - s.Length);  
    30 }  
    31 }  
    32 }  
    33    
    34 //Remove period (.) at end  
    35 if (validSharePointFileName.EndsWith("."))  
    36 {  
    37 validSharePointFileName = validSharePointFileName.Remove(validSharePointFileName.Length - 1, 1);  
    38 }  
    39    
    40 //Remove period (.) at end  
    41 if (validSharePointFileName.StartsWith("."))  
    42 {  
    43 validSharePointFileName = validSharePointFileName.Remove(0, 1);  
    44 }  
    45    
    46 return validSharePointFileName;  
    47 } 


    Steven Andrews | SharePoint Professional | http://www.twitter.com/backpackerd00d | https://baron72.wordpress.com/

    Friday, May 3, 2013 10:45 AM
    Answerer