[Zope-CMF] CMFWiki folders invisible

Tres Seaver tseaver@zope.com
Wed, 10 Oct 2001 08:44:09 -0400


Tom Hoffman wrote:

> OK, I know CMFWiki is not officially supported, but perhaps someone can clue 
> me in.  With 2.4.1 and CMF/CVS, I can make individual CMFWiki Pages perfectly 
> well, and CMFWiki site folders work too, aside from the fact that the folder 
> doesn't show up in the "My Stuff" directory view.  It is visible in the ZMI 
> and is accessible.
> 
> Anyone else notice this?


That smells as though the "CMFWikiFolder" type object has the ultra-seekrit
"stealth" feature.  *Checking my sandbox*  Yep, the 'meta_type' of CMFWikiFolder
is not explicitly set, and so the value set in the type object ('CMF Wiki')
doesn't match the object (which has 'Skinned Folder' by inheritance).

Two fixes / workarounds are possible:

   - Change the meta_type field on the type object to 'Skinned Folder';
     this works immediately, with no problems, but is going to break
     after we fix the real bug.

   - Apply the following patch to CMFWiki:

--- CMFWiki/CMFWikiPage.py	7 Aug 2001 22:20:57 -0000	1.15
+++ CMFWiki/CMFWikiPage.py	10 Oct 2001 12:41:21 -0000
@@ -1834,6 +1834,8 @@

  class CMFWikiFolder( SkinnedFolder ):

+    meta_type="CMF Wiki"
+
      def PUT_factory(self, name, typ, body):
          if find(typ, 'text') != -1:
              return makeCMFWikiPage(name, '', body)

      And then arrange to get your CMFWikiFolder instance re-seated in
      its containing folder, so the cached meta_type is updated.  The
      simplest way to do that would be to cut and paste the wiki into
      a new location, and then cut and paste it back.

Sorry for the confusion!

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com