#594: TracError: KeyError: 'SCRIPT_NAME'
---------------------------+-------------------------
  Reporter:  tim           |      Owner:  olemis
      Type:  defect        |     Status:  accepted
  Priority:  critical      |  Milestone:  Release 7
 Component:  multiproduct  |    Version:
Resolution:                |   Keywords:  wsgi, hooks
---------------------------+-------------------------

Comment (by tim):

 I generated a new trac environment with {{{./trac-admin boo initenv}}} to
 get a new trac.ini file with the default settings.  In my old trac.ini
 file I have {{{[ticket] default_product = Default}}} but the newly
 generated one has no {{{default_product}}} setting.  This seems to be
 similar to #568.

 {{{[multiproduct]}}} doesn't seem to have any settings in either my old
 trac.ini or the newly generated one.  Should that be manually set or does
 it have a reasonable default?

 I do have {{{[trac] base_url}}} set to something like
 {{{http://example.com/}}}  (ie full URL to the root directory).  Is this
 wrong?  I removed it and my ticket urls listed on "/dashboard" seem to
 have the proper product urls in them.


 I think I may have found something useful:

 I noticed that I have the following settings under {{{[trac]}}} that have
 nothing in the freshly generated trac.ini:

 {{{
 environment_factory = /sites/apache-
 bloodhound-0.6/installer/bloodhound/lib/python2.7/site-
 packages/multiproduct/hooks.py
 request_factory = /sites/apache-
 bloodhound-0.6/installer/bloodhound/lib/python2.7/site-
 packages/multiproduct/hooks.py
 }}}

 I tried running without those lines and when I try viewing a ticket I am
 told "Unable to render product page. Wrong setup?".  I then re-added those
 lines and when I try to view a ticket I'm told {{{TracError: KeyError:
 'SCRIPT_NAME'}}}.  I checked and that file does exist at that location.


 
[https://issues.apache.org/bloodhound/attachment/ticket/594/t594_r1503620_hooks_safe_script_name.diff
 Your patch] seems to have fixed the issue as long as I have the
 {{{environment_factory}}} and {{{request_factory}}} settings in the
 trac.ini

-- 
Ticket URL: <https://issues.apache.org/bloodhound/ticket/594#comment:11>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker

Reply via email to