Well, that was rather easy. Next problem:
The patched code requires workspace definitions like this:
<workspaces>
<workspace>
<name>workspacename</workspacename>
</workspace>
</workspaces>
whereas the original code expects something like this:
<workspaces>
<workspace>workspacename</workspace>
</workspaces>
Unfortunately not all of the original code gets patched! So if you
change the workspace definition to the new syntax namespace
registration works, but the workspaces are not set up. If you leave
them in the original syntax... well you can guess what's happening.
@ Oliver: May I make a suggestion? Your extension to Magnolia is
great and very important to many of us I would guess. Would you mind
setting up a (wiki?) page with _all_ patches necessary? That would be
awesome.
Thanks!
-Will
On 02.05.2007, at 17:57, Will Scheidegger wrote:
Hm... after having a closer look at Oliver's code I noticed that
this code by itself does not register anything yet. Unfortunately
I did not see the link to http://jira.magnolia.info/browse/
MAGNOLIA-1348 on http://jira.magnolia.info/browse/MAGNOLIA-1346.
1348 comes closer already, but I think Oliver forgot to post a
patch to RepositoryDefinition... it's missing a "getNamespaces()"
method.
I'm trying to figure out, how to add this myself - or Oliver: Could
you add the patch to the JIRA issue? Thanks.
Regards,
Will
On 01.05.2007, at 18:59, Will Scheidegger wrote:
Oliver et al
I'm slowly getting to where I actually can start to develop on our
"Magnolia for Structured Data" project.
- I've got the 3.1 code
- I've got the WTP support working now
- I've patched it with Oliver's namespace patch (See http://
jira.magnolia.info/browse/MAGNOLIA-1346. Thanks, Oliver! Excellent
work. Took me two tries, but I now I don't get any namespace
exceptions anymore).
- I've defined my custom node type that I need, the tree view etc.
- I found out that there's probably a patch file missing, because
when you patch the module definition files according to Olivers
patch files, the workspaces for these repositories are not created
anymore. Stick to the old dtd and things work fine.
- Things startup nicely...
... but as soon as I want to create an instance of my custom node
type, I get an exception:
ERROR info.magnolia.cms.gui.control.Tree Tree.java(createNode:
469) 01.05.2007 17:59:54 {http://www.fastforward.ch/jcr/ff}table
javax.jcr.nodetype.NoSuchNodeTypeException: {http://
www.fastforward.ch/jcr/ff}table
So I guess I must have missed something...?
- Yes, my module definition xml contains a reference to the custom
nodes definition file:
....
<repositories>
<repository>
<name>magnolia</name>
<workspaces>
<workspace>
<name>data</name>
</workspace>
</workspaces>
<namespaces>
<namespace>
<prefix>ff</prefix>
<uri>http://www.fastforward.ch/jcr/ff</uri>
</namespace>
</namespaces>
<nodetypefile>
/mgnl-nodetypes/data-nodetypes.xml
</nodetypefile>
</repository>
</repositories>
.....
- Yes, my nodes definition file contains the definition of the
custom node:
<nodeTypes xmlns:rep="internal" xmlns:nt="http://www.jcp.org/jcr/
nt/1.0" xmlns:mix="http://www.jcp.org/jcr/mix/1.0"
xmlns:mgnl="http://www.magnolia.info/jcr/mgnl" xmlns:jcr="http://
www.jcp.org/jcr/1.0" xmlns:ff="http://www.fastforward.ch/jcr/ff">
<nodeType name="ff:table" hasOrderableChildNodes="false"
isMixin="false" primaryItemName="">
<supertypes>
<supertype>mgnl:content</supertype>
</supertypes>
<propertyDefinition name="*" autoCreated="false"
requiredType="undefined" mandatory="false" multiple="false"
onParentVersion="COPY"
protected="false"/>
<childNodeDefinition name="*" autoCreated="false"
defaultPrimaryType="" mandatory="false" onParentVersion="VERSION"
protected="false" sameNameSiblings="true">
<requiredPrimaryTypes>
<requiredPrimaryType>nt:hierarchyNode</requiredPrimaryType>
</requiredPrimaryTypes>
</childNodeDefinition>
</nodeType>
</nodeTypes>
What else is there to do? Do I need to register the node type
programmatically? Or do I need to use CND now with this patch?
Thanks for the help!
-Will
On 06.04.2007, at 18:58, Oliver Lietz wrote:
Add NS to ns_reg.properties in the same directory. You can also
checkout my
patches to enable CNDs for modules:
http://jira.magnolia.info/secure/IssueNavigator.jspa?
reset=true&&customfield_10011Select=specificuser&customfield_10011=o
lli&sorter/field=issuekey&sorter/order=DESC
O.
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/developer.html
----------------------------------------------------------------
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/developer.html
----------------------------------------------------------------
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/developer.html
----------------------------------------------------------------
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/developer.html
----------------------------------------------------------------