Hi Lenya devs,

the problem with the blocker bug 42394 [1] is the following:

- Specific revisions are addressed using ...?lenya.revision=xy

- The revision parameter is passed from the sitemap to the
  RepositorySourceFactory

- The homepage includes a news overview (IMO a normal situation)

- The news module sitemap evaluates the lenya.revision parameter

- It tries to load revision xy of the news page, even if it
  doesn't exist


How should we handle this situation? Some options:

- Pass UUID and language alongside the lenya.revision parameter
  to specify which document is affected by the revision selection.
  The problem with this approach is that an inconsistent view is
  generated because document versions from different times are
  assembled to a page.

- Whenever a repository source is generated, compare its path
  with the path of the HTTP request. If it is the same, use the
  revision parameter, if not, don't use it. Well, if we want to
  emphasize convention over configuration, this might be the
  easiest solution. But the same problem occurs as with the
  first option.

- Use global revision numbers (like SVN) and apply them to all
  documents. If a document didn't exist at the given time, the
  inclusion either returns a placeholder, or an error message
  is shown.

IMO option 2 is preferrable, but will probably require massive
changes to the revision control mechanism (maybe something for
1.4.1).

A quick fix would be to hard-code if the lenya.revision parameter
should be evaluated. For instance, the "include" and "header"
formats of the news resource type wouldn't use it. But this can't
be a long-term solution for various reasons - for instance, you'd
always have to know if you can omit the parameter when you access
a lenyadocument: source.


Maybe there are more ideas?

-- Andreas


[1] http://issues.apache.org/bugzilla/show_bug.cgi?id=42394


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to