[Zope-CMF] BlogFace and CVS CMF
Tres Seaver
tseaver@zope.com
01 May 2002 11:31:52 -0400
--=-z7LyCslulidPeOXbCl/y
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
On Wed, 2002-05-01 at 01:59, J C Lawrence wrote:
>
> I'm attempting to use BlogFace 0.3b with CVS CMF but run into problems
> every time I use the portal)catalog from my CMF portal instead of
> BlogFace's internal ZCatalog:
>
> Traceback (innermost last):
> File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 150, in publish_module
> File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 114, in publish
> File /usr/lib/zope/lib/python/Zope/__init__.py, line 159, in zpublisher_exception_hook
> (Object: testblogface)
> File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 98, in publish
> File /usr/lib/zope/lib/python/ZPublisher/mapply.py, line 88, in mapply
> (Object: index_html)
> File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 39, in call_object
> (Object: index_html)
> File /usr/lib/zope/lib/python/Products/BlogFace/BlogFace.py, line 309, in index_html
> (Object: testblogface)
> File /usr/lib/zope/lib/python/Shared/DC/Scripts/Bindings.py, line 252, in __call__
> (Object: index_htmlPage)
> File /usr/lib/zope/lib/python/Shared/DC/Scripts/Bindings.py, line 283, in _bindAndExec
> (Object: index_htmlPage)
> File /usr/lib/zope/lib/python/App/special_dtml.py, line 172, in _exec
> (Object: index_htmlPage)
> File /usr/lib/zope/lib/python/Shared/DC/Scripts/Bindings.py, line 266, in __render_with_namespace__
> (Object: entries)
> File /usr/lib/zope/lib/python/Shared/DC/Scripts/Bindings.py, line 283, in _bindAndExec
> (Object: entries)
> File /usr/lib/zope/lib/python/App/special_dtml.py, line 172, in _exec
> (Object: entries)
> File /usr/lib/zope/lib/python/DocumentTemplate/DT_In.py, line 695, in renderwob
> (Object: entryList)
> File /usr/lib/zope/lib/python/DocumentTemplate/DT_Var.py, line 211, in render
> (Object: document_src)
> KeyError: document_src
>
> Which is not making a whole lot of sense to me (I'm fairly Zope-new).
> Any ideas or clues?
>
> BlogFace: http://www.zope.org/Members/karl/BlogFace/BlogFace
Blogface doesn't quite play nice with stock CMF catalogs: it assumes
the existence of a metadata column, 'document_src', which isn't present
by default. I have a patch for this, along with one to make customizing
the filesystem-based views easier (see attachment).
Tres.
--
===============================================================
Tres Seaver tseaver@zope.com
Zope Corporation "Zope Dealers" http://www.zope.com
--=-z7LyCslulidPeOXbCl/y
Content-Disposition: attachment; filename=BlogFace.diff
Content-Transfer-Encoding: quoted-printable
Content-Type: text/x-patch; name=BlogFace.diff; charset=ISO-8859-1
diff -r -u BlogFace/BlogFace.py BlogFace-modified/BlogFace.py
--- BlogFace/BlogFace.py Tue Dec 4 00:15:33 2001
+++ BlogFace-modified/BlogFace.py Wed May 1 11:13:55 2002
@@ -316,17 +316,22 @@
return self.searchForward(date, params)[0:10] #XXX hardcoded#
=20
index_htmlPage =3D Globals.DTMLFile('dtml/index', globals())
+ index_htmlPage.__replaceable__ =3D Globals.REPLACEABLE
=20
security.declarePublic('entries')
entries =3D Globals.DTMLFile('dtml/entries', globals())
+ entries.__replaceable__ =3D Globals.REPLACEABLE
=20
security.declarePublic('blogCalendar')
blogCalendar =3D Globals.DTMLFile('dtml/blogCalendar', globals())
+ blogCalendar.__replaceable__ =3D Globals.REPLACEABLE
=20
security.declarePublic('URLFmtError')
URLFmtError =3D Globals.DTMLFile('dtml/URLFmtError', globals())
+ URLFmtError.__replaceable__ =3D Globals.REPLACEABLE
=20
security.declarePublic('rss')
rss =3D Globals.DTMLFile('dtml/rss', globals())
+ rss.__replaceable__ =3D Globals.REPLACEABLE
=20
InitializeClass(BlogFace)
diff -r -u BlogFace/dtml/entries.dtml BlogFace-modified/dtml/entries.dtml
--- BlogFace/dtml/entries.dtml Fri Nov 30 20:08:38 2001
+++ BlogFace-modified/dtml/entries.dtml Wed May 1 11:16:40 2002
@@ -63,8 +63,10 @@
your entry type.
</dtml-comment>
=20
+<dtml-if document_src>
<dtml-var document_src fmt=3Dstructured-text>
<!--dtml-var Description fmt=3Dstructured-text-->
+</dtml-if>
=20
</dtml-in>
=20
--=-z7LyCslulidPeOXbCl/y--