<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><id>tag:www.vlent.nl,2010-02-04:/weblog/atom.xml</id><title>Mark van Lent's weblog</title><subtitle>Practicing software development</subtitle><icon>http://www.vlent.nl/static/images/favicon.ico</icon><logo>http://www.vlent.nl/static/images/favicon.ico</logo><updated>2012-08-09T14:05:28Z</updated><link href="http://www.vlent.nl/weblog/atom.xml" rel="self"></link><link href="http://www.vlent.nl/weblog/" rel="alternate"></link><author><name>Mark van Lent</name></author><rights>Creative Commons Attribution 3.0 Unported License</rights><entry><id>tag:www.vlent.nl,2012-08-09:/weblog/2012/08/09/attributeerror-querymethodid-when-creating-object/</id><title>"AttributeError: queryMethodId" when creating an object</title><updated>2012-08-09T14:05:28Z</updated><author><name>Mark van Lent</name></author><category term="development"></category><category term="plone"></category><link href="http://www.vlent.nl/weblog/2012/08/09/attributeerror-querymethodid-when-creating-object/" rel="alternate"></link><content type="html">&lt;div&gt;&lt;strong&gt;&lt;p&gt;While working on a client project, I created an (Archetypes based) content type with a text field. After adding a custom view as the default view, I got an &lt;code&gt;AttributeError&lt;/code&gt; when I tried to add a new object.&amp;nbsp;&lt;/p&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;Some details about the content type:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It includes a &lt;code&gt;TextField&lt;/code&gt; which uses the &lt;code&gt;RichWidget&lt;/code&gt; (read: TinyMCE).&lt;/li&gt;
&lt;li&gt;I changed the &lt;code&gt;default_view&lt;/code&gt; setting from &lt;code&gt;folder_listing&lt;/code&gt; to &lt;code&gt;view&lt;/code&gt; in the Generic Setup configuration file (&lt;code&gt;types/WikiPage.xml&lt;/code&gt; in my case).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Whenever I tried to add a new object, I got the following traceback:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  ...
  Module zope.tal.talinterpreter, line 583, in do_setLocal_tal
  Module zope.tales.tales, line 696, in evaluate
   - URL: file:home/mark/eggs/Products.TinyMCE-1.2.11-py2.6.egg/Products/TinyMCE/skins/tinymce/tinymce_wysiwyg_support.pt
   - Line 6, Column 2
   - Expression: &amp;lt;PathExpr standard:u'object|here'&amp;gt;
   - Names:
      {'container': &amp;lt;PloneSite at /site&amp;gt;,
       ...
       'user': &amp;lt;PropertiedUser 'admin'&amp;gt;}
  Module zope.tales.expressions, line 217, in __call__
  Module Products.PageTemplates.Expressions, line 155, in _eval
  Module Products.PageTemplates.Expressions, line 117, in render
  Module Products.CMFDynamicViewFTI.browserdefault, line 76, in __call__
  Module Products.CMFPlone.PloneFolder, line 122, in __call__
AttributeError: queryMethodId
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If I removed the text field or set the default view back to &lt;code&gt;folder_listing&lt;/code&gt;, the error did not present itself.&lt;/p&gt;
&lt;p&gt;To make a long story short: in the end it appears to be an issue with Products.TinyMCE version 1.2.11. And since that version is included in Plone 4.1.5, I spent quite some time figuring out why my new content type didn't work while a similar content type in an older project&amp;nbsp;did. Figuring I had done something wrong, I did not immediately realise that the older project was using Plone 4.1.4 (and thus an older version of Products.TinyMCE that does &lt;em&gt;not&lt;/em&gt; have this issue)&amp;hellip;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The solution:&lt;/strong&gt; pin Products.TinyMCE to version 1.2.12. Or you could just use Plone 4.1.6 or 4.2, which both include the fixed version by default.&lt;/p&gt;&lt;/div&gt;</content></entry></feed>