You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Joern Nettingsmeier <po...@uni-duisburg.de> on 2006/01/16 14:09:30 UTC

problem creating new pages in 1.4

hi *!



i have created a new publication in lenya 1.4, and have modified the
configuration. i do not want the new publication to contain any
documents (yet), so i deleted content/*/* and modified the maps in
content/*/sitetree.xml to be empty.

then i want to "import" a previously created content/authoring subdir
into my publication.

first try: i copy the subtree to content/authoring, complete with
sitetree.xml. the document shows up ok, but any usecase calls involving
the indexer (which is pretty much everything, including "publish") throw
an error:

message: index UniDuE-Design-live doesn't exist

org.apache.cocoon.ProcessingException: Error calling flowscript function
executeUsecase at
file:/local/lenya-build/lenya_1_4_X/build/lenya/webapp/lenya/usecases/usecases.js:282:-1
at <map:call> -
file:/local/lenya-build/lenya_1_4_X/build/lenya/webapp/lenya/usecases/usecase.xmap:93:46
at <map:mount> -
file:/local/lenya-build/lenya_1_4_X/build/lenya/webapp/lenya/usecase.xmap:56:128
at <map:mount> -
file:/local/lenya-build/lenya_1_4_X/build/lenya/webapp/global-sitemap.xmap:299:105
at <map:mount> -
file:/local/lenya-build/lenya_1_4_X/build/lenya/webapp/sitemap.xmap:530:106

ok, i can understand this. obviously some extra work regarding the
indexer is required to create a new site.

second try: i start with an empty publication and open it. lenya
correctly detects that "/index" does not exist and allows me to create
it with this url:

http://localhost:8888/UniDuE-Design/authoring/index.html?lenya.usecase=site.create&documentId=/index

but when i submit the form, it complains "The document ID may not
contain any special characters." which is a bugger, since i cannot
change this field (it is not even a form element, only text).

apart from a quick hint to solve my problem i would appreciate the
following info:

* how do you handle data im-/export, i.e. move your publication content
between lenya installations or copy stuff around between publications?

* what exactly is involved to create an index manually after bringing in
 content as per my 1st try, and are there any other things that must be
done before the new pages are correctly imported into lenya?

* is the error in the site.create usecase a consequence of me doing
nasty things that you did not anticipate, or is it a bug?

moreover, i would like the lucene.index usecase to be so robust as to
automatically initialize an index in case there is none. or is there a
technical reason why this should not be done? i think for most users it
would be reassuring to know there is a manual way to shuffle content
into lenya.


best,

jörn






-- 
"Án nýrra verka, án nútimans, hættir fortíðin að vekja áhuga."
"Without new works, without the present the past will cease to be of
interest."
        - Ásmundur Sveinsson (1893-1982)

--
Jörn Nettingsmeier, EDV-Administrator
Institut für Politikwissenschaft
Universität Duisburg-Essen, Standort Duisburg
Mail: pol-admin@uni-duisburg.de, Telefon: 0203/379-2736


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: problem creating new pages in 1.4

Posted by Joern Nettingsmeier <po...@uni-duisburg.de>.
Andreas Hartmann wrote:
> Joern Nettingsmeier wrote:
> 
> [...]
> 
>> second try: i start with an empty publication and open it. lenya
>> correctly detects that "/index" does not exist and allows me to create
>> it with this url:
>>
>> http://localhost:8888/UniDuE-Design/authoring/index.html?lenya.usecase=site.create&documentId=/index
>>
>>
>> but when i submit the form, it complains "The document ID may not
>> contain any special characters." which is a bugger, since i cannot
>> change this field (it is not even a form element, only text).
> 
> This was a bug, it should be fixed now. Thanks for reporting!

wow. 2 hrs round-trip from report to fix. this is why i love free
software :-D
thanks for the patch!

>> apart from a quick hint to solve my problem i would appreciate the
>> following info:
>>
>> * how do you handle data im-/export, i.e. move your publication content
>> between lenya installations or copy stuff around between publications?
> 
> I'd write a usecase which uses the Lenya API.

if i had a dollar every time you told me that... :-D

ok, let me rephrase: if i were to write a usecase using the lenya api
that can take documents of a certain doctype or entire trees of
documents and imports them into an existing lenya publication, what
needs to be done?

i can think of these:
* move the stuff over
* modify the sitemap accordingly
* tell the indexer there's new directories and files (how?)

