Modify

Opened 17 years ago

Closed 8 years ago

#772 closed defect (fixed)

Wrong link path in navigation

Reported by: timn Owned by: Christian Boos
Priority: high Component: DoxygenPlugin
Severity: major Keywords:
Cc: Trac Release: 0.10

Description

The link in the navigation goes to "doxygen". So following this link it will take you to something like http://server/trac/doxygen. On this the relative links in the Trac navigation (for instance to classes.html) will point to a non-existent path. The problem is the following code in source:doxygenplugin/0.10/doxygentrac/doxygentrac.py?rev=1251, line 86-90:

    def get_navigation_items(self, req):
        if req.perm.has_permission('DOXYGEN_VIEW'):
            # Return mainnav buttons.
            yield 'mainnav', 'doxygen', html.a(self.title,
                                               href=req.href.doxygen())

This will create a relative link to doxygen. Similar to the code in 0.9 this should read:

    def get_navigation_items(self, req):
        if req.perm.has_permission('DOXYGEN_VIEW'):
            # Return mainnav buttons.
            yield 'mainnav', 'doxygen', html.a(self.title,
                                               href=req.href.doxygen() + '/')

Note the additional + '/'. This will create a link to http://server/trac/doxygen/ and relative links will work just fine.

Attachments (0)

Change History (7)

comment:1 Changed 17 years ago by Christian Boos

Status: newassigned

Thanks, will do.

comment:2 Changed 17 years ago by dirk@…

I have the same problem, but the above solution doesn't work for me.

The problem (at least to my Trac-newbie eyes) seems to be that for the main index action without wiki_index the plugin just returns the text of the index page, but for the client the URL is ".../trac/doxygen", so relative links don't work. The fix above won't help with that either, AFAICS, as the necessary base path is ".../trac/doxygen/html/", not ".../trac/doxygen/".

I kludged it by using a redirect instead, i.e. instead of setting path I do a

# use configured Doxygen index
req.redirect(os.path.join('trac', 'doxygen', self.default_doc,
                          self.html_output, self.index))

Not very elegant, but it works, at least for me.

comment:3 Changed 17 years ago by anonymous

i'm only have to say that the patch adding a +"/" work good to me.

comment:4 Changed 17 years ago by jose.junior@…

Priority: normalhigh

as this guy the URL of the main page when clicking on the navbar button is wrong, it doesn't include the 'html output' part.

The solution he gave is not ok here because I have multiple environments.

comment:5 Changed 17 years ago by c.hoeller@…

Hi,

anyhow all these solutions don't work for me - I have multiple Project, and my documentations are in /home/httpdroot/doxygen/MyProjectName/ Sadly I'm a total Python-Fool, but to me it seems, that, with this bug, the plugin is useless for me... Can you tell me, when you are planing to fix the bug?

Greetings Christoph

comment:6 Changed 16 years ago by fmos

Hi, I also had issues with the location of the class documentation

(Doxyfile is in /home/rave/public_html/doxygen)

Changing the suggested

path = /home/rave/public_html/doxygen
html_output = html

to

path = /hepforge/home/rave/public_html/doxygen/html
html_output =

made everything working.

Cheers, Fabian

comment:7 Changed 8 years ago by Committo-Ergo-Sum

Resolution: fixed
Status: assignedclosed

In 15358:

DoxygenPlugin: new implementation of IRequestHandler methods. In particular, the "path" parameter in the query-string is droped. This fixes #772 #951 #962 #1564 and #2702 who complain about the security vulnerability it may contain, and other wrong path generations.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.