You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by Apache Bloodhound <de...@bloodhound.apache.org> on 2013/07/15 19:09:23 UTC

[Apache Bloodhound] #592: global: TracLinks not pointing at resources in the right product context

#592: global: TracLinks not pointing at resources in the right product context
---------------------+---------------
  Reporter:  olemis  |    Owner:
      Type:  defect  |   Status:  new
  Priority:  major   |  Version:
Resolution:          |
---------------------+---------------
 Recently I've noticed that `global:` TracLinks do not point at the
 resource URL in the right product context when using bootstrap handlers to
 deploy custom URL mappings. E.g. in this page http://dataviz.blood-
 hound.net/wiki/UserDoc/TracLinks `[global:wiki:TracLinks]` is expanded to
 ''http://dataviz.blood-hound.net/wiki/TracLinks'' instead of global URL
 ''http://blood-hound.net/wiki/TracLinks''.

 PS: This is to be working fine for default URL mappings in my local
 working copy.

-- 
Ticket URL: <https://issues.apache.org/bloodhound/ticket/592>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker

Re: [Apache Bloodhound] #592: Incorrect resolution of absolute hrefs

Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#592: Incorrect resolution of absolute hrefs
---------------------------+--------------------------------------
  Reporter:  olemis        |      Owner:  olemis
      Type:  defect        |     Status:  accepted
  Priority:  minor         |  Milestone:  Release 7
 Component:  multiproduct  |    Version:
Resolution:                |   Keywords:  global product TracLinks
---------------------------+--------------------------------------

Comment (by olemis):

 Attached patch will solve this issue by not overriding product's base URL
 with global env's (which is the root cause). Details:

 {{{#!sh

 $ hg qapplied
 t592/t592_r1503620_product_base_url.diff

 $ hg log -r qparent
 changeset:   321:787d3676d947
 tag:         qparent
 tag:         svn-1503620
 user:        astaric@13f79535-47bb-0310-9956-ffa450edef68
 date:        Tue Jul 16 09:00:10 2013 +0000
 summary:     Split a failing unit test, skipping the failing part.

 }}}

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

Re: [Apache Bloodhound] #592: Incorrect resolution of absolute hrefs

Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#592: Incorrect resolution of absolute hrefs
---------------------------+--------------------------------------
  Reporter:  olemis        |      Owner:  rjollos
      Type:  defect        |     Status:  review
  Priority:  minor         |  Milestone:  Release 7
 Component:  multiproduct  |    Version:
Resolution:                |   Keywords:  global product TracLinks
---------------------------+--------------------------------------

Comment (by rjollos):

 Replying to [comment:9 olemis]:
 > Why not to create a ticket in Trac issue tracker and see what other
 trac-devs have to say about your patch ?

 I've done that in t:#11245.

 > I have no major objections as long as test cases will be satisfied.
 Maybe it's a good idea to solve target issue here and create another
 ticket for such refactoring (enhancement) ?

 Sounds good. As for your patch, I think that I understand it now, and
 everything looks good. I would like to break up the unit test case into
 multiple test cases so that we don't have to setup the object state midway
 through the test case (i.e. `self.product_env._abs_href = None` and `del
 self.product_env.abs_href `), but I'll just go ahead and do that and ask
 for your review after it's committed.

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

Re: [Apache Bloodhound] #592: Incorrect resolution of absolute hrefs

Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#592: Incorrect resolution of absolute hrefs
---------------------------+--------------------------------------
  Reporter:  olemis        |      Owner:  rjollos
      Type:  defect        |     Status:  closed
  Priority:  minor         |  Milestone:  Release 7
 Component:  multiproduct  |    Version:
Resolution:  fixed         |   Keywords:  global product TracLinks
---------------------------+--------------------------------------

Comment (by rjollos):

 (In [1504317])

 Fix duplicated test case name. Refs #592.

 Improved test case documentation. Thanks to Olemis for spotting issue with
 test case name duplication.

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