but i guess the answer is to use the source, luke... will do that as
soon as i got my prototype done.

best,

jörn


-- 
"Án nýrra verka, án nútimans, hættir fortíðin að vekja áhuga."
"Without new works, without the present the past will cease to be of
interest."
        - Ásmundur Sveinsson (1893-1982)

--
Jörn Nettingsmeier, EDV-Administrator
Institut für Politikwissenschaft
Universität Duisburg-Essen, Standort Duisburg
Mail: pol-admin@uni-duisburg.de, Telefon: 0203/379-2736


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: problem creating new pages in 1.4

Posted by Jann Forrer <ja...@id.unizh.ch>.
On Thu, 19 Jan 2006, Andreas Hartmann wrote:

> Jann Forrer wrote:
>
> [...]
>
>>> I don't mind if I write
>>>
>>>  node.isVisibleInNav()
>>> 
>> 
>> I still have an open task to add a method getVisibleInNav() in order to use 
>> the existing value of the Visible_in_nav attribute if a new language is 
>> created otherwise the node beomces visible again. Or is that already 
>> solved?
>
> Do you mean that?
>

Yes :-)  Thanks for the fix

> Author: andreas
> Date: Wed Jan 18 03:19:15 2006
> New Revision: 370125
>
> --- lenya/trunk/src/java/org/apache/lenya/cms/site/SiteManager.java 
> (original)
> +++ lenya/trunk/src/java/org/apache/lenya/cms/site/SiteManager.java Wed Jan 
> 18
>
> +    /**
> +     * Returns the visibility of a node in the navigation.
> +     *
> +     * @param document The document.
> +     * @return A boolean value.
> +     * @throws SiteException if an error occurs.
> +     */
> +    boolean isVisibleInNav(Document document) throws SiteException;
>
>
[ ... ]

Jann

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: problem creating new pages in 1.4

Posted by "J. Wolfgang Kaltz" <ka...@interactivesystems.info>.
Andreas Hartmann schrieb:
> Jann Forrer wrote:
> 
> [...]
>> Up to now the visibleInNav attribute is stored in the sitetree. Should 
>> that attribute be stored in the MetaData?
> 
> 
> We don't have meta data for site tree nodes yet ...
> I'd rather leave it as it is now and consider the change for the
> (hopefully) upcoming repository API.

Agreed - it sounds like a property of a "SiteNode" (so, strictly 
speaking, not a meta-data item)


--
Wolfgang

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: problem creating new pages in 1.4

Posted by Andreas Hartmann <an...@apache.org>.
Jann Forrer wrote:

[...]

>> I don't mind if I write
>>
>>  node.isVisibleInNav()
>>
> 
> I still have an open task to add a method getVisibleInNav() in order to 
> use the existing value of the Visible_in_nav attribute if a new language 
> is created otherwise the node beomces visible again. Or is that already 
> solved?

Do you mean that?

Author: andreas
Date: Wed Jan 18 03:19:15 2006
New Revision: 370125

--- lenya/trunk/src/java/org/apache/lenya/cms/site/SiteManager.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/site/SiteManager.java Wed Jan 18

+    /**
+     * Returns the visibility of a node in the navigation.
+     *
+     * @param document The document.
+     * @return A boolean value.
+     * @throws SiteException if an error occurs.
+     */
+    boolean isVisibleInNav(Document document) throws SiteException;


>> IMO the second should be implemented anyway, the first could be added
>> as a shortcut.
>>
> Up to now the visibleInNav attribute is stored in the sitetree. Should 
> that attribute be stored in the MetaData?

We don't have meta data for site tree nodes yet ...
I'd rather leave it as it is now and consider the change for the
(hopefully) upcoming repository API.

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: problem creating new pages in 1.4

Posted by Jann Forrer <ja...@id.unizh.ch>.
On Wed, 18 Jan 2006, Andreas Hartmann wrote:

> Josias Thoeny wrote:
>
> [...]
>
>>> I added the method SiteManager.isVisibleInNav() to allow CreateLanguage
>>> to use the value of the existing language version. In fact, IMO the
>>> DocumentManager.add() and SiteManager method signatures should be changed,
>>> as the visibility attribute belongs to the node and not to the document.
>> 
>> 
>> Ok. I also think the visibility belongs to the node. And there may be other
>> attributes which are properties of the node, this is why the idea to use
>> meta data for the node came up some time ago. What about about having a 
>> method contentNode.getMetaData(...), just like
>> document.getMetaData(...)?
>
> +1
>
>> Or is it better to use specific methods like isVisibleInNav()?
>
> I don't mind if I write
>
>  node.isVisibleInNav()
>

