You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@forrest.apache.org by Helena Edelson <he...@greenjaguar.com> on 2005/12/12 14:41:06 UTC

breadcrumbs

 When employing breadcrumbs,

example:  home > articles > subdir

if the user is in node subdir viewing files, then clicks articles to go 
up one level,
I am getting from cocoon The requested resource "/articles/" could not 
be found
this link's absolute path during testing is http://localhost:8888/articles/
I threw in an index.html file
when you manually enter the index.html in the browser path after 
articles/ you get the page but
even if sitemap has match="articles/index.html" cocoon still isn't happy 
with request articles/

core log tells me this in a nutshell:
WARN    (2005-12-09) 16:11.34:445   [access] (/articles/) 
PoolThread-3/CocoonServlet: The resource was not found
org.apache.cocoon.ResourceNotFoundException: Error during resolving of 
the input stream: org.apache.excalibur.source.SourceNotFoundException: 
file:/C:/dev/tsj/2.1/src/xdocs/articles/ doesn't exist.
    at 
org.apache.cocoon.components.source.SourceUtil.handle(SourceUtil.java:325)
    at 
org.apache.cocoon.reading.ResourceReader.generate(ResourceReader.java:319)
    at 
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processReader(AbstractCachingProcessingPipeline.java:759)

Caused by: java.io.FileNotFoundException: 
C:\dev\tsj\2.1\src\xdocs\articles (Access is denied)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:106)
    at 
org.apache.excalibur.source.impl.FileSource.getInputStream(FileSource.java:146)
    ... 43 more
WARN    (2005-12-09) 16:53.48:459   [core.manager] 
(/articles/index.html) PoolThread-3/HTMLGenerator:

how can one find a solution for this?

helena
</articles/events/>

Re: breadcrumbs

Posted by Ross Gardler <rg...@apache.org>.
Helena Edelson wrote:
> When employing breadcrumbs,
> 
> example:  home > articles > subdir
> 
> if the user is in node subdir viewing files, then clicks articles to go 
> up one level,
> I am getting from cocoon The requested resource "/articles/" could not 
> be found
> this link's absolute path during testing is http://localhost:8888/articles/
> I threw in an index.html file
> when you manually enter the index.html in the browser path after 
> articles/ you get the page but
> even if sitemap has match="articles/index.html" cocoon still isn't happy 
> with request articles/

This appears to be a bug (I've verified it exists in 0.8-dev). Please 
submit a bug report [1] so that we don't lose it (also owrht adding mny 
comments below).

If you fancy tackling the problem the issue is that the breadcrumbs code 
is no longer appending index.html to the link. I recall a discussion on 
dev about this and how it relates to i18n sites, but I can't recall what 
the conclusion was.

Anyway, a solution is to either add "index.html" to every breadcrumb 
link in the code that generates the breadcrumb trail (in something like 
breadcrumbs.js in the common skin), or to add a redirect to the 
sitemap.xmap that will always redirect an URL ending in a '/' to the 
same url with "index.html" appended. See the core sitemap.xmap for an 
example of how to do this ('/' is redirectoed to '/index.html')

If you solve the problem please attach a patch to the issue you create.

Ross

[1] http://issues.apache.org/jira/browse/FOR