#2 — Breaks cloning of content types through portal_types

by Winn King last modified Apr 10, 2012 09:27 PM
State Unconfirmed
Version:
Area Process
Issue type Bug
Severity Medium
Submitted by Winn King
Submitted on Jan 30, 2011
Responsible
Target release:
After this product is installed , you and not longer successfully clone content types through the ZMI. The clone is created but you cannot create an instance of it in the plone site.
Steps to reproduce:
1. Install quintagroup.pfg.captcha
2. Go to portal_types in the ZMI.
3. Copy Folder content type and Paste.
4. Now you have a new content type called copy_of_Folder
5. In plone, try to add an instance of this content type.

Traceback (innermost last):
  Module ZPublisher.Publish, line 127, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 47, in call_object
  Module Products.CMFFormController.FSControllerPythonScript, line 107, in __call__
  Module Products.CMFFormController.ControllerBase, line 228, in getNext
ValueError: No next action found for createObject.success.copy_of_Folder.None
Added by Peer on Apr 10, 2012 03:18 PM
I seem to have solved it in my installation. I had some error on another object.

Problem with quintagroup.pfg.captcha is that a range of content types for PloneFormGen are not shown anymore when installing the product.

This is caused by a missing purge="False" attribute for element property.

The OLD line was:
<property name="allowed_content_types">

The NEW line is:
<property name="allowed_content_types" purge="False">

When the purge attribute is added and it is set to "False", you make sure not to override other profile settings.

I changed this file and reinstalled the product.

/usr/local/Plone/buildout-cache/eggs/quintagroup.pfg.captcha-1.0.4-py2.6.egg/quintagroup/pfg/captcha/profiles/default/types/FormFolder.xml



<?xml version="1.0"?>
<object name="FormFolder" meta_type="Factory-based Type Information"
        xmlns:i18n="http://xml.zope.org/namespaces/i18n">
    <property name="allowed_content_types" purge="False">
        <element value="Document" />
        <element value="FieldsetFolder" />
        <element value="FormBooleanField" />
        <element value="FormCustomScriptAdapter" />
        <element value="FormDateField" />
        <element value="FormFileField" />
        <element value="FormFixedPointField" />
        <element value="FormIntegerField" />
        <element value="FormLabelField" />
        <element value="FormLinesField" />
        <element value="FormMailerAdapter" />
        <element value="FormMultiSelectionField" />
        <element value="FormPasswordField" />
        <element value="FormRichLabelField" />
        <element value="FormRichTextField" />
        <element value="FormSaveDataAdapter" />
        <element value="FormSelectionField" />
        <element value="FormStringField" />
        <element value="FormTextField" />
        <element value="FormThanksPage" />
        <element value="Image" />
        <element value="CaptchaField" />
    </property>
</object>
Added by Peer on Apr 10, 2012 03:32 PM
I am sorry. The solution above solves only a part of my problem, It displays other content types which I can add to the existing! form. But it still breaks when i created a new folder with a new PloneFormGen (all default settings used). When I tried to add the Captcha Field to this new created form this error occurs:



Traceback (innermost last):
  Module ZPublisher.Publish, line 127, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 47, in call_object
  Module Products.CMFFormController.FSControllerPythonScript, line 107, in __call__
  Module Products.CMFFormController.ControllerBase, line 228, in getNext
ValueError: No next action found for createObject.success.SQLPFGAdapter.None
Metadata actions:


ZMI actions:
Added by Peer on Apr 10, 2012 03:47 PM
I am a little bit lost. I retried again with a new Folder, new Form Folder, CaptchaField and more. It works now.
Maybe someone else may try the change that I applied as well to confirm this solution.
Added by Peer on Apr 10, 2012 04:14 PM
The most likely reason that it worked was probably the fact that I deleted first all CaptchaField entries on the existing (ploneFormGen) FormFolders that I had in my Plone instance, before I created the Folder, new Form Folder, CaptchaField and more as stated above.
Added by Peer on Apr 10, 2012 09:27 PM
Combining quintagroup.pfg.captcha (CaptchaField) + Products.sqlpfgadapter (SQL data adapter) does not work, then it breaks:

ValueError: No next action found for createObject.success.SQLPFGAdapter.None
Metadata actions:


ZMI actions:

Combining quintagroup.pfg.captcha (CaptchaField) + collective.pfg.sqlformadapter (encryptedSQL data adapter) does work for me, then it does not break.

Solution: uninstall quintagroup.pfg.captcha
     use: install collective.recaptcha

It is a pity as collective.recaptcha requires a direct connection and registration keys. But it works and then you can use all SQL adapters mentioned above in this block.

Strange behavior which is difficult to debug.

No responses can be added.