I still have an open task to add a method getVisibleInNav() in order to 
use the existing value of the Visible_in_nav attribute if a new language 
is created otherwise the node beomces visible again. Or is that already 
solved?


> or
>
>  node.getMetaData().getValue(SiteNodeMetaData.VISIBLE_IN_NAV)
>
> IMO the second should be implemented anyway, the first could be added
> as a shortcut.
>
Up to now the visibleInNav attribute is stored in the sitetree. Should 
that attribute be stored in the MetaData?

Jann

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: problem creating new pages in 1.4

Posted by Andreas Hartmann <an...@apache.org>.
Josias Thoeny wrote:

[...]

>>I added the method SiteManager.isVisibleInNav() to allow CreateLanguage
>>to use the value of the existing language version. In fact, IMO the
>>DocumentManager.add() and SiteManager method signatures should be changed,
>>as the visibility attribute belongs to the node and not to the document.
> 
> 
> Ok. 
> I also think the visibility belongs to the node. And there may be other
> attributes which are properties of the node, this is why the idea to use
> meta data for the node came up some time ago. 
> What about about having a method contentNode.getMetaData(...), just like
> document.getMetaData(...)?

+1

> Or is it better to use specific methods like isVisibleInNav()?

I don't mind if I write

   node.isVisibleInNav()

or

   node.getMetaData().getValue(SiteNodeMetaData.VISIBLE_IN_NAV)

IMO the second should be implemented anyway, the first could be added
as a shortcut.

[...]

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: problem creating new pages in 1.4