Re: [Apache Bloodhound] #592: Incorrect resolution of absolute hrefs (was: global: TracLinks not pointing at resources in the right product context)

Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#592: Incorrect resolution of absolute hrefs
---------------------------+--------------------------------------
  Reporter:  olemis        |      Owner:  olemis
      Type:  defect        |     Status:  accepted
  Priority:  minor         |  Milestone:  Release 7
 Component:  multiproduct  |    Version:
Resolution:                |   Keywords:  global product TracLinks
---------------------------+--------------------------------------

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

Re: [Apache Bloodhound] #592: Incorrect resolution of absolute hrefs

Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#592: Incorrect resolution of absolute hrefs
---------------------------+--------------------------------------
  Reporter:  olemis        |      Owner:
      Type:  defect        |     Status:  review
  Priority:  minor         |  Milestone:  Release 7
 Component:  multiproduct  |    Version:
Resolution:                |   Keywords:  global product TracLinks
---------------------------+--------------------------------------
Changes (by olemis):

 * owner:  olemis =>
 * status:  accepted => review


Comment:

 Test cases added . Please review

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

Re: [Apache Bloodhound] #592: Incorrect resolution of absolute hrefs

Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#592: Incorrect resolution of absolute hrefs
---------------------------+--------------------------------------
  Reporter:  olemis        |      Owner:  rjollos
      Type:  defect        |     Status:  review
  Priority:  minor         |  Milestone:  Release 7
 Component:  multiproduct  |    Version:
Resolution:                |   Keywords:  global product TracLinks
---------------------------+--------------------------------------

Comment (by olemis):

 Replying to [comment:11 rjollos]:
 > Replying to [comment:9 olemis]:
 > > Why not to create a ticket in Trac issue tracker and see what other
 trac-devs have to say about your patch ?
 >
 > I've done that in t:#11245.
 >
 > > I have no major objections as long as test cases will be satisfied.
 Maybe it's a good idea to solve target issue here and create another
 ticket for such refactoring (enhancement) ?
 >
 > Sounds good. As for your patch, I think that I understand it now, and
 everything looks good. I would like to break up the unit test case into
 multiple test cases so that we don't have to reset the object state midway
 through the test case (i.e. `self.product_env._abs_href = None` and `del
 self.product_env.abs_href `),

 +

 > but I'll just go ahead and do that and ask for your review after it's
 committed.

 +

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

Re: [Apache Bloodhound] #592: global: TracLinks not pointing at resources in the right product context

Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#592: global: TracLinks not pointing at resources in the right product context
---------------------------+--------------------------------------
  Reporter:  olemis        |      Owner:  olemis
      Type:  defect        |     Status:  accepted
  Priority:  major         |  Milestone:  Release 7
 Component:  multiproduct  |    Version:
Resolution:                |   Keywords:  global product TracLinks
---------------------------+--------------------------------------
Description changed by olemis:

Old description:

> Recently I've noticed that `global:` TracLinks do not point at the
> resource URL in the right product context when using bootstrap handlers
> to deploy custom URL mappings. E.g. in this page http://dataviz.blood-
> hound.net/wiki/UserDoc/TracLinks `[global:wiki:TracLinks]` is expanded to
> ''http://dataviz.blood-hound.net/wiki/TracLinks'' instead of global URL
> ''http://blood-hound.net/wiki/TracLinks''.
>
> PS: This is to be working fine for default URL mappings in my local
> working copy.

New description:

 Recently I've noticed that `global:` TracLinks do not point at the
 resource URL in the right product context when using bootstrap handlers to
 deploy custom URL mappings. E.g. in this page http://dataviz.blood-
 hound.net/wiki/UserDoc/TracLinks `[global:wiki:TracLinks]` is expanded to
 ''http://dataviz.blood-hound.net/wiki/TracLinks'' instead of global URL
 ''http://blood-hound.net/wiki/TracLinks''.

 PS: This is working fine for default URL mappings in my local working
 copy.

--

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

Re: [Apache Bloodhound] #592: Incorrect resolution of absolute hrefs

Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#592: Incorrect resolution of absolute hrefs
---------------------------+--------------------------------------
  Reporter:  olemis        |      Owner:  rjollos
      Type:  defect        |     Status:  review
  Priority:  minor         |  Milestone:  Release 7
 Component:  multiproduct  |    Version:
