Ticket #8876 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Can't create Catalogs/Test cases when trac runs from site root

Reported by: david.killick@wcn.co.uk Assigned to: seccanj
Priority: normal Component: TestManagerForTracPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

In our trac installation, trac is installed at the root of our server.

The call to 'ref.href()' on line 564 of wiki.py used to set the baseLocation javascript var returns '/'.

When this is used throughout testmanager.js, it creates URIs with double leading /'s, such as //testcreate?... . This causes the browser to make requests to a non-existent host.

Attachments

wiki.py (28.8 kB) - added by seccanj on 06/14/11 11:54:54.

Change History

06/09/11 10:57:44 changed by seccanj

Hi David, please, could you explain a littlebit more what you mean by running from the root?

Do you use Apache or tracd, and with which configuration?

I'll take a look at thi asap.

Ciao, Roberto

06/09/11 12:57:05 changed by david.killick@wcn.co.uk

sorry, I should have been clearer - my fault.

we're using Apache 2.2.9 with WSGI 2.5 (both from the packages found in Debian Lenny).

Our Trac is 0.12.2 .

Apache is configured to server the trac URI's from the top level, for example:

server.name/ticket/7366
server.name/wiki/WikiPage
server.name/testcreate

As a temporary workaround, I replaced the call to 'ref.href()' on line 564 in wiki.py with "", which provides access to most of the testmanager functionality on our installation, but this would not make a general solution.

This workaround did not fix the import of test cases from a csv file (though I was able to workaround that with firebug :) ).

Let me know if you need any more info.

06/14/11 11:53:56 changed by seccanj

Hi David, I think I found a simple fix to this.

Could you try to build the attached modified wiki.py and replace the Test Manager plugin in your environment?

Let me know.

Ciao, Roberto

06/14/11 11:54:54 changed by seccanj

  • attachment wiki.py added.

06/15/11 17:59:34 changed by david.killick@wcn.co.uk

Works nicely.

Looking at the markup, the import of test cases appears to be fixed too - though I don't currently have anything to upload to prove it.

IMHO this issue is fixed, and the ticket can be closed.

Thanks for sorting it out, much appreciated.

06/16/11 12:09:13 changed by seccanj

  • status changed from new to closed.
  • resolution set to fixed.

No problem, David.

I'll release this fix in 1.4.6 asap.

Feel free to propose any idea for this plugin you can think of :D

Ciao, Roberto

06/18/11 17:11:08 changed by seccanj

Released in 1.4.6.


Add/Change #8876 (Can't create Catalogs/Test cases when trac runs from site root)




Change Properties
Action