When nesting paragraphs, we are using the cms:loadPage to get the
proper place to save/load the data within the nested par.
3.0 supports nested paragraphs without cms:loadPage or other tricks.
On save though, while everything works fine, the metadata for the
page itself, is not updated.
save means: dialog save, inline saving through calling the
savehandler by the paragraphs code?
When looking at the SaveHandlerImpl class, the method save has the
following:
---------------------------------
// update meta data (e.g. last modified) of this paragraph and the
page
node.updateMetaData();
page.updateMetaData();
---------------------------------
but since, loadPage was called before, on something that was
actually not a page, metadata is not updated, so lastmodified is
not updated either and the status of the page is not properly
reflected.
Adding the following piece of code, obviously solves the problem:
---------------------------------
Content rootPage = page;
while(!hm.isPage(rootPage.getHandle())) rootPage =
rootPage.getParent();
rootPage.updateMetaData();
---------------------------------
I haven't tested nested paragraphs in the latest magnolia code,
OK, you should ;-)
but it seems that the same problem could appear.
Probably. But I think that the active page is not changed in our
Should I patch the magnolia trunk on SaveHandlerImpl with the code
above ? the LoadPage tag to throw an exception ?
This won't work. isPage is very specific to pages and would not fix
the problem in general.
You should check first our nested paragraph support (used in
sitedesigner for example).
In case this does not work as I described we need an addition root
parameter to tell the handler where it's main node (page,
docuement, ...) is.
Philipp
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/developer.html
----------------------------------------------------------------