Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

svn commit: r532712 - in /lenya/trunk/src/webapp: global-sitemap.xmap lenya: msg#00200

cms.lenya.cvs

Subject: svn commit: r532712 - in /lenya/trunk/src/webapp: global-sitemap.xmap lenya/content/exception/publication-does-not-exist.jx lenya/resources/i18n/cmsui.xml lenya/resources/i18n/cmsui_de.xml

Author: andreas
Date: Thu Apr 26 04:41:20 2007
New Revision: 532712

URL: http://svn.apache.org/viewvc?view=rev&rev=532712
Log:
Added exception handling for non-existing publications. This fixes bug 42220.
Thanks to Joern Nettingsmeier for enhancing the patch.

Added:
lenya/trunk/src/webapp/lenya/content/exception/publication-does-not-exist.jx
Modified:
lenya/trunk/src/webapp/global-sitemap.xmap
lenya/trunk/src/webapp/lenya/resources/i18n/cmsui.xml
lenya/trunk/src/webapp/lenya/resources/i18n/cmsui_de.xml

Modified: lenya/trunk/src/webapp/global-sitemap.xmap
URL:
http://svn.apache.org/viewvc/lenya/trunk/src/webapp/global-sitemap.xmap?view=diff&rev=532712&r1=532711&r2=532712
==============================================================================
--- lenya/trunk/src/webapp/global-sitemap.xmap (original)
+++ lenya/trunk/src/webapp/global-sitemap.xmap Thu Apr 26 04:41:20 2007
@@ -412,7 +412,21 @@

<!-- Enter the actual publication -->
<map:match pattern="*/**">
- <map:mount uri-prefix="{1}" src="{fallback:sitemap.xmap}"
check-reload="true" reload-method="synchron"/>
+ <map:select type="resource-exists">
+ <map:when test="context://lenya/pubs/{1}">
+ <map:mount uri-prefix="{1}" src="{fallback:sitemap.xmap}"
check-reload="true" reload-method="synchron"/>
+ </map:when>
+ <map:otherwise>
+ <map:generate type="jx"
src="fallback://lenya/content/exception/publication-does-not-exist.jx">
+ <map:parameter name="publicationId" value="{1}"/>
+ </map:generate>
+ <map:transform type="i18n">
+ <map:parameter name="locale"
value="{request:locale}"></map:parameter>
+ </map:transform>
+ <map:call resource="style-cms-page"/>
+ <map:serialize status-code="404" />
+ </map:otherwise>
+ </map:select>
</map:match>
</map:pipeline>


Added:
lenya/trunk/src/webapp/lenya/content/exception/publication-does-not-exist.jx
URL:
http://svn.apache.org/viewvc/lenya/trunk/src/webapp/lenya/content/exception/publication-does-not-exist.jx?view=auto&rev=532712
==============================================================================
---
lenya/trunk/src/webapp/lenya/content/exception/publication-does-not-exist.jx
(added)
+++
lenya/trunk/src/webapp/lenya/content/exception/publication-does-not-exist.jx
Thu Apr 26 04:41:20 2007
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jx:template xmlns:jx="http://apache.org/cocoon/templates/jx/1.0";>
+
+ <page:page
+ xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0";
+ xmlns:i18n="http://apache.org/cocoon/i18n/2.1";
+ xmlns="http://www.w3.org/1999/xhtml";>
+
+ <page:title><i18n:text>publication-does-not-exist</i18n:text></page:title>
+
+ <page:body>
+ <p>
+ <i18n:translate>
+ <i18n:text>publication-...-does-not-exist</i18n:text>
+ <jx:set var="requestUri" value="${cocoon.request.requestURI}"/>
+ <jx:set var="contextPath" value="${cocoon.request.contextPath}"/>
+ <jx:set var="snippets"
value="${requestUri.substring(contextPath.length()).split('/')}"/>
+ <i18n:param><jx:out value="${snippets[1]}"/></i18n:param>
+ </i18n:translate>
+ </p>
+ <p>
+ <a href="/${contextPath}"><i18n:text>Back</i18n:text></a>
+ </p>
+ </page:body>
+
+ </page:page>
+
+</jx:template>
\ No newline at end of file

Modified: lenya/trunk/src/webapp/lenya/resources/i18n/cmsui.xml
URL:
http://svn.apache.org/viewvc/lenya/trunk/src/webapp/lenya/resources/i18n/cmsui.xml?view=diff&rev=532712&r1=532711&r2=532712
==============================================================================
--- lenya/trunk/src/webapp/lenya/resources/i18n/cmsui.xml (original)
+++ lenya/trunk/src/webapp/lenya/resources/i18n/cmsui.xml Thu Apr 26 04:41:20
2007
@@ -393,6 +393,9 @@
<message key="error-generic">An error occured.</message>
<message key="error-404">404: Page not found</message>

+ <message key="publication-does-not-exist">The publication does not
exist</message>
+ <message key="publication-...-does-not-exist">The publication with the ID
"{0}" does not exist.</message>
+
<message key="configure-content-repository">
<xhtml:strong>Note:</xhtml:strong> Make sure that your content repository
is configured correctly within
<xhtml:code>$PUB_HOME/config/(local.)publication.xml</xhtml:code>.

Modified: lenya/trunk/src/webapp/lenya/resources/i18n/cmsui_de.xml
URL:
http://svn.apache.org/viewvc/lenya/trunk/src/webapp/lenya/resources/i18n/cmsui_de.xml?view=diff&rev=532712&r1=532711&r2=532712
==============================================================================
--- lenya/trunk/src/webapp/lenya/resources/i18n/cmsui_de.xml (original)
+++ lenya/trunk/src/webapp/lenya/resources/i18n/cmsui_de.xml Thu Apr 26
04:41:20 2007
@@ -403,6 +403,9 @@
<message key="error-generic">Ein Fehler ist aufgetreten.</message>
<message key="error-404">404: Seite nicht gefunden</message>

+ <message key="publication-does-not-exist">Die Publikation existiert
nicht</message>
+ <message key="publication-...-does-not-exist">Die Publikation mit der ID
"{0}" existiert nicht.</message>
+
<message key="configure-content-repository">
<xhtml:strong>Hinweis:</xhtml:strong> Überprüfen Sie, ob das
Content-Repository
in <xhtml:code>$PUB_HOME/config/(local.)publication.xml</xhtml:code>
richtig konfiguriert ist.


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
solaris.opensol...    editors.vim/200...    web.turbogears....    jakarta.ant.dev...    mathematics.max...    text.unicode.ge...    lang.ruby.core/...    xfce.announce/2...    network.centeri...    php.cvs.pear/20...    user-groups.lin...    kde.devel.quant...    file-systems.ar...    redhat.fedora.t...    apple.fink.auto...    gnome.orbit.gen...    qplus.devel/200...    culture.transpo...    video.dri.user/...    operators.nanog...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation