Hi Philipp,

Thanks a lot for your time.

In production we are stuck with a previous version of magnolia that did require loadPage at the time, so nice to know it will be fixed when updating to a more recent magnolia version. So then the isPage check should not be needed in the current magnolia code. It is passing the tests on the project here though, and it fixes the bug I had so I will keep it if you don't mind ! \(^ ^)/

Thanks again.

Niko,

On Apr 4, 2007, at 5:57 PM, Philipp Bracher wrote:

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
----------------------------------------------------------------


----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/developer.html
----------------------------------------------------------------

Reply via email to