Posted by Josias Thoeny <jo...@wyona.com>.
On Wed, 2006-01-18 at 12:22 +0100, Andreas Hartmann wrote:
> Josias Thoeny wrote:
> > On Mon, 2006-01-16 at 18:39 +0100, Joern Nettingsmeier wrote:
> > 
> >>another small gotcha:
> >>
> >>when i try to create a new language version of a document i just created
> >>after applying your patch, i get this (url is
> >>http://localhost:8888/UniDuE-Design/authoring/index.html?&lenya.usecase=site.createLanguage&lenya.exitUsecase=tab.overview&):
> >>
> > 
> > 
> > There is a known bug about creation of new language versions:
> > http://issues.apache.org/bugzilla/show_bug.cgi?id=36960
> > 
> > As a temporary workaround, you could apply the following diff:
> 
> [...]
> 
> I added the method SiteManager.isVisibleInNav() to allow CreateLanguage
> to use the value of the existing language version. In fact, IMO the
> DocumentManager.add() and SiteManager method signatures should be changed,
> as the visibility attribute belongs to the node and not to the document.

Ok. 
I also think the visibility belongs to the node. And there may be other
attributes which are properties of the node, this is why the idea to use
meta data for the node came up some time ago. 
What about about having a method contentNode.getMetaData(...), just like
document.getMetaData(...)?
Or is it better to use specific methods like isVisibleInNav()?


> 
> The CreateLanguage usecase should work now, though I often get the
> metadata-related "invalid UTF-8" exception :(

That's bug http://issues.apache.org/bugzilla/show_bug.cgi?id=36341
I'm currently working on it, but I still have some troubles...

Josias

> 
> -- Andreas
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
> For additional commands, e-mail: dev-help@lenya.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: problem creating new pages in 1.4

Posted by Andreas Hartmann <an...@apache.org>.
Josias Thoeny wrote:
> On Mon, 2006-01-16 at 18:39 +0100, Joern Nettingsmeier wrote:
> 
>>another small gotcha:
>>
>>when i try to create a new language version of a document i just created
>>after applying your patch, i get this (url is
>>http://localhost:8888/UniDuE-Design/authoring/index.html?&lenya.usecase=site.createLanguage&lenya.exitUsecase=tab.overview&):
>>
> 
> 
> There is a known bug about creation of new language versions:
> http://issues.apache.org/bugzilla/show_bug.cgi?id=36960
> 
> As a temporary workaround, you could apply the following diff:

[...]

I added the method SiteManager.isVisibleInNav() to allow CreateLanguage
to use the value of the existing language version. In fact, IMO the
DocumentManager.add() and SiteManager method signatures should be changed,
as the visibility attribute belongs to the node and not to the document.

The CreateLanguage usecase should work now, though I often get the
metadata-related "invalid UTF-8" exception :(

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: problem creating new pages in 1.4

Posted by Josias Thoeny <jo...@wyona.com>.
On Mon, 2006-01-16 at 18:39 +0100, Joern Nettingsmeier wrote:
> another small gotcha:
> 
> when i try to create a new language version of a document i just created
> after applying your patch, i get this (url is
> http://localhost:8888/UniDuE-Design/authoring/index.html?&lenya.usecase=site.createLanguage&lenya.exitUsecase=tab.overview&):
> 

There is a known bug about creation of new language versions:
http://issues.apache.org/bugzilla/show_bug.cgi?id=36960

As a temporary workaround, you could apply the following diff:

Index: src/java/org/apache/lenya/cms/site/usecases/CreateLanguage.java
===================================================================
--- src/java/org/apache/lenya/cms/site/usecases/CreateLanguage.java
(revision 369707)
+++ src/java/org/apache/lenya/cms/site/usecases/CreateLanguage.java
(working copy)
@@ -142,4 +142,15 @@
         return this.documentTypeName;
     }

+    /**
+     * Get the visibility attribute.
+     */
+    protected boolean getVisibleInNav() {
+        // FIXME: should not need this method because the visibility
+        // should be stored only once for all language versions of
+        // a document.
+        // Could be fixed by using the new repo interfaces
+        // (Always return true as a workaround)
+        return true;
+    }
 }

Would it make sense to commit this to svn?

Josias

> Document ID:  	[<-- this is not a form field, it is blank]
> (No whitespace, no special characters)
> Navigation Title*: 	
> Language*: 	
> Creator: 	
> Subject: 	
> Publisher: 	
> Date: 	2006-01-16 06:28:53
> Rights: 	
> 
> after hitting "create" (url
> http://localhost:8888/UniDuE-Design/authoring/index.html?lenya.continuation=6b1380632e0f516e31353412632b2264315a6468&lenya.usecase=site.createLanguage&title=Home&language=en&creator=webmaster&subject=Home+page+of+the+design+template&publisher=Uni+Duisburg-Essen&rights=All+rights+reserved.&submit=Create),
> it barfs:
> 
> Error calling continuation at
> file:/local/lenya-build/lenya_1_4_X/build/lenya/webapp/lenya/usecases/usecases.js:251:-1
> at <map:call> -
> file:/local/lenya-build/lenya_1_4_X/build/lenya/webapp/lenya/usecases/usecase.xmap:90:39
> at <map:mount> -
> file:/local/lenya-build/lenya_1_4_X/build/lenya/webapp/lenya/usecase.xmap:56:128
> at <map:mount> -
> file:/local/lenya-build/lenya_1_4_X/build/lenya/webapp/global-sitemap.xmap:299:105
> at <map:mount> -
> file:/local/lenya-build/lenya_1_4_X/build/lenya/webapp/sitemap.xmap:536:106
> 
> org.apache.cocoon.ProcessingException: Error calling continuation at
> file:/local/lenya-build/lenya_1_4_X/build/lenya/webapp/lenya/usecases/usecases.js:251:-1
> at <map:call> -
> file:/local/lenya-build/lenya_1_4_X/build/lenya/webapp/lenya/usecases/usecase.xmap:90:39
> at <map:mount> -
> file:/local/lenya-build/lenya_1_4_X/build/lenya/webapp/lenya/usecase.xmap:56:128
> at <map:mount> -
> file:/local/lenya-build/lenya_1_4_X/build/lenya/webapp/global-sitemap.xmap:299:105
> at <map:mount> -
> file:/local/lenya-build/lenya_1_4_X/build/lenya/webapp/sitemap.xmap:536:106
> 
> 
> Andreas Hartmann wrote:
> > Joern Nettingsmeier wrote:
> > 
> > [...]
> > 
> >> second try: i start with an empty publication and open it. lenya
> >> correctly detects that "/index" does not exist and allows me to create
> >> it with this url:
> >>
> >> http://localhost:8888/UniDuE-Design/authoring/index.html?lenya.usecase=site.create&documentId=/index
> >>
> >>
> >> but when i submit the form, it complains "The document ID may not
> >> contain any special characters." which is a bugger, since i cannot
> >> change this field (it is not even a form element, only text).
> > 
> > This was a bug, it should be fixed now. Thanks for reporting!
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: problem creating new pages in 1.4

Posted by Joern Nettingsmeier <po...@uni-duisburg.de>.
another small gotcha:

when i try to create a new language version of a document i just created
after applying your patch, i get this (url is
http://localhost:8888/UniDuE-Design/authoring/index.html?&lenya.usecase=site.createLanguage&lenya.exitUsecase=tab.overview&):

Document ID:  	[<-- this is not a form field, it is blank]
(No whitespace, no special characters)
Navigation Title*: 	
Language*: 	
Creator: 	
Subject: 	
Publisher: 	
Date: 	2006-01-16 06:28:53
Rights: 	

after hitting "create" (url
http://localhost:8888/UniDuE-Design/authoring/index.html?lenya.continuation=6b1380632e0f516e31353412632b2264315a6468&lenya.usecase=site.createLanguage&title=Home&language=en&creator=webmaster&subject=Home+page+of+the+design+template&publisher=Uni+Duisburg-Essen&rights=All+rights+reserved.&submit=Create),
it barfs:

Error calling continuation at
file:/local/lenya-build/lenya_1_4_X/build/lenya/webapp/lenya/usecases/usecases.js:251:-1
at <map:call> -
file:/local/lenya-build/lenya_1_4_X/build/lenya/webapp/lenya/usecases/usecase.xmap:90:39
at <map:mount> -
file:/local/lenya-build/lenya_1_4_X/build/lenya/webapp/lenya/usecase.xmap:56:128
at <map:mount> -
file:/local/lenya-build/lenya_1_4_X/build/lenya/webapp/global-sitemap.xmap:299:105
at <map:mount> -
file:/local/lenya-build/lenya_1_4_X/build/lenya/webapp/sitemap.xmap:536:106

org.apache.cocoon.ProcessingException: Error calling continuation at
file:/local/lenya-build/lenya_1_4_X/build/lenya/webapp/lenya/usecases/usecases.js:251:-1
at <map:call> -
file:/local/lenya-build/lenya_1_4_X/build/lenya/webapp/lenya/usecases/usecase.xmap:90:39
at <map:mount> -
file:/local/lenya-build/lenya_1_4_X/build/lenya/webapp/lenya/usecase.xmap:56:128
at <map:mount> -
file:/local/lenya-build/lenya_1_4_X/build/lenya/webapp/global-sitemap.xmap:299:105
at <map:mount> -
file:/local/lenya-build/lenya_1_4_X/build/lenya/webapp/sitemap.xmap:536:106


Andreas Hartmann wrote:
> Joern Nettingsmeier wrote:
> 
> [...]
> 
>> second try: i start with an empty publication and open it. lenya
>> correctly detects that "/index" does not exist and allows me to create
>> it with this url:
>>
>> http://localhost:8888/UniDuE-Design/authoring/index.html?lenya.usecase=site.create&documentId=/index
>>
>>
>> but when i submit the form, it complains "The document ID may not
>> contain any special characters." which is a bugger, since i cannot
>> change this field (it is not even a form element, only text).
> 
> This was a bug, it should be fixed now. Thanks for reporting!


-- 
"Án nýrra verka, án nútimans, hættir fortíðin að vekja áhuga."
"Without new works, without the present the past will cease to be of
interest."
        - Ásmundur Sveinsson (1893-1982)

--
Jörn Nettingsmeier, EDV-Administrator
Institut für Politikwissenschaft
Universität Duisburg-Essen, Standort Duisburg
Mail: pol-admin@uni-duisburg.de, Telefon: 0203/379-2736


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: problem creating new pages in 1.4

Posted by Andreas Hartmann <an...@apache.org>.
Joern Nettingsmeier wrote:

[...]

> second try: i start with an empty publication and open it. lenya
> correctly detects that "/index" does not exist and allows me to create
> it with this url:
> 
> http://localhost:8888/UniDuE-Design/authoring/index.html?lenya.usecase=site.create&documentId=/index
> 
> but when i submit the form, it complains "The document ID may not
> contain any special characters." which is a bugger, since i cannot
> change this field (it is not even a form element, only text).

This was a bug, it should be fixed now. Thanks for reporting!


> apart from a quick hint to solve my problem i would appreciate the
> following info:
> 
> * how do you handle data im-/export, i.e. move your publication content
> between lenya installations or copy stuff around between publications?

I'd write a usecase which uses the Lenya API.

[...]

> * is the error in the site.create usecase a consequence of me doing
> nasty things that you did not anticipate, or is it a bug?

It was a bug, see above.

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org