Ticket #772 (assigned defect)

Opened 5 years ago

Last modified 4 months ago

Wrong link path in navigation

Reported by: timn Assigned to: cboos (accepted)
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

Change History

10/05/06 14:30:15 changed by cboos

  • status changed from new to assigned.

Thanks, will do.

10/08/06 05:43:34 changed by dirk@users.sf.net

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.

10/10/06 17:47:47 changed by anonymous

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

11/29/06 21:22:46 changed by jose.junior@gmail.com

  • priority changed from normal to high.

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.

07/10/07 08:10:59 changed by c.hoeller@arcor.de

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

(follow-up: ↓ 8 ) 01/31/08 10:12:16 changed 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

01/31/08 10:14:34 changed 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

(Please delete my first entry because of the bad formatting)

(in reply to: ↑ 6 ) 10/12/11 07:41:11 changed by fellan@mgila.com

Replying to 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

Same issues here went looking for remove heavy metals from body


Add/Change #772 (Wrong link path in navigation)




Change Properties
Action