Resolution:                |   Keywords:  global product TracLinks
---------------------------+--------------------------------------

Comment (by rjollos):

 Replying to [comment:9 olemis]:
 > I got the idea you want to express in your comment , however I'm not
 completely sure of all the implications . The duplication of
 ''_base_url''s proposed in the patch is due to the fact that product
 configuration options inherit global values. The issue in situation (2)
 listed in ticket description consists in the fact that if global option is
 set to a given value then DB configuration objects of all other products
 will inherit the very same value unless explicitly updated in a given
 product `base_url` configuration option. That's not a good idea since that
 leads to some of the errors mentioned in #594 . The way to work around
 this consists in reading product option and return its value only if it's
 different to global env's.

 I think we may have gotten crossed here. I'm not suggesting there is
 anything wrong with your patch. I'm only suggesting that the patch touches
 some code that may have a separate issue. In reviewing the code and trying
 to understand everything I found what looks like a "double-caching"
 situation. So the only changes I propose to make (in another ticket), have
 to do with removing the private variables that perform the same caching
 that `lazy` provides. I was hoping you could confirm or deny this based on
 your review of the `href` and `abs_href` functions, and your understanding
 of how `lazy` behaves.

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

Re: [Apache Bloodhound] #592: Incorrect resolution of absolute hrefs

Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#592: Incorrect resolution of absolute hrefs
---------------------------+--------------------------------------
  Reporter:  olemis        |      Owner:  rjollos
      Type:  defect        |     Status:  review
  Priority:  minor         |  Milestone:  Release 7
 Component:  multiproduct  |    Version:
Resolution:                |   Keywords:  global product TracLinks
---------------------------+--------------------------------------

Comment (by rjollos):

 Replying to [comment:11 rjollos]:
 > Replying to [comment:9 olemis]:
 > > Why not to create a ticket in Trac issue tracker and see what other
 trac-devs have to say about your patch ?
 >
 > I've done that in t:#11245.
 >
 > > I have no major objections as long as test cases will be satisfied.
 Maybe it's a good idea to solve target issue here and create another
 ticket for such refactoring (enhancement) ?
 >
 > Sounds good. As for your patch, I think that I understand it now, and
 everything looks good. I would like to break up the unit test case into
 multiple test cases so that we don't have to reset the object state midway
 through the test case (i.e. `self.product_env._abs_href = None` and `del
 self.product_env.abs_href `), but I'll just go ahead and do that and ask
 for your review after it's committed.

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

Re: [Apache Bloodhound] #592: Incorrect resolution of absolute hrefs

Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#592: Incorrect resolution of absolute hrefs
---------------------------+--------------------------------------
  Reporter:  olemis        |      Owner:  rjollos
      Type:  defect        |     Status:  closed
  Priority:  minor         |  Milestone:  Release 7
 Component:  multiproduct  |    Version:
Resolution:  fixed         |   Keywords:  global product TracLinks
---------------------------+--------------------------------------

Comment (by olemis):

 Replying to [comment:17 rjollos]:
 > Olemis: You may want to give the test cases some review, but I didn't
 modify the [attachment:t592_r1503620_product_base_url.diff] before
 committing, only the test cases were modified.

 It seems to me that the last two test cases have the same function name
 but different bodies ? It seems to me the later instance will override the
 former .

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

Re: [Apache Bloodhound] #592: global: TracLinks not pointing at resources in the right product context

Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#592: global: TracLinks not pointing at resources in the right product context
---------------------------+--------------------------------------
  Reporter:  olemis        |      Owner:  olemis
      Type:  defect        |     Status:  accepted
  Priority:  major         |  Milestone:  Release 7
 Component:  multiproduct  |    Version:
Resolution:                |   Keywords:  global product TracLinks
---------------------------+--------------------------------------
Changes (by olemis):

 * status:  new => accepted
 * owner:   => olemis
 * component:   => multiproduct
 * keywords:   => global product TracLinks
 * milestone:   => Release 7


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

Re: [Apache Bloodhound] #592: Incorrect resolution of absolute hrefs

Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#592: Incorrect resolution of absolute hrefs
---------------------------+--------------------------------------
  Reporter:  olemis        |      Owner:  rjollos
      Type:  defect        |     Status:  review
  Priority:  minor         |  Milestone:  Release 7
 Component:  multiproduct  |    Version:
