Dear all: Summary: In some cases, the page would be rendered with all links showing some internal meaningless string. Details: Behavior in v 0.10.1 Each chunk (content part) was given a mask as the following: def id @id ||= "#{@content.page_id}n#{@content.chunk_id}" end Where the page_id and chunk_id were defined as positive integers starting from 0. The pattern used for the above is as following: def Abstract::mask_re(chunk_types) tmp = chunk_types.map{|klass| klass.mask_string}.join("|") Regexp.new("chunk([0-9a-f]+n\\d+)(#{tmp})chunk") end Behavior in Instiki-AR: Chunk mask is # should contain only [a-z0-9] def mask @mask ||= "chunk#{self.object_id}#{self.class.mask_string}chunk" end We should note here that the object_id in Ruby can be a positive or NEGATIVE INTEGER. Pattern is def Abstract::mask_re(chunk_types) chunk_classes = chunk_types.map{|klass| klass.mask_string}.join("|") /chunk(\d+)(#{chunk_classes})chunk/ end The above pattern won''t match negative integers and hence the rendering will be left with masks. Fix: The short term fix for this is to change the above pattern to look for negative numbers also #Before \d+ added -* /chunk(-*\d+)(#{chunk_classes})chunk/ PS: 1. It took sometime for me to figure this out because, in Win XP, things were working as object_ids for some reason were always a postive number. In my shared host Linux machine, the number was always negative. 2. For some reason, from here in Bangalore-India, the instiki.org server seems to be down most of the times. It would help if Alex can investigate this. I don''t have this problem with other sites like ROR , etc. I have a very good broadband connection here. Hope this helps in fixing this problem. Cheers, Venkat.
I am a little disappointed with the lack of feedback I am getting from this list. In responding to a call to try out the new AR version, here I went tried it out, troubleshoot a serious bug and even post a fix for it and none of the developers respond with some cursory message. Perhaps they don''t welcome my contribution. On 9/1/05, Venkat elk9r9q02-at-sneakemail.com |instiki-dev| <...> wrote:> Dear all: > > Summary: In some cases, the page would be rendered with all links > showing some internal meaningless string. > > Details: > > Behavior in v 0.10.1 > > Each chunk (content part) was given a mask as the following: > > def id > @id ||= "#{@content.page_id}n#{@content.chunk_id}" > end > > Where the page_id and chunk_id were defined as positive integers > starting from 0. The pattern used for the above is as following: > > def Abstract::mask_re(chunk_types) > tmp = chunk_types.map{|klass| klass.mask_string}.join("|") > Regexp.new("chunk([0-9a-f]+n\\d+)(#{tmp})chunk") > end > > Behavior in Instiki-AR: > > Chunk mask is > > # should contain only [a-z0-9] > def mask > @mask ||= "chunk#{self.object_id}#{self.class.mask_string}chunk" > end > > We should note here that the object_id in Ruby can be a positive or > NEGATIVE INTEGER. > > Pattern is > > def Abstract::mask_re(chunk_types) > chunk_classes = chunk_types.map{|klass| klass.mask_string}.join("|") > /chunk(\d+)(#{chunk_classes})chunk/ > end > > The above pattern won''t match negative integers and hence the > rendering will be left with masks. > > Fix: > > The short term fix for this is to change the above pattern to look for > negative numbers also > > #Before \d+ added -* > /chunk(-*\d+)(#{chunk_classes})chunk/ > > PS: 1. It took sometime for me to figure this out because, in Win XP, > things were working as object_ids for some reason were always a > postive number. In my shared host Linux machine, the number was always > negative. > 2. For some reason, from here in Bangalore-India, the instiki.org > server seems to be down most of the times. It would help if Alex can > investigate this. I don''t have this problem with other sites like ROR > , etc. I have a very good broadband connection here. > > Hope this helps in fixing this problem. > > Cheers, > Venkat. > > _______________________________________________ > Instiki-devel mailing list > Instiki-devel@rubyforge.org > http://rubyforge.org/mailman/listinfo/instiki-devel >
Venkat wrote:>I am a little disappointed with the lack of feedback I am getting from >this list. > >In responding to a call to try out the new AR version, here I went >tried it out, troubleshoot a serious bug and even post a fix for it >and none of the developers respond with some cursory message. > >Perhaps they don''t welcome my contribution. > >Pouring ashes on my head, in shame. I just missed your email. Sorry. Your contribution is certainly very much appreciated, as it saves us from a big embarrassment. Thanks a lot for it. I''ve modified the mask from (-*\d+) to (-?\d+), assuming that there is either no dash or a single dash. Just in case, can you please check out revision 389 or later and confirm that it works on youor PC now? Best regards, Alex