Frequently Asked Questions
- Errors
- I get an error or an exception, where can I look at, what should I do?
- General Lenya capabilities
- Can a local Lenya instance generate a site that is deployed on a remote hosting service?
- Installation, Setup, Virtual hosts etc.
- I have already deployed cocoon in my servlet engine. Can I install Lenya in parallel?
- Can lenya be integrated into a virtual hosting environment?
- Do I need to create a Lenya install for each virtual server?
- Is there a way to create multiple sites accessible via various methods of access control (based on who owns them)?
- How do I enable email notifications?
- Running Lenya
- Lenya CMS ui tabs are not displayed, whats wrong?
- I can't run the lenya.sh script in a linux shell.
- Why do I get an "illegal cookie" warning with all the lenya reference sites using Opera?
- I get a java.net.URISyntaxException error:
- How can I create new users?
- When using Lenya, a blank page occurs.
- I get a "Connection timed out" errors such as "org.apache.cocoon.ProcessingException: Unable to get transformer handler for cocoon://scheduler/default/xxx"
- Document Types (short: Doctypes)
- Where can I find lenya-documentation about the exact meaning of:
- How to create a new document type?
- How to to use my own Relax NG schema for editing documents with Bitflux in Lenya?
- File-upload
- How can I Upload XML Files?
- Compliance to standards
- How to port the default pub to XHTML?
- Revision Control
- How do I break a lock on a document?
- Background:
- Edit documents
- How can I delete a document?
- Asset management
- Asset upload does not work. How do I enable asset uploads?
- Fallback
- How can I provide a different authoring login page for my publication?
- Internationalization (i18n)
- How do I switch the default language for an existing publication?
- Editors
- BXE doesn't let me insert a <h1> heading?
- Customization
- How to Add Custom Logicsheets?
- Errors
- General Lenya capabilities
-
Installation, Setup,
Virtual hosts etc.
- I have already deployed cocoon in my servlet engine. Can I install Lenya in parallel?
- Can lenya be integrated into a virtual hosting environment?
- Do I need to create a Lenya install for each virtual server?
- Is there a way to create multiple sites accessible via various methods of access control (based on who owns them)?
- How do I enable email notifications?
-
Running Lenya
- Lenya CMS ui tabs are not displayed, whats wrong?
- I can't run the lenya.sh script in a linux shell.
- Why do I get an "illegal cookie" warning with all the lenya reference sites using Opera?
- I get a error:
- How can I create new users?
- When using Lenya, a blank page occurs.
- I get a "Connection timed out" errors such as "org.apache.cocoon.ProcessingException: Unable to get transformer handler for cocoon://scheduler/default/xxx"
- Document Types (short: Doctypes)
- File-upload
- Compliance to standards
- Revision Control
- Edit documents
- Asset management
- Fallback
- Internationalization (i18n)
- Editors
- Customization
Errors
I get an error or an exception, where can I look at, what should I do?
-
Read this FAQ carefully
-
If all that fails, ask the user mailing list and provide following informations:
-
as possible all error output with somewhat descriptive package names
-
what web container are you running on what system
-
what lenya/cocoon versions are you using
-
what do the error logs of your container say (eg: "tomcat/logs/catalina.out" for Tomcat)
-
what do the error logs of lenya say, these can be found in lenya/WEB-INF/logs, look here for the output of error.log
-
General Lenya capabilities
Can a local Lenya instance generate a site that is deployed on a remote hosting service?
Yes. Using the StaticHTMLExporter task, Lenya can generate static html, css, and other supported files. Lenya maintains the directory structure of the generated site, which can then be uploaded to another site.
To enable the StaticHTMLExporter task, configure the tasks.xconf file located in /$PUBLICATION_DIRECTORY/$YOUR_PROJECT_NAME/config/tasks/.
Enable the StaticHTMLExporter as a sub-task of the <task id="publish"> task,
<task id="publish"> .... <task id="export" class="org.apache.lenya.cms.publishing.StaticHTMLExporter"> <parameter name="export-path" value="work/export/pending"/> <parameter name="substitute-regexp" value="/lenya/$YOUR_PROJECT_NAME/live/"/> <parameter name="substitute-replacement" value="/"/> <parameter name="my-server-port" value="$THE_SERVER_PORT_RUNNING_LENYA"/> </task> </task>
When publishing files, the static files will be stored in the "export-path" directory.
As of Lenya 1.2, this task is included in the publish task, but commented out by default.
And alternative way is to use the Cocoon CLI as there may be some issues with the StaticHTMLExporter, or to call WGet directly outside of lenya.
Installation, Setup, Virtual hosts etc.
I have already deployed cocoon in my servlet engine. Can I install Lenya in parallel?
Yes you can.
Can lenya be integrated into a virtual hosting environment?
Yes, the probably most simple setup would be to use a standard Apache webserver with mod_proxy and then connect the various "URL prefixes" to the various other servers. See the Mod Proxy tutorial for reference.
Do I need to create a Lenya install for each virtual server?
No, you can run all publications within one servlet container context, which
are being called by the virtual servers within Apache for instance.
Is there a way to create multiple sites accessible via various methods of access control (based on who owns them)?
Yes, with the Lenya access control framework this is no problem.
How do I enable email notifications?
Set enabled="true" in lenya/config/notification/notification.xconf
Set the property in pubname/config/tasks/targets.xml to your smtp server <property name="mail.mailhost" value="localhost"/>
Running Lenya
Lenya CMS ui tabs are not displayed, whats wrong?
As of Lenya 1.2, this is no longer a problem. It used to be a problem with Xalan.
I can't run the lenya.sh script in a linux shell.
The lenya.sh script has DOS line breaks. Fix it like that.
-
dos2unix lenya.sh
-
chmod +x lenya.sh
-
Then start it with your prefered param...
...and lenya will work like a charm
Why do I get an "illegal cookie" warning with all the lenya reference sites using Opera?
cocoon issues a cookie containing /lenya. If the path to the Lenya publication does conflict with the cookie-path, Opera will (rightfully) complain.
I get a
java.net.URISyntaxException
error:
java.net.URISyntaxException: Illegal character in path at index 21: file:/D:/build/Tomcat 4.1/webapps/lenya/lenya/pubs/blog/config/ac/passwd/
The installation path may not contain spaces: Lenya Installation Instructions
How can I create new users?
Log in initially as "alice" with password "levi". Then go to the admin tab and you'll see a link for users. You can then add new users and delete existing ones.
When using Lenya, a blank page occurs.
This could be caused by an exception which is not caught by Lenya. Look into the log files of your servlet container (Tomcat) or the command line if logging is not enabled.
I get a "Connection timed out" errors such as "org.apache.cocoon.ProcessingException: Unable to get transformer handler for cocoon://scheduler/default/xxx"
Make sure your machine can get a connection to itself under all its hostnames. Test by pinging all hostnames. Edit your hosts file if necessary.
Document Types (short: Doctypes)
Where can I find lenya-documentation about the exact meaning of:
-
page-envelope
-
document-id
-
document-type
-
context-precis
-
etc.
How to create a new document type?
See Adding Custom Resource Type.
How to to use my own Relax NG schema for editing documents with Bitflux in Lenya?
-
You have to create a new document type.
-
You have to add the appropriate menu item.
File-upload
How can I Upload XML Files?
Does Lenya have something along the lines of a form that will allow people to upload XML files, have them validated, etc, then publish on a live site?
There is the one form editor (a big text area to edit XML in). Another possibility is to use WebDAV to import XML files.
Compliance to standards
How to port the default pub to XHTML?
The Default publication is validated as HTML Transitional, how to port it to XHTML?
The final serialization done in pipeline is to HTML (publication-sitemap.xmap line 154 ATM). You can change it to XHTML there.
Revision Control
How do I break a lock on a document?
Also known as: How can manage this error: "Could not check out the file Reason : The resource has already been checked out by another user"
unfortunately, currently there is no GUI way to break a lock (but have a look on the Background). you have to go into content/rcml/content/authoring/yourpage/index_en.xml.rcml and look at the entries in there
<!CheckOut> <Identity>lenya</Identity> <Time>1083252253647</Time> </!CheckOut>
if the most recent (the ones on top) are CheckOut and no corresponding CheckIn you have a lock. you can break the lock by removing the CheckOut line.
Background:
If you edit a document, it gets checked out. This means you telling lenya that you want the exclusive right to change the document. Lenya will lock this document for other users (so it cannot be edit by someone else). After you finished editing the document, save it and exit the editor. By doing so the document gets checked in again. This means you are telling lenya that you want to drop the exclusiv right to change the document. If for some reason it does not get checked in (browser crash?) the document remains locked. Log in initially as "alice" with password "levi". Try to open the document (e.g. with the forms editor) and hit CANCEL. Then it should be checked-in again.
Edit documents
How can I delete a document?
To remove a document you have two options:
-
you can either archive it (and restore it later): In the site tab go to Edit->Archive.
-
or you can delete it: In the site tab go to Edit->Delete
Asset management
Asset upload does not work. How do I enable asset uploads?
Edit the file lenya/WEB-INF/web.xml, look for "enable-uploads" and change the param-value to "true". This is also a build option you can set in local.build.properties.
Fallback
How can I provide a different authoring login page for my publication?
You've to use Fallbacks. In sitemap.xmap put the login xsl under fallback.
<map:match type="step" pattern="showscreen"> <map:generate type="serverpages" src="lenya/content/ac/login.xsp"/> <map:transform src="lenya/{fallback:xslt/ac/login.xsl}"> <map:parameter name="publication_name" value="{page-envelope:publication-id}"/> </map:transform> <map:call resource="style-cms-page"/> </map:match>
And now write your alternative login.xsl in the publication filesystem, under config/ac (webapps/lenya/lenya/pubs/[pubName]/config/ac)
Internationalization (i18n)
How do I switch the default language for an existing publication?
Go to lenya/pubs/<youpubname>/config/publication.xconf and move the default="true" attribute to your default language.
Editors
BXE doesn't let me insert a <h1> heading?
This is a setting in lenya/lenya/resources/misc/bxeng/contextmenu.xml - all tags appearing there cannot be inserted by the BXE popup menu.
Customization
How to Add Custom Logicsheets?
Custom logicsheets can be put in <yourpub>/java/src
.
You have to add a patch file for cocoon.xconf
, for instance <yourpub>/config/logicsheets.xconf
:
<xconf xpath="/cocoon/markup-languages/xsp-language/target-language[@name = 'java']" unless="/cocoon/markup-languages/xsp-language/target-language[@name = 'java']/builtin-logicsheet[parameter[@name = 'prefix' and @value = 'mylogicsheet']]"> <builtin-logicsheet> <parameter name="prefix" value="mylogicsheet"/> <parameter name="uri" value="http://foo/bar/mylogicsheet"/> <parameter name="href" value="resource://org/myproject/mylogicsheet.xsl"/> </builtin-logicsheet> ... (more logicsheets) </xconf>