[#1413] Additional Debug Info

[email protected] (Warren H. Holt)
Newsgroups gmane.comp.web.zope.zwiki
Message-ID <20080606110917-0700__37499.2460049272$1212775896$gmane$org@zwiki.org>
<br>
<b>*******</b> 
This is the source of a page that worked properly - like after an upgradeAll
<pre>

            &lt;!-- page name (and parents) --&gt;
            &lt;td class="pagenameand" align="left" width="79%"&gt;
              
                &lt;small&gt;&lt;ul class="aqtree3clickable"&gt;
 &lt;li&gt;&lt;a href="http://10.70.16.41:8080/whhwk/WarrensWorkZWikiSite" name="Warren%27s%20Work%20ZWiki%20Site"&gt;Warren's Work ZWiki Site&lt;/a&gt;
&lt;ul&gt;
 &lt;li&gt;&lt;big&gt;&lt;big&gt;&lt;big&gt;&lt;big&gt;&lt;strong&gt;&lt;a href="http://10.70.16.41:8080/whhwk/FunnyStuff/backlinks" title="which pages link to this one ?" name="Funny Stuff"&gt;Funny Stuff&lt;/a&gt;&lt;/strong&gt;&lt;/big&gt;&lt;/big&gt;&lt;/big&gt;&lt;/big&gt;&lt;/li&gt;
&lt;/ul&gt;
 &lt;/li&gt;
&lt;/ul&gt;

&lt;/small&gt;
</pre>

<b>*******</b> 
This is the source of a page that was not working properly - caused by a rename
<pre>

            &lt;!-- page name (and parents) --&gt;
            &lt;td class="pagenameand" align="left" width="79%"&gt;
              
                &lt;small&gt;&lt;ul class="aqtree3clickable"&gt;
 &lt;li&gt;&lt;big&gt;&lt;big&gt;&lt;big&gt;&lt;big&gt;&lt;strong&gt;&lt;a href="http://10.70.16.41:8080/whhwk_a/FunnyStuff/backlinks" title="which pages link to this one ?" name="Funny Stuff"&gt;Funny Stuff&lt;/a&gt;&lt;/strong&gt;&lt;/big&gt;&lt;/big&gt;&lt;/big&gt;&lt;/big&gt; ...
 &lt;/li&gt;
&lt;/ul&gt;
&lt;/small&gt;

</pre>

<b>*******</b> 
What I noticed... <br>
The function 'context' in !OutlineSupport.py is responsible for the above <br>
I noticed the second source snippit was ending with ' ...' (space and three dots)<br>
The code responsible for this is in 'renderNesting'. <br>

Here is a snippet from 'renderNesting'...

<pre>
  for n in nesting:
      if type(n) == ListType:
          if not (n[0]==here and suppress_current): #XXX temp
              got.append('%s &lt;li&gt;%s' % (indent,renderContentsLink(n[0])))
          if len(n) &gt; 1:
              if not (n[0]==here and suppress_current): #XXX temp
                  got.append('&lt;ul&gt;')
              for i in n[1:]:
                  if type(i) == ListType:
                      got = self.renderNesting(
                          [i],
                          here=here,
                          enlarge_current=enlarge_current,
                          suppress_hyperlink=suppress_hyperlink,
                          suppress_current=suppress_current,
                          did=did,
                          got=got,
                          indent=indent+' ')
                  else:
                      got.append('%s &lt;li&gt;%s&lt;/li&gt;' % (indent,renderContentsLink(i)))
              if not (n[0]==here and suppress_current): #XXX temp
                  got.append("&lt;/ul&gt;")
          else:
              got[-1] += ' ...' # a parent whose children were omitted
          if not (n[0]==here and suppress_current):
              got.append('%s &lt;/li&gt;' % indent)
      else:
          got.append('%s &lt;li&gt;%s&lt;/li&gt;' % (indent,renderContentsLink(n)))

</pre>

<big><b>So...</b></big><br>
  The type passes the !ListType test but has a length equal to 1 <br>
  This suggests there is a single character put into the list by a rename (or other action) <br>
  <br>


--
forwarded from http://zwiki.org/1413ZwikiOrgContentsHaveDisappearedAgain#[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.