Issue Details (XML | Word | Printable)

Key: FOR-156
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Nicola Ken Barozzi
Reporter: Dave Brondsema
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Forrest

broken links building forrest site

Created: 01/Jun/04 11:41 AM   Updated: 02/May/06 02:06 PM
Return to search
Component/s: Launch 'forrest'
Affects Version/s: 0.6
Fix Version/s: 0.6

Time Tracking:
Not Specified

Issue Links:
Reference
 


 Description  « Hide
I removed the forrest site's cli.xconf since it's only significant differences from the default cli.xconf were ignoring ext:** and site:** which we didn't want anyway.

Now there are many broken links reported when building the site. However, it seems that there are no broken links on the generated pages.

So there's a bug in the CLI I think.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Dave Brondsema made changes - 03/Jun/04 04:35 AM
Field Original Value New Value
issue.field.fixfor 0.6
Repository Revision Date User Message
ASF #20905 Tue Jun 08 10:02:20 UTC 2004 nicolaken <action dev="NKB" type="fix" context="core" fixes-bug="FOR-156">
        Now CSS files are parsed internally, so that the urls are included in the static
        site generation.
      </action>
Files Changed
MODIFY /forrest/trunk/src/core/context/skins/krysalis-site/css/page.css
MODIFY /forrest/trunk/src/core/context/resources/chaperon/grammars/link.xlex
MODIFY /forrest/trunk/src/core/context/resources/chaperon/stylesheets/pattern2link.xsl
MODIFY /forrest/trunk/src/core/context/resources.xmap
MODIFY /forrest/trunk/status.xml

Nicola Ken Barozzi made changes - 08/Jun/04 06:55 PM
Assignee stevenn nicolaken
Nicola Ken Barozzi added a comment - 08/Jun/04 07:15 PM
Now CSS files are parsed internally, so that the urls are included in the static site generation.

Nicola Ken Barozzi made changes - 08/Jun/04 07:15 PM
Resolution Fixed
Status Assigned Resolved
Dave Brondsema added a comment - 08/Jun/04 09:40 PM
I still get 28 broken links

Dave Brondsema made changes - 08/Jun/04 09:40 PM
Status Resolved Assigned
Resolution Fixed  
Nicola Ken Barozzi added a comment - 08/Jun/04 10:18 PM
I don't :-?

I have just done a fresh seed, then changed the skin to forrest-site in forrest.properties, then done "forrest".

   BUILD SUCCESSFUL
   Total time: 56 seconds

What are the broken links you get?
Are you sure your Forrest is up to date?

I just updated mine, so it /should/ be ok...

Dave Brondsema added a comment - 08/Jun/04 10:27 PM
Forrest's own documentation has broken links, not forrest seed.

Nicola Ken Barozzi added a comment - 08/Jun/04 10:41 PM
Oops, I think I wrote on the wrong bug... probably because the right bug was never entered 8-)

Nicola Ken Barozzi added a comment - 09/Jun/04 07:26 AM
I don't understand why we should not ignore ext:** and site:** links.

These urls are *not* to be traversed, only the resulting resolved links are to be used, so I don't understand why we should not exclude them.

They will *always* be broken, as the Cocoon source resolver does not have any notion of these urls.

IMO just putting in the ignore will fix things well and without bad side effects. In fact, as you have noted, the site is all well, right?

Jeff Turner added a comment - 09/Jun/04 09:12 AM
Nicola,

In normal use, why would Cocoon's CLI ever encounter untranslated site: and ext: URLs, except if the author mistyped a link, or forgot to add a site.xml entry? In that case, it is an error, and the CLI should report it as such instead of quietly ignoring what is a broken link.

The reason Forrest's own site requires site: and ext: to be ignored is because in sitemap-ref.xml, we *deliberately* link to an untranslated index.xml page:

http://xml.apache.org/forrest/index.xml

This is where the ignorable site: and ext: links in Forrest's documentation come from. For everyone else, an untranslated site: or ext: URL is an error and should be reported as such.

Dave Brondsema added a comment - 09/Jun/04 12:59 PM
So we should ignore **/*.xml, right? And then the only broken links reported would be truly invalid ones?

Jeff Turner added a comment - 09/Jun/04 02:54 PM
I'm not sure why ignoring **/*.xml would help? It would break Forrest's own site, because we *want* to link to index.xml. Most users don't link to *.xml, but I'm sure some do; eg. with a subsitemap generating RSS for certain pages.

Nicola Ken Barozzi added a comment - 09/Jun/04 04:01 PM
<jefft>In normal use, why would Cocoon's CLI ever encounter untranslated site: and ext: URLs </jefft>

Good question.

Now it does, as *all* links that pass in any cocoon pipeline are traversed now.
For example, in a single pipeline I get the links from the css in chaperon and then serialize to text; well, these links are traversed.

<jefft> except if the author mistyped a link, or forgot to add a site.xml entry? In that case, it is an error, and the CLI should report it as such instead of quietly ignoring what is a broken link. </jefft>

The link would still be reported as broken IIUC, as this would come out in the translation or when they are outputted already resolved.

Basically, assing an exclude we are doing exactly what the CLI does before, as it does not traverse them. What makes this exclusion different from the previous implicit exclusion?

Nicola Ken Barozzi added a comment - 09/Jun/04 06:54 PM
Now I understand. When a link that is not in site.xml is found, the link is outputted as-is. So we need to have Cocoon traverse *that* link (not the original one in the xml) to spit out the right error.

We have a catch22, as it traverses now both per CLI design, and a simple exclusion cannot discriminate between the two.

What about having the linkmap system change inexistant links in the output? Something like:

  site:xmy-project -> error:site:my-project

In this way we can exclude error:**

Jeff Turner added a comment - 09/Jun/04 09:05 PM
Okay, then I'm lost :) As long as something breaks when I write site:foo and <foo> doesn't exist in site.xml, I'm happy.

Repository Revision Date User Message
ASF #21237 Mon Jun 14 21:42:40 UTC 2004 nicolaken Fix FOR-156, by making the CLI ignore site: and ext: links and in the meantime making the pipeline output these links with error: prepended when they are not resolved properly.
Files Changed
MODIFY /forrest/trunk/src/core/context/faq.xmap
MODIFY /forrest/trunk/src/core/context/sitemap.xmap
MODIFY /forrest/trunk/src/core/context/resources/stylesheets/declare-broken-site-links.xsl
MODIFY /forrest/trunk/src/core/context/WEB-INF/cli.xconf

Nicola Ken Barozzi added a comment - 15/Jun/04 06:42 AM
Should be fixed now, please check.

Nicola Ken Barozzi made changes - 15/Jun/04 06:42 AM
Resolution Fixed
Status Assigned Resolved
David Crossley made changes - 02/May/06 02:06 PM
Link This issue relates to FOR-284 [ FOR-284 ]