Relative links not working in documents

Bug #100914 reported by Christian Zagrodnick
20
Affects Status Importance Assigned to Milestone
Silva
Fix Released
High
Joachim Scmitz

Bug Description

((click this link|edit))).

Tags: silva-0.9.3
Revision history for this message
Christian Zagrodnick (zagy) wrote :

sorry, wrong key pressed :)

((click this link|edit)) does't work in a document. This is from Silva's default
document which is created on setting up a new silva root. The link beeing
rendered just points to the silva root.

i.e. http://foo.bar/mysilvaroot instead of http://foo.bar/mysilvaroot/edit

Revision history for this message
Clemens Robbenhaar (crobbenhaar) wrote :

Huh, too bad ... the following code:

                    try:
                        obj = self.restrictedTraverse(splitpath)
                        path = obj.absolute_url()
                    except (KeyError, AttributeError), err:
                        pass

looks up the "edit" attribute, and then acquires the "absolute_url"
from the underlying content object, as the "edit" attribute does not
define an "absolute_url by itself ...

Revision history for this message
Clemens Robbenhaar (crobbenhaar) wrote :

Er, I should maybe add:

the code snippet is from the EditorSupport.render_text_as_html

Revision history for this message
Christian Zagrodnick (zagy) wrote :

yes indeed. I will just have a look at it.

Revision history for this message
Christian Zagrodnick (zagy) wrote :

fix is checked in

Revision history for this message
Joachim Scmitz (js-aixtraware) wrote :

inserted:

((click this link|edit)) in document testDoc in a publication testPub
which generates the link .../TestPub/edit i.e. when I click I get to the content
view of the containing Publication.

I assume that is the intended behavior. --> resolved

Revision history for this message
Christian Zagrodnick (zagy) wrote :

Yes it is. To make it clear to others listening:

Relative links are always relative to the current container. You have this for
files in your file system, and for links in HTML. Even though document in silva
are containers of some sort (containig versions, edit pages, �) they're just
documents and thus no containers to the �outer world�

Revision history for this message
Kit Blake (kitblake) wrote :

zagy: was this backported to 092?

Revision history for this message
Kit Blake (kitblake) wrote :

zagy: nevermind, I realized it's in EditorSupport.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.