Resolution:                |   Keywords:  global product TracLinks
---------------------------+--------------------------------------

Comment (by rjollos):

 I've been studying the code, and it seems like we've carried over some
 unnecessary code from Trac. To show the simplest example of what I mean,
 in `trac.env.Environment` the
 [http://trac.edgewall.org/browser/tags/trac-1.0.1/trac/env.py?marks=719-723#L718
 href] property is evaluated and cached in the `_href` attribute. This was
 probably implemented when Trac supported Python < 2.4 and decorators were
 not available, so it seems that, now that decorators are available for all
 versions of Python that Trac supports,  we could propose the following
 patch to Trac:

 {{{#!diff
 Index: ../trac/trac/env.py
 ===================================================================
 --- ../trac/trac/env.py (revision 1503481)
 +++ ../trac/trac/env.py (working copy)
 @@ -276,7 +276,6 @@

          self.path = path
          self.systeminfo = []
 -        self._href = self._abs_href = None

          if create:
              self.create(options)
 @@ -717,24 +716,20 @@
              DatabaseManager(self).shutdown()
          return True

 -    @property
 +    @lazy
      def href(self):
          """The application root path"""
 -        if not self._href:
 -            self._href = Href(urlsplit(self.abs_href.base)[2])
 -        return self._href
 +        return Href(urlsplit(self.abs_href.base)[2])

 -    @property
 +    @lazy
      def abs_href(self):
          """The application URL"""
 -        if not self._abs_href:
 -            if not self.base_url:
 -                self.log.warn("base_url option not set in configuration,
 "
 -                              "generated links may be incorrect")
 -                self._abs_href = Href('')
 -            else:
 -                self._abs_href = Href(self.base_url)
 -        return self._abs_href
 +        if not self.base_url:
 +            self.log.warn("base_url option not set in configuration, "
 +                          "generated links may be incorrect")
 +            return Href('')
 +        else:
 +            return Href(self.base_url)


  class EnvironmentSetup(Component):
 }}}

 For `multiproduct.product.ProductEnvironment`, it looks like we've
 replicated the `href` method from `trac.env.Environment`, and replicated
 and then modified the `abs_href` method. In both cases though, the
 `@property` decorator was replaced with `@lazy`. It looks like we are
 "double-cacheing" the value. Looking at the simplest case, we've gone
 from:
 {{{#!python
 @property
 def href(self):
     if not self._href:
         self._href = Href(urlsplit(self.abs_href.base)[2])
     return self._href
 }}}

 to:
 {{{#!python
 @lazy
 def href(self):
     if not self._href:
         self._href = Href(urlsplit(self.abs_href.base)[2])
     return self._href
 }}}

 but we should have eliminated the `_href` variable when replacing
 `property` with `lazy`, resulting in:
 {{{#!python
 @lazy
 def href(self):
     retun Href(urlsplit(self.abs_href.base)[2])
 }}}

 What do you think?

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

Re: [Apache Bloodhound] #592: Incorrect resolution of absolute hrefs

Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#592: Incorrect resolution of absolute hrefs
---------------------------+--------------------------------------
  Reporter:  olemis        |      Owner:  rjollos
      Type:  defect        |     Status:  closed
  Priority:  minor         |  Milestone:  Release 7
 Component:  multiproduct  |    Version:
Resolution:  fixed         |   Keywords:  global product TracLinks
---------------------------+--------------------------------------
Changes (by rjollos):

 * status:  review => closed
 * resolution:   => fixed


Comment:

 Olemis: You may want to give the test cases some review, but I didn't
 modify the [attachment:t592_r1503620_product_base_url.diff] before
 committing, only the test cases were modified.

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

Re: [Apache Bloodhound] #592: Incorrect resolution of absolute hrefs

Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#592: Incorrect resolution of absolute hrefs
---------------------------+--------------------------------------
  Reporter:  olemis        |      Owner:  rjollos
      Type:  defect        |     Status:  review
  Priority:  minor         |  Milestone:  Release 7
 Component:  multiproduct  |    Version:
