Ticket #28 (closed Bug)

Opened 3 years ago

Last modified 3 years ago

Include in htmlarea with wrong syntax possible

Reported by: jh@… Owned by:
Priority: Major Milestone:
Component: Version: intern - 1.0
Keywords: Cc:

Description

[jira2trac import : issue created on August 31, 2004 6:40:54 AM CEST http://issues.cocoondev.org/browse/DSY-28 ]

When in editing mode, add special text "Include" to htmlarea.
Normally an include should take a value (eg "daisy:4") but it's possible to enter a random value.

When saving the document, no error or warning is given but when the document is retreived, an error page pops up. There's no way to alter that page if it was a new document.

If it's a newer version of the document the error can be "fixed" by manually(typing in url) going to a previous version, publish that version and altering it correctly.

Change History

comment:1 Changed 3 years ago by paul

  • Status changed from new to closed

[jira2trac import : comment created by bruno on August 31, 2004 6:55:00 AM CEST]

Known issue, but solution is somewhat harder.

What happens is that non-"daisy:" links get translated to "cinclude" instructions to be processed by cocoon's cinclude transformer. This allows to embed the content of http: or cocoon: pipelines inside a page, to integrate external content. When the resolving of the URL fails, the cinclude transformer throws an exception, which is what you see.

The cinlude transformer supports an ignoreErrors attribute, but that is not relevant here as this only applies for errors occuring during parsing, not those during resolving the URI. Also, this leaves no trail whatsoever in the final document, leaving the user unaware of the failed include.

Solution is probably to write a supersimple include transformer ourselves (really a no-brainer) which has an appropriate error handling.

Note: See TracTickets for help on using tickets.