Hi Christian, 

we did the transition from 4.4.8 to 4.4.9-jr24 and it worked for our +4GB 
database without having to do a clean install or restore.

I made a small python script to be sure the workspace was converted properly:

[code]
#!/usr/bin/env python
# Use recursively:
# find /path/to/magnolia/workspaces -name workspace.xml -exec 
~/convertWorkspace.py {} \;
import xml.dom.minidom
import sys
import os
import shutil
from pprint import pprint

from tempfile import mkstemp

infile = None
tmpFileName = mkstemp()[1]
tmpFile = open(tmpFileName, "w+")

try:
    inFile = open(sys.argv[1], "r")
except IndexError, ex:
    pprint("Usage: convertWorkspace.py [file]")
    sys.exit(-1)

dom = xml.dom.minidom.parse(inFile)
index = dom.getElementsByTagName("SearchIndex")[0]

# kill textFilterClasses and analyzer in <param>

params = index.getElementsByTagName("param")

for p in params:
    if p.getAttribute("name") == "analyzer":
        index.removeChild(p)
    if p.getAttribute("name") == "textFilterClasses":
        index.removeChild(p)

workspace = dom.getElementsByTagName("Workspace")[0]
checkWs = dom.getElementsByTagName("WorkspaceSecurity")

if len(checkWs) < 1:
    ws = dom.createElement("WorkspaceSecurity")
    acp = dom.createElement("AccessControlProvider")
    acp.setAttribute("class", "info.magnolia.cms.core.MagnoliaAccessProvider")
    ws.appendChild(acp)
    workspace.appendChild(ws)
else:
    print "already converted WorkspaceSecurity", sys.argv[1]

tmpFile.write(dom.toxml("UTF-8"))
inFile.close()
tmpFile.close()
shutil.copy(tmpFileName, sys.argv[1])
os.unlink(tmpFileName)
[/code][img]null[/img]

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=56be2abd-6cd9-4b86-867e-2e119caf32ae


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to