Resolution:                |   Keywords:  global product TracLinks
---------------------------+--------------------------------------

Old description:

> Recently I've noticed that `global:` TracLinks do not point at the
> resource URL in the right product context when using bootstrap handlers
> to deploy custom URL mappings. E.g. in this page http://dataviz.blood-
> hound.net/wiki/UserDoc/TracLinks `[global:wiki:TracLinks]` is expanded to
> ''http://dataviz.blood-hound.net/wiki/TracLinks'' instead of global URL
> ''http://blood-hound.net/wiki/TracLinks''.
>
> **Update** : After some more testing with sub-domain deployments the
> situation is as follows:
>
>   - If `base_url` option in `[trac]` section of the global env
>     [wiki:TracIni configuration file] is not set then `product:` links
>     will point at the correct URL but `global:` links will not work
>     as expected in product context.
>   - OTOH once `base_url` option in `[trac]` section of the global env
>     [wiki:TracIni configuration file] is set then `product_base_url` in
>     `[multiproduct]` section is ignored and both `product:` and `global:`
> links
>     will not work as expected in any context.
>
> PS: This is working fine for default URL mappings in my local working
> copy.

New description:

 Recently I've noticed that `global:` TracLinks do not point at the
 resource URL in the right product context when using bootstrap handlers to
 deploy custom URL mappings. E.g. in this page http://dataviz.blood-
 hound.net/wiki/UserDoc/TracLinks `[global:wiki:TracLinks]` is expanded to
 ''http://dataviz.blood-hound.net/wiki/TracLinks'' instead of global URL
 ''http://blood-hound.net/wiki/TracLinks''.

 **Update** : After some more testing with sub-domain deployments the
 situation is as follows:

   1. If `base_url` option in `[trac]` section of the global env
      [wiki:TracIni configuration file] is not set then `product:` links
      will point at the correct URL but `global:` links will not work
      as expected in product context.
   2. OTOH once `base_url` option in `[trac]` section of the global env
      [wiki:TracIni configuration file] is set then `product_base_url` in
      `[multiproduct]` section is ignored and both `product:` and `global:`
 links
      will not work as expected in any context.

 PS: This is working fine for default URL mappings in my local working
 copy.

--

Comment (by olemis):

 Replying to [comment:8 rjollos]:
 > I've been studying the code, and it seems like we've carried over some
 unnecessary code from Trac. To show the simplest example of what I mean,
 in `trac.env.Environment` the
 [http://trac.edgewall.org/browser/tags/trac-1.0.1/trac/env.py?marks=719-723#L718
 href] property is evaluated and cached in the `_href` attribute. This was
 probably implemented when Trac supported Python < 2.4 and decorators were
 not available, so it seems that, now that decorators are available for all
 versions of Python that Trac supports,  we could propose the following
 patch to Trac:
 >
 [...]

 Why not to create a ticket in Trac issue tracker and see what other trac-
 devs have to say about your patch ?

 >
 > For `multiproduct.product.ProductEnvironment`, it looks like we've
 replicated the `href` method from `trac.env.Environment`, and replicated
 and then modified the `abs_href` method. In both cases though, the
 `@property` decorator was replaced with `@lazy`.

 I got the idea you want to express in your comment , however I'm not
 completely sure of all the implications . The duplication of
 ''_base_url''s proposed in the patch is due to the fact that product
 configuration options inherit global values. The issue in situation (2)
 listed in ticket description consists in the fact that if global option is
 set to a given value then DB configuration objects of all other products
 will inherit the very same value unless explicitly updated in a given
 product `base_url` configuration option. That's not a good idea since that
 leads to some of the errors mentioned in #594 . The way to work around
 this consists in reading product option and return its value only if it's
 different to global env's.

 > It looks like we are "double-cacheing" the value.
 [...]
 >
 > but we should have eliminated the `_href` variable when replacing
 `property` with `lazy`
 [...]
 >
 > What do you think?

 I have no major objections as long as test cases will be satisfied. Maybe
 it's a good idea to solve target issue here and create another ticket for
 such refactoring (enhancement) ?

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

Re: [Apache Bloodhound] #592: Incorrect resolution of absolute hrefs

Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#592: Incorrect resolution of absolute hrefs
---------------------------+--------------------------------------
  Reporter:  olemis        |      Owner:  rjollos
      Type:  defect        |     Status:  review
  Priority:  minor         |  Milestone:  Release 7
 Component:  multiproduct  |    Version:
Resolution:                |   Keywords:  global product TracLinks
---------------------------+--------------------------------------

Comment (by olemis):

 Replying to [comment:13 rjollos]:
 > Replying to [comment:9 olemis]:
 > > I got the idea you want to express in your comment , however I'm not
 completely sure of all the implications . The duplication of
 ''_base_url''s proposed in the patch is due to the fact that product
 configuration options inherit global values.
 [...]
 >
 > I think we may have gotten crossed here. I'm not suggesting there is
 anything wrong with your patch. I'm only suggesting that the patch touches
 some code that may have a separate issue.

 No problem ... I just tried to say «do not be shy . move on ... but beware
 of regressions» ;)
 I took the chance to explain why a duplicate `_base_url` attribute is
 actually needed beyond double-caching .

 > In reviewing the code and trying to understand everything I found what
 looks like a "double-caching" situation. So the only changes I propose to
 make (in another ticket), have to do with removing the private variables
 that perform the same caching that `lazy` provides. I was hoping you could
 confirm or deny this based on your review of the `href` and `abs_href`
 functions, and your understanding of how `lazy` behaves.

 do not be shy . move on ... but beware of regressions
 :)

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

Re: [Apache Bloodhound] #592: Incorrect resolution of absolute hrefs

Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#592: Incorrect resolution of absolute hrefs
---------------------------+--------------------------------------
  Reporter:  olemis        |      Owner:  rjollos
      Type:  defect        |     Status:  closed
  Priority:  minor         |  Milestone:  Release 7
 Component:  multiproduct  |    Version:
Resolution:  fixed         |   Keywords:  global product TracLinks
---------------------------+--------------------------------------

Comment (by rjollos):

 (In [1504381])

 Merged [1504226] and [1504317] from trunk to 0.6 branch.

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

Re: [Apache Bloodhound] #592: Incorrect resolution of absolute hrefs

Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#592: Incorrect resolution of absolute hrefs
---------------------------+--------------------------------------
  Reporter:  olemis        |      Owner:  rjollos
      Type:  defect        |     Status:  review
  Priority:  minor         |  Milestone:  Release 7
 Component:  multiproduct  |    Version:
Resolution:                |   Keywords:  global product TracLinks
---------------------------+--------------------------------------

Comment (by rjollos):

 (In [1504226])

 Global and product !TracLinks did not resolve correctly for certain
 configurations. Refs #592.

 The `[multiproduct] product_base_url` setting was being ignored when
 `[trac] base_url` was set, and global !TracLinks did not resolve correctly
 when `[trac] base_url` was not set. Patch by Olemis.

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

Re: [Apache Bloodhound] #592: Incorrect resolution of absolute hrefs

Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#592: Incorrect resolution of absolute hrefs
---------------------------+--------------------------------------
  Reporter:  olemis        |      Owner:  rjollos
      Type:  defect        |     Status:  review
  Priority:  minor         |  Milestone:  Release 7
 Component:  multiproduct  |    Version:
Resolution:                |   Keywords:  global product TracLinks
---------------------------+--------------------------------------
Changes (by rjollos):

 * owner:   => rjollos


Comment:

 Replying to [comment:6 olemis]:
 > Test cases added . Please review

 You read my mind!

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

Re: [Apache Bloodhound] #592: global: TracLinks not pointing at resources in the right product context

Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#592: global: TracLinks not pointing at resources in the right product context
---------------------------+--------------------------------------
  Reporter:  olemis        |      Owner:  olemis
      Type:  defect        |     Status:  accepted
  Priority:  minor         |  Milestone:  Release 7
 Component:  multiproduct  |    Version:
Resolution:                |   Keywords:  global product TracLinks
---------------------------+--------------------------------------
Changes (by olemis):

 * priority:  major => minor


Old description:

> Recently I've noticed that `global:` TracLinks do not point at the
> resource URL in the right product context when using bootstrap handlers
> to deploy custom URL mappings. E.g. in this page http://dataviz.blood-
> hound.net/wiki/UserDoc/TracLinks `[global:wiki:TracLinks]` is expanded to
> ''http://dataviz.blood-hound.net/wiki/TracLinks'' instead of global URL
> ''http://blood-hound.net/wiki/TracLinks''.
>
> PS: This is working fine for default URL mappings in my local working
> copy.

New description:

 Recently I've noticed that `global:` TracLinks do not point at the
 resource URL in the right product context when using bootstrap handlers to
 deploy custom URL mappings. E.g. in this page http://dataviz.blood-
 hound.net/wiki/UserDoc/TracLinks `[global:wiki:TracLinks]` is expanded to
 ''http://dataviz.blood-hound.net/wiki/TracLinks'' instead of global URL
 ''http://blood-hound.net/wiki/TracLinks''.

 **Update** : After some more testing with sub-domain deployments the
 situation is as follows:

   - If `base_url` option in `[trac]` section of the global env
     [wiki:TracIni configuration file] is not set then `product:` links
     will point at the correct URL but `global:` links will not work
     as expected in product context.
   - OTOH once `base_url` option in `[trac]` section of the global env
     [wiki:TracIni configuration file] is set then `product_base_url` in
     `[multiproduct]` section is ignored and both `product:` and `global:`
 links
     will not work as expected in any context.

 PS: This is working fine for default URL mappings in my local working
 copy.

--

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

Re: [Apache Bloodhound] #592: Incorrect resolution of absolute hrefs

Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#592: Incorrect resolution of absolute hrefs
---------------------------+--------------------------------------
  Reporter:  olemis        |      Owner:  rjollos
      Type:  defect        |     Status:  review
  Priority:  minor         |  Milestone:  Release 7
 Component:  multiproduct  |    Version:
Resolution:                |   Keywords:  global product TracLinks
---------------------------+--------------------------------------
Description changed by olemis:

Old description:

> Recently I've noticed that `global:` TracLinks do not point at the
> resource URL in the right product context when using bootstrap handlers
> to deploy custom URL mappings. E.g. in this page http://dataviz.blood-
> hound.net/wiki/UserDoc/TracLinks `[global:wiki:TracLinks]` is expanded to
> ''http://dataviz.blood-hound.net/wiki/TracLinks'' instead of global URL
> ''http://blood-hound.net/wiki/TracLinks''.
>
> **Update** : After some more testing with sub-domain deployments the
> situation is as follows:
>
>   1. If `base_url` option in `[trac]` section of the global env
>      [wiki:TracIni configuration file] is not set then `product:` links
>      will point at the correct URL but `global:` links will not work
>      as expected in product context.
>   2. OTOH once `base_url` option in `[trac]` section of the global env
>      [wiki:TracIni configuration file] is set then `product_base_url` in
>      `[multiproduct]` section is ignored and both `product:` and
> `global:` links
>      will not work as expected in any context.
>
> PS: This is working fine for default URL mappings in my local working
> copy.

New description:

 Recently I've noticed that `global:` TracLinks do not point at the
 resource URL in the right product context when using bootstrap handlers to
 deploy custom URL mappings. E.g. in this page http://dataviz.blood-
 hound.net/wiki/UserDoc/TracLinks `[global:wiki:TracLinks]` is expanded to
 ''http://dataviz.blood-hound.net/wiki/TracLinks'' instead of global URL
 ''http://blood-hound.net/wiki/TracLinks''.

 **Update** : After some more testing with sub-domain deployments the
 situation is as follows:

   1. If `base_url` option in `[trac]` section of the global env
      [wiki:TracIni configuration file] is not set then `product:` links
      will point at the correct URL but `global:` links will not work
      as expected in product context.
   2. OTOH once `base_url` option in `[trac]` section of the global env
      [wiki:TracIni configuration file] is set then `product_base_url` in
      `[multiproduct]` section is ignored and both `product:` and `global:`
 links
      will not work as expected in any context.

 PS: ~~This is working fine for default URL mappings in my local working
 copy.~~

--

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