On Die, 2006-09-12 at 17:24 +0200, simon litwan wrote:
> On Son, 2006-09-03 at 18:48 +0200, Jürgen Ragaller wrote:
> > Am Sep 3, 2006 um 12:52 schrieb Jörn Nettingsmeier:
> > 
> > > simon litwan wrote:
> > >> On Sam, 2006-09-02 at 19:01 +0200, simon litwan wrote:
> > >>> On Fre, 2006-09-01 at 18:58 +0200, Jörn Nettingsmeier wrote:
> > >>>> simon litwan wrote:
> > >>>>> On Don, 2006-08-31 at 20:32 +0200, Joern Nettingsmeier wrote:
> > >>>>>> simon litwan wrote:
> > >>>>>>> hi all
> > >>>>>>>
> > >>>>>>> is someone successfully using a customized content-dir (in
> > >>>>>>> publication.xconf)?
> > >>>>>>>
> > >>>>>>> i allways get a 404.
> > >>>>>> works for me, but with an irritating quirk:
> > >>>>>> you need to specify the base directory of your publication, and a
> > >>>>>> subdirectory "content/" is implicit.
> > >>>>> thanks for your reply.
> > >>>>>
> > >>>>> i already have it like that.
> > >>>>> actually it worked for me a few month ago. i didn't change  
> > >>>>> anything
> > >>>>> beside a svn up the lenya.
> > >>>>>
> > >>>>> but it seems i'm the only one with problems, see thread "Lenya  
> > >>>>> 1.4-dev
> > >>>>> content-dir and rcml data"
> > >>>>>
> > >>>>> andreas helped me to debug it a bit and we discovered a strange  
> > >>>>> behavior
> > >>>>> in SourceNode.java where in my setup the path to the  
> > >>>>> sitetree.xml is
> > >>>>> missing the content/ part.
> > >>>>>
> > >>>>> i will have a look tomorrow.
> > >>>> same thing happened to me a couple of days ago, but i blamed it  
> > >>>> on the uuid migration target... i may have been wrong, though.
> > >>>> in case you still have the pre-uuid content around, maybe could  
> > >>>> you try to migrate again... i think some recent change fixed it  
> > >>>> for me.
> > >> i'm moving this thread to dev because it's a dev issue now.
> > >> so, now i found the problem i think.
> > >> if i use <content-dir
> > >> src="/opt/jakarta-tomcat-5.0.28/webapps/lenya/lenya/pubs/default/ 
> > >> content"/>
> > >> it works!
> > >> and if i use
> > >> <content-dir src="lenya/pubs/default"/>
> > >> it works too!
> > >> that looks like an inconsistency.
> > >
> > > weird. i was not aware of that.
> > >
> > >> i think we need to decide how we want to handle this.
> > >> for me it would be logical if the path of the content dir points  
> > >> to the
> > >> content dir, like the absolute path works.
> > >> WDOT?
> > >> i could provide a patch if we reach a consensus on this.
> > >
> > > i still think we should get rid of the content dir and implement an  
> > > option pubs.copy=false to behave like modules.copy=false, i.e.  
> > > everything (sitemaps, config, ac, resources) is "live" in the  
> > > original pub directories (base path specified in  
> > > local.build.properties).
> > > the modules-in-place feature is sooo nice once you've gotten used  
> > > to it that it's really irritating to have to re-deploy your pubs if  
> > > you change  the sitemap or something like that.
> > >
> > > this also gets rid of the storage inconsistencies, where rcml data  
> > > ends up in one place and content in the other...
> > 
> > Using the existing mechanism also for rcml data would solve that  
> > inconsistency. I think the idea of a configurable directory for all  
> > the content (extending the existing mechanism) provides more  
> > flexibility (user can choose where to store the content) and  
> > separates content from publication code.
> > 
> > Wouldn't it be nice to have all the content generated by the lenya  
> > gui in a directory separate from the publication logic?
> > - Rcml (extending the exsiting mechanism)
> > - users (can be configured in pubcliation.xconf),
> > - lucene stuff (don't know if this can be configured)
> > - anything else I am not aware of???
> > 
> > I think backup and deployment are much easier when code and content  
> > are completely separate - once in a while a few bugfixes etc. will  
> > have to be deployed... (or someone needs restore ;-))
> > 
> > wdyt?
> > 
> > Jürgen Ragaller, null-oder-eins
> > 
> i think you're right, but one step after the other.
> i really would like if this problem is a kind of fixed. 
> 
> since the this directory, where the content-dir is pointing to, could
> have more than just the content it would make sense to rename it later
> on to something more appropriate.
> 
> but most important seems to me to resolve this inconsistency.
> 
> so i would propose to handle the absolute path like the relative.
> 
> comments are welcome.
if nobody else, i will comment my self ;)

the problem is caused in the method SourceNode.getRealSourceURI() where
you get on base of Publication.getContentDir() the real source uri back.

if the content-dir is not configured the method
Publication.getContentDir() gives back an absolute path with  /content
at the end. 

now if you configure the content-dir in publication.xconf as recommended
without /content at the end the method Publication.getContentDir() will
never give you back a /content.

since this issue actually is not connected to the rcml and what ever
files could be in the content directory as well (as it is now), i really
would change the recommendation and add a /content at the end of
content-dir .
  <content-dir src="lenya/pubs/default/content"/>
  <content-dir src="/home/USERNAME/data/default/content"/>
  <content-dir src="D:/tmp/default/content"/>

but lenya/pubs/default/content will not work at the moment because
absolute and relative path are handled differently in
SourceNode.getRealSourceURI(). this causes the inconsistency.
this is the reason why <content-dir src="lenya/pubs/default"/> is
working but 
<content-dir
src="/opt/jakarta-tomcat-5.0.28/webapps/lenya/lenya/pubs/default"/> is
not.

i hope i will soon find the time to provide a patch.

simon




> 
> simon
> 
> 
> 
> > 
> > >
> > > wdyt?
> > >
> > > -- 
> > > "Open source takes the bullshit out of software."
> > >   - Charles Ferguson on TechnologyReview.com
> > >
> > > --
> > > Jörn Nettingsmeier, EDV-Administrator
> > > Institut für Politikwissenschaft
> > > Universität Duisburg-Essen, Standort Duisburg
> > > Mail: [EMAIL PROTECTED], Telefon: 0203/379-2736
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
-- 
Simon Litwan                               [EMAIL PROTECTED]
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org


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

Reply via email to