Giter Club home page Giter Club logo

products.ploneformgen's Introduction

Introduction

This package provides a generic Plone form generator. Use it to build simple, one-of-a-kind, web forms that save or mail form input.

Repository for this add on is at https://github.com/smcmahon/Products.PloneFormGen. A documentation area is at http://docs.plone.org/working-with-content/managing-content/ploneformgen/ and an issue tracker at https://github.com/smcmahon/Products.PloneFormGen/issues

Please use the Plone forum at https://community.plone.org for support requests. If you are unable to get your questions answered there, or are interested in helping develop the product, contact Steve McMahon: [email protected].

Travis CI badge; if you break it, you fix it.

1.8 Notes

PFG 1.8 is intended for use with Plone 5+. If you're using Plone 4.1.x-4.3.x, choose PFG 1.7.x. PFG 1.6.x targets Plone < 4.1.

collective.js.jqueryui is no longer required. If you've migrated from Plone 4.x and no other package is using it, you may uninstall it.

Known Issues

  • Export/Import is not yet working;
  • The ReCAPTCHA config form is primitive.

Overview

PloneFormGen is a generic Plone form generator using fields, widgets and validators from Archetypes. Use it to build simple, one-of-a-kind, web forms that save or mail form input.

To build a web form, create a form folder, then add form fields as contents. Individual fields can display and validate themselves for testing purposes. The form folder creates a form from all the contained field content objects.

Final disposition of form input is handled via plug-in action products. Action adapters included with this release include a mailer, a save-data adapter that saves input in tab-separated format for later download, and a custom-script adapter that makes it possible to script simple actions without recourse to the Zope Management Interface.

To make it easy to get started, newly created form folders are pre-populated to act as a simple e-mail response form.

Dependencies

Plone: Plone 5.0b2+

Requires PythonField, TALESField and TemplateFields from Jens W. Klein's ScriptableFields bundle: http://plone.org/products/scriptablefields/ (automatically loaded if you install via Python package).

Encryption of e-mail requires the Gnu Privacy Guard, GnuPG, also known as gpg. See README_GPG.txt for details.

CAPTCHA support requires either collective.captcha or collective.recaptcha. See README_CAPTCHA.txt for details.

Installation

  • Just add Products.PloneFormGen to the eggs section of your buildout configuration and run buildout.
  • Restart Zope.
  • Go to the Site Setup page in the Plone interface and click on the Add/Remove Products link. Choose PloneFormGen (check its checkbox) and click the Install button. If PloneFormGen is not available on the Add/Remove Products list, it usually means that the product did not load due to missing prerequisites.
  • If necessary, use the PloneFormGen configlet in the "Add-on Product Configuration" section of Site Setup to customize the product for your site.

Permissions

Site managers may control the visibility and availability of many PloneFormGen functions by changing permissions for user roles. A control panel configlet controls role/permission associations for the portal root. For an explanation of how PloneFormGen permissions map to form folder and form field fields, see improvement proposal #3, Provide ways to hide advanced options from classes of users: http://plone.org/products/ploneformgen/roadmap/3 .

Security

As shipped, only managers may use TALES expressions to override defaults and validators. You may wish to add additional roles, but keep in mind that this is a potential security risk; it basically gives the same powers as scripting or skin editing.

History

PloneFormGen has been continually updated since Plone 2. The maintainers are proud it's still maintained and reliable, but it should not be used as a good example of a current Plone packages. It contains too many historical layers.

Credits

Archetypes has been ruthlessly mined for concepts and functionality.

Form and field icons are scavenged from Martijn Faassen's Formulator, and were edited only to add transparency to make them look a bit better on the add items menu.

The mail adapter is basically a tailored version of PloneFormMailer, minus the Formulator adapter machinery. Thanks to PloneFormMailer's authors, Jens Klein and Reinout van Rees for this code and for continual assistance since the package's introduction.

Pierre-Yves Landure provided tremendous help with the i18n machinery. Sebastien Douche and Pierre-Yves Landure provided the French translation.

Martin Aspeli's RichDocument has provided an invaluable reference, particularly in how to handle installation and testing issues.

Martin Aspeli, Wichert Akkerman, Eric Steele, Jens Klein and Reinout van Rees all provided valuable early feedback.

Titus Anderson provided the base code for the Ratings-Scale Field. Andreas Jung contributed the record-editing feature for the Save Data adapter.

Fulvio Casali, Alex Tokar, David Glick, Steve McMahon, Jesse Snyder, Michael Dunlap, Paul Bugni, Jon Baldivieso and Andrew Burkhalter all did amazing things at the December 2008 PFG sprint sponsored by OneNW. Special thanks to David, for the CAPTCHA work, and Andrew for export/ import.

Thomas Buchberger provided the initial CAPTCHA field implementation.

Maurits van Rees has been a co-maintainer for the 1.7.x and 1.8.x series. David Glick was co-maintainer for versions 1.2.5 through 1.7.x. Thanks, Maurits and David!

Nenad Mancevic (Manca) added the widget toolbox and dramatically enhanced the quick edit mode for his Google Summer of Code 2010 project. Thanks to Manca and Google!

Alec Mitchell, Nathan Van Gheem and Eric Steele provided vital assistance with the Plone 5 update.

See the CHANGES.txt file for the very long list of people who helped with particular features or bugs.

License

Distributed under the GPL v 2.

See LICENSE.txt and LICENSE.GPL for details.

products.ploneformgen's People

Contributors

alecpm avatar cguardia avatar datakurre avatar davidblewett avatar davisagli avatar ericof avatar erral avatar giacomos avatar gianniftp avatar gotcha avatar hvelarde avatar jfroche avatar keul avatar mauritsvanrees avatar montypie avatar naro avatar pbauer avatar reinhardt avatar rodfersou avatar sgeulette avatar smcmahon avatar thet avatar tkimnguyen avatar tmog avatar tomgross avatar tsimkins avatar vangheem avatar vkarppinen avatar zemm avatar znbn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

products.ploneformgen's Issues

Wrong redirection after deleting a field in QuickEdit

After a field is deleted with "QuickEdit" the editor is redirected to the formfolder view not the "QuickEdit" page again.

Plone 4.2b2, PFG 1.7.1

Steps to reproduce:

  1. Install PFG
  2. Create a FormFolder
  3. Click "QuickEdit"-Tab
  4. Delete a field
  5. Confirm

-> 6. Redirected to form (should be "QuickEdit" again)

NameError: name 'plone_context_state' is not defined

I get this error when I have overridden the value of a field (i.e. String) and I try to view that form object.

I get the error also if i try to view directly a url similar to this:
http://mysite/form1/surname/view

but if I want to edit the field, this url, works:
http://mysite/form1/surname/edit

where form1 is a PFG form and surname is a String Field with the content overridden with "python:'hello' "

I use PFG 1.7a1, ....but I think with 1.7rc1 it would be the same.

Giacomo

email validation text is wrong

Creating an pfg form and an email field with isEmail validation (just like the default form for instance).

Entering something that is not an email ("qwerty") in the email field, the validation text is:

"Validation failed(pfgv_isEmail): 'qwerty' fails tests of pfgv_isEmail"

Plone 4.0.9, site is running english. Products.PloneFormGen = 1.7.0

Plone 3.3 requires collective.js.jqueryui<1.8,<1.8dev

Hi,

Please add a not to the projct page:

"For Plone 3 you need collective.js.jqueryui<1.8,<1.8dev"

I had a bad time installing PloneFormGen for Plone 3.3.

After installing PloneFromGen, the instance crashed with errors in collective.js.jqueryui.

PloneFormGen says to be compatible with Plone 3.3, and mentions collective.js.jqueryui only for Plone 4. http://pypi.python.org/pypi/collective.js.jqueryui talks about Plone 4 only, so there is a discrepancy.

I had to dig deep into the release-notes of collective.js.jqueryui to find that Plone-3-support has been dropped in 1.8.

Regards.

FormselectionField does not listen to the enabled-expression

Tested with PloneFormGen 1.7.0 on Plone 4.1.3

  1. create a PFG-form
  2. add a FormselectionField
  3. try to hide this FormselectionField by setting "python:False" in the enabled-expression
  4. view the form, the FormselectionField is visible, while is should be hidden

Delete Thank-You-adapter + re-adding it triggers traceback

Plone 4.1.3 (4112)
CMF 2.2.4
Zope 2.13.10

Products.PloneFormGen = 1.7.0

Steps:

  1. create a PFG
  2. delete the thank-you-adapter
  3. add a new thank-you-adapter

This results in following traceback:

2011-12-12 14:54:56 ERROR Zope.SiteErrorLog 1323698096.250.907237384857 http://localhost:9090/a1/testform/portal_factory/FormThanksPage/formthankspage.2011-12-12.0961875555/base_edit
Traceback (innermost last):
Module ZPublisher.Publish, line 126, in publish
Module ZPublisher.mapply, line 77, in mapply
Module Products.PDBDebugMode.runcall, line 70, in pdb_runcall
Module ZPublisher.Publish, line 46, in call_object
Module Products.CMFPlone.FactoryTool, line 438, in call
Module Products.CMFPlone.FactoryTool, line 202, in getitem
Module Products.CMFPlone.FactoryTool, line 68, in _createObjectByType
Module Products.CMFCore.TypesTool, line 560, in _constructInstance
Module zope.event, line 31, in notify
Module zope.component.event, line 24, in dispatch
Module zope.component._api, line 136, in subscribers
Module zope.component.registry, line 321, in subscribers
Module zope.interface.adapter, line 585, in subscribers
Module zope.component.event, line 32, in objectEventNotify
Module zope.component._api, line 136, in subscribers
Module zope.component.registry, line 321, in subscribers
Module zope.interface.adapter, line 585, in subscribers
Module plone.app.linkintegrity.handlers, line 82, in modifiedArchetype
Module plone.app.linkintegrity.handlers, line 57, in getObjectsFromLinks
Module plone.app.linkintegrity.handlers, line 34, in findObject
Module OFS.Traversable, line 256, in unrestrictedTraverse

  • traceback_info: ([], '.')
    Module Products.CMFPlone.FactoryTool, line 202, in getitem
    Module Products.CMFPlone.FactoryTool, line 68, in _createObjectByType
    Module Products.CMFCore.TypesTool, line 554, in _constructInstance
    Module Products.PloneFormGen.content.thanksPage, line 4, in addFormThanksPage
    Module OFS.ObjectManager, line 323, in _setObject
    Module Products.CMFCore.PortalFolder, line 313, in _checkId
    Module OFS.ObjectManager, line 98, in checkValidId
    BadRequest: The id "." is invalid because it is not traversable.

BadRequest after adding a new thanks page if link integrity checking is enabled

It would be nice, if someone could confirm this:

  1. enable link integricy checking on your site
  2. add new form folder
  3. add new thanks page onto that folder
  4. get this
Traceback (innermost last):

Module ZPublisher.Publish, line 126, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 46, in call_object
Module Products.CMFPlone.FactoryTool, line 438, in __call__
Module Products.CMFPlone.FactoryTool, line 202, in __getitem__
Module Products.CMFPlone.FactoryTool, line 68, in _createObjectByType
Module Products.CMFCore.TypesTool, line 560, in _constructInstance
Module zope.event, line 31, in notify
Module zope.component.event, line 24, in dispatch
Module zope.component._api, line 136, in subscribers
Module zope.component.registry, line 321, in subscribers
Module zope.interface.adapter, line 585, in subscribers
Module zope.component.event, line 32, in objectEventNotify
Module zope.component._api, line 136, in subscribers
Module zope.component.registry, line 321, in subscribers
Module zope.interface.adapter, line 585, in subscribers
Module plone.app.linkintegrity.handlers, line 83, in modifiedArchetype
Module plone.app.linkintegrity.handlers, line 57, in getObjectsFromLinks
Module plone.app.linkintegrity.handlers, line 34, in findObject
Module OFS.Traversable, line 256, in unrestrictedTraverse
__traceback_info__: ([], '.')
Module Products.CMFPlone.FactoryTool, line 202, in __getitem__
Module Products.CMFPlone.FactoryTool, line 68, in _createObjectByType
Module Products.CMFCore.TypesTool, line 554, in _constructInstance
Module Products.PloneFormGen.content.thanksPage, line 4, in addFormThanksPage
Module OFS.ObjectManager, line 323, in _setObject
Module Products.CMFCore.PortalFolder, line 313, in _checkId
Module OFS.ObjectManager, line 98, in checkValidId
BadRequest: The id "." is invalid because it is not traversable.
  • Products. PloneFormGen == 1.7.0
  • plone.app.linkintegrity == 1.4.4

What happens

  1. plone.app.linkintegrity.handlers.modifiedArchetype gets fired by zope.lifecycleevent.IObjectCreatedEvent for new thanks page still under portal factory
  2. it founds <a title="Test Folder" href=".">visit the form</a> from noSubmitMessage
  3. it tries to traverse . under portal factory
  4. triggering it to try to create a yet another thanks page with id . (and failing)

If this can be confirmed, a quick fix would be to modify the default noSubmitMessage to be linkintegrity-safe, but eventually, I think, this should be fixed in plone.app.linkintegrity (I wonder, why it subscribes IObjectCreatedEvent for Archetypes instead of IObjectInitializedEvent).

Delete field in Quickedit popup causes JS error.

Clicking the delete button on a field in Quickedit give you the popup with two buttons "Do you really want to delete this item? Delete / Cancel"
Clicking the "delete" in the popup causes an JavaScript error on 'athis'.
The popup stays open and nothing seems to have happended, but the field is removed on a reload of the page.

Unauthorized Warning creating new form

I have created a new archetype based on FormFolder; I noticed a strange behavior with fields created in the FormFolder/initializeArchetype method that I customized: every time I get an "Unauthorized" error with fields creation. But every content at the end was correctly created/configured under this form. I noticed that in the moment I get the Unauthorized, the method it's running with Anonymous User.

I have checked this behaviour with original FormFolder code (1.7.6 version, with Plone 4.2) and also here I noticed that during creation, in a given moment this method is running with anonymous user and get this warning:
"User not authorized to create mail adapters. Form Folder created with no action adapter."
But also in this case the mailer adapter was correctly created (and of course here the exception seems handled in some way).
This problem happened to me also with other field types in my custom form.

I think a solution could be the one to check if current user is not the Anonymous one and only in this case execute this code: usually anonymous can't create objects.
But I'm guessing if this could be a problem.

Duplicate Fields

I'm running Plone 4.1, PloneFormGen 1.7.1, Lion 10.7.3, Chrome Version 20.0.1132.57.
When creating a Form Folder and using the quickedit drag and drop feature I ran into problems with duplicate fields.
If I add a field, cancel it, and then add another of the same field which I save, it displays "Unable to load resource: reorderField" and then creates duplicates of the field equal to the amount that I cancelled (if I cancelled 2 before making the 3rd, it gives three copies).

I also had the same bug while using Safari 5.1.5 and Firefox 9.0.1

Querystring is lost after submitting

PFG 1.7.0 on Plone 4.1.10:
I have a form that varies depending on a url-parameter,
but this querystring is lost returning to the form when validation fails

my_form?code=AA
submitting, but with errors
redirects to my_form

Fix in form.py

def fgGetFormSubmitAction(self):
 ...

    action = self.REQUEST.other.get('pfg_form_action')
    if not action:
        action = getattr(self, 'formActionOverride', None)
    if not action:
        if self.REQUEST['QUERY_STRING']:                                                                              # WVH
            action = "%s?%s" % (self.absolute_url(), self.REQUEST['QUERY_STRING'])   # WVH
        else:  #WVH
            action = self.absolute_url()

    ...

FieldSet Folder and questio id

Hi!

if you copy and paste a Fieldset Folder, you can get nasty errors when you try to use the form. That's because the questions get the same id. Being Fieldset Folder a Folder, it does not change the question ids.

This is a problem because when the form renders, multiple inputs get the same id, so validation goes crazy and you can submit any form.

A solution could be to create FieldSet input ids with the fieldset id is prepended. So you get fieldset1_input1 and copy_of_fieldset1_input1. Names will never clash in this way. I don't know if inputs can know if they're on a FiledSet Folder.

DateField, TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'

I'm migrating a site from 3.3.6 to 4.2.4, and they use PFG (1.5.2). I tried using both 1.7.6 and 1.7.7 in the new site, but in both cases, I get this traceback:

...
Module zope.tales.tales, line 696, in evaluate
URL: file:/usr/local/zope/buildout-cache/eggs/Products.CMFPlone-4.2.4-py2.7.egg/Products/CMFPlone/skins/plone_templates/calendar_macros.pt
Line 12, Column 4
Expression: <PythonExpr date_components_support_view.result(inputvalue, 0, starting_year, ending_year, future_years, minute_step)>
Names:
{'container': <PloneSite at /main>,
'context': <FormFolder at /main/meetings/inquiry>,
'default': <object object at 0xb7ed7800>,
'here': <FormFolder at /main/meetings/inquiry>,
'loop': {u'field': <Products.PageTemplates.Expressions.PathIterator object at 0xdd943ac>},
'nothing': None,
'options': {'args': (),
'state': <Products.CMFFormController.ControllerState.ControllerState object at 0xee2f9cc>},
'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0xecfecac>,
'request': <HTTPRequest, URL=http://localhost/main/meetings/inquiry/fg_base_view_p3>,
'root': ,
'template': <FSControllerPageTemplate at /main/fg_base_view_p3 used for /main/meetings/inquiry>,
'traverse_subpath': [],
'user': <PropertiedUser 'xxxx'>}
Module Products.PageTemplates.ZRPythonExpr, line 48, in call
traceback_info: date_components_support_view.result(inputvalue, 0, starting_year, ending_year, future_years, minute_step)
Module PythonExpr, line 1, in
Module plone.app.form.widgets.datecomponents, line 195, in result
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'

I am able to add a new PFG form in this new instance and add a DateField without a problem. Seems like it could be related to the migration.

Field list is empty when we use form as folder default view

1 - i create a Folder named "Folder"
2 - i add FormFolder "inscription" in this "Folder"
3 - i set "inscription" as "Folder" default view.

then, when i clic on "QuickEdit" tab, field list in the right column is empty...

Is this a normal behavior ?
Is there a way to fix that ?

Thanks.

Form Prologue oddity using Firefox

If I:

  1. Create a vanilla Plone 4.0.7 site or 4.1.4 site: no theme package involved

  2. Add Products.PloneFormGen (tested with 1.7.1, 1.7.0 and 1.6.0)

  3. Attempt to add a new form folder (or edit an existing form folder) using Firefox

then the TinyMCE edit widget for "Form Prologue" doesn't function correctly: it remains empty and no text appears if I
type into that box. The HTML button demonstrates that it has actually been updated.

Comments:

  1. The "Form Epilogue" box doesn't have this problem.

  2. Chrome and Safari both work fine.

  3. If I toggle fullscreen mode for the TinyMCE editor then things also start to work with Firefox.

I suspect that this is a bug in TinyMCE (or maybe Firefox) rather than PloneFormGen, but as the Form Prologue box in
PloneFormGen is the only place that we are seeing this problem on our Plone sites at the moment, I thought that I should
start by reporting the problem here. The problem does appear to be simple to reproduce.

Versions of Firefox tested:

Firefox 3.0 on Ubuntu 10.04 LTS (standard Ubuntu package)
Firefox 11.0 on Ubuntu 10.04 (straight from www.mozilla.org)
Firefox 11.0 on MacOS

Selection field layout wrong since upgrade to Plone 4.2.1

Hello, we have upgrade to Plone 4.2.1 with ploneFormGen 1.7.5. Now we see that the layout of the "selection field" in the form changed for the bad.

It used to be good:

Contact (title of the field)
o Option A
o Option B
o Option C
o Option D

It's layout now changed to:

Contact (title of the field) o Option A
o Option B
o Option C
o Option D

So the the layout of this field changed after the upgrade. PloneFormGen 1.7.0 and 1.7.2 have the same issue
with Plone 4.2.1.

Any Ideas ?

When creating more than one LikertField, they will get the same Label (of the last created/update field)

Problem:

  1. Create a FormFolder and add two FormLikertField fields.
  2. The first created field will get the label of the second field
  3. if you update the first field the second field will get the label of the first

Solution:
The problem is because all FormLikertField fields use the same widget instance. It means that self.fgField.widget.label is the same for all FormLikertField instances.

The fix: In Products/PloneFormGen/content/likertField.py we have to replace:

_properties.update({
    'type' : 'likert',
    'widget' : LikertWidget(),
    'answerSet' : (),
    'questionSet' : (),
})

by
_properties.update({
'type' : 'likert',
'widget' : LikertWidget,
'answerSet' : (),
'questionSet' : (),
})

Use the LikertWidget class instead of LikertWidget instance in the widget key.

Toolbox on Quickedit does not work in Chrome (Ubuntu)

Initially the Quickedit Toolbox appears with "Basic Fields" opened. The other sections of the accordion should open if you you click on it. But they don't. (google Chrome 16.0.912.77).

Firefox and Opera works fine.

Thanks page displays fields incorrectly

If you click on Thank You adapter, edit, and then fields, it says:

Check this to display input for all fields (except label and file fields)
It actually shows label and file fields. If I uncheck Show All Fields and select all the fields except label and file fields under Show Responses and click save, it does not save your selections. The result is, no fields are displayed in the Thank You page. If you look at the Show Responses, nothing is selected after you save it.

Ploneformgen 1.6.0

Version Overview

Plone 4.1.4 (4113)

CMF 2.2.5

Zope 2.13.12

Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)]

PIL 1.1.7-enfold2

Joe Bigler

download csv - serverside fields not listed in headers

in saveDataAdapter.py the function getColumnNames() does not return server side fields (even if that data are saved in csv)

I just modifies 3 lines... I send them here, I hope you will find them usefull (and eventually adopt in the project)


method: getColumnNames

old:
def getColumnNames(self):

new:
def getColumnNames(self, excludeServerSide=True):


method: getColumnNames

old:
names = [field.getName() for field in self.fgFields(displayOnly=True)]
new:
names = [field.getName() for field in self.fgFields(displayOnly=True, excludeServerSide=excludeServerSide)]


method: download_csv

old:
res = "%s\n" % delimiter.join( self.getColumnNames() )
new:
res = "%s\n" % delimiter.join( self.getColumnNames(excludeServerSide=False) )


Action adapters order - unexpected behavior

Use case:

Check the email was not used for a previous response (unique emails).

Used fields:

  • String field with email validator
  • Save Data Adapter
  • Mailer Adapter
  • Custom Script Adapter

Expected behavior:

The script adapter checks if the submitted email is already present in the responses, if it is, it returns an error for the email field, nothing gets saved, no emails are sent.

Actual behavior:

When a duplicate email is found, the error is returned but the form is saved in the Save Data Adapter and an email is submitted, regardless of the error.

Cause:

Improper ordering of the Action adapters.

The adapter order appears to be kept in the actionAdapter attribute of the FormFolder. Reordering the adapters using QuickEdit causes the Chrome tab to spike to 100% CPU and stay there. In Firefox a NS_ERROR_XPC_BAD_CONVERT_JS: Could not convert JavaScript argument is raised.

Workaround:

Reordering the Action adapters using the folder_contents page AND submiting the FormFolder/edit page. The order is not taken into consideration unless the edit form is re-submitted.

Experienced on Plone 4.2.1.1 with Products.PloneFormGen 1.7.6

[i18n] The strings defined in config.py do not show up in the .po files

The stringValidators dict in config.py defines a number of strings for the validators. For instance the title "Is an E-Mail Address" and the error message "This is not a valid email address."

As far as I can see, these strings do not appear in the .po files and can thus not be translated.

TypeError: getattr(): attribute name must be string

Create a new Form Folder. Add a Fieldset and add a field (Text Field for example) to it with a Short Name that's already used somewhere in the Plone-site.

Check the form and you'll get the following traceback:

Traceback (innermost last):
  Module ZPublisher.Publish, line 126, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 46, in call_object
  Module Products.CMFFormController.FSControllerPageTemplate, line 91, in __call__
  Module Products.CMFFormController.BaseControllerPageTemplate, line 31, in _call
  Module Shared.DC.Scripts.Bindings, line 322, in __call__
  Module Products.PloneHotfix20121106.python_scripts, line 63, in _patched_bindAndExec
  Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
  Module Products.CMFCore.FSPageTemplate, line 237, in _exec
  Module Products.CMFCore.FSPageTemplate, line 177, in pt_render
  Module Products.PageTemplates.PageTemplate, line 79, in pt_render
  Module zope.pagetemplate.pagetemplate, line 113, in pt_render
   - Warning: Macro expansion failed
   - Warning: <type 'exceptions.KeyError'>: 'macro'
  Module zope.tal.talinterpreter, line 271, in __call__
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 858, in do_defineMacro
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 888, in do_useMacro
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 954, in do_defineSlot
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 858, in do_defineMacro
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 954, in do_defineSlot
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 946, in do_defineSlot
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 858, in do_defineMacro
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 888, in do_useMacro
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 954, in do_defineSlot
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 821, in do_loop_tal
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 852, in do_condition
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 852, in do_condition
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 888, in do_useMacro
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 888, in do_useMacro
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 852, in do_condition
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 852, in do_condition
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 946, in do_defineSlot
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 888, in do_useMacro
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 583, in do_setLocal_tal
  Module zope.tales.tales, line 696, in evaluate
   - URL: file:/data/plone-demo/eggs/Products.Archetypes-1.8-py2.6.egg/Products/Archetypes/skins/archetypes/widgets/textarea.pt
   - Line 89, Column 6
   - Expression: <PythonExpr request.get(field_text_format, context.getContentType(fieldName))>
   - Names:
      {'container': <FormFolder at /Plone/my-form>,
       'context': <FormFolder at /Plone/my-form>,
       'default': <object object at 0x8016684c0>,
       'here': <FormFolder at /Plone/my-form>,
       'loop': {u'field': <Products.PageTemplates.Expressions.PathIterator object at 0x82141fe10>},
       'nothing': None,
       'options': {'args': (),
                   'state': <Products.CMFFormController.ControllerState.ControllerState object at 0x820661090>},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x82142c470>,
       'request': <HTTPRequest, URL=http://plonedemo.com/my-form/fg_base_view_p3>,
       'root': <Application at >,
       'template': <FSControllerPageTemplate at /Plone/my-form/fg_base_view_p3>,
       'traverse_subpath': [],
       'user': <PropertiedUser 'admin'>}
  Module Products.PageTemplates.ZRPythonExpr, line 48, in __call__
   - __traceback_info__: request.get(field_text_format, context.getContentType(fieldName))
  Module PythonExpr, line 1, in <expression>
  Module Products.Archetypes.BaseObject, line 314, in getContentType
  Module Products.Archetypes.BaseObject, line 311, in getContentType
TypeError: getattr(): attribute name must be string

This happens in Plone 4.1.x and 4.2.x with PloneFormGen 1.7.6

Validation error of isEmail validator is not translated

When the isEmail validator is enabled on a field and the input is not a valid email address, the error message is only partially translated. For example in a Dutch site:

"Validatie mislukt (pfgv_isEmail): 'foo' fails tests of pfgv_isEmail".

The first part ("Validatie mislukt") is Dutch, but the rest obviously is not. In English the error message is as expected by the way ("This is not a valid email address.").

I can see that in content/validationMessages.py the cleanupMessage function tries to transform the unfriendly message in something understandable for the user of the site by using the verrorRE regexp. But that regexp doesn't match the error message since it's already translated partially.

For what it's worth, I did find out that the partial translation happens in Products.validation.validators.RegexValidator where recursiveTranslate is being called.

Missing required indicator in CSS

Default CSS is missing styling that would add a mark showing the element was required. Below is a snippet to use for <span class="required" ...>. File required.png comes with Plone, it's a red square I think.

label.formQuestion span.required { background:url("required.png") no-repeat 0 4px #FFF; }

Test Issue

Testing the issue tracker on github for PFG

Emails using wrong recipient email address

Whenever I try to send an email from Plone using a ploneformgen form, it looks as though is succeeds, but I never receive the email.

In the email server log, the problem seems to be that the recipient address is incomplete - it's the plone admin users name : e.g. bob (no @example.com), rather than the full recipient's email address I specify in the mailer for the form : e.g. [email protected].

Versions used are :

PloneFormGen 1.6.0
Plone 4.0.7
Zope 2.12.18
Python 2.6.5 (r265:79063, Nov 23 2010, 02:02:03) [GCC 4.1.2 20080704 (Red Hat 4.1.2-48)]

Any ideas ?

AttributeError: Macro captchaField_widget does not exist for <FormFolder at online-event-registration>

Unable to view previously created form content on importing zexp into fresh zope instance.

Plone 413 /Products.PloneFormGen = 1.7rc1

Error
Module zope.tales.tales, line 696, in evaluate

  • URL: file:/home/user/plone413/buildout-cache/eggs/Products.PloneFormGen-1.7rc1-py2.6.egg/Products/PloneFormGen/skins/PloneFormGen/fg_edit_macros_p3.pt
  • Line 97, Column 20
  • Expression: <PythonExpr here.widget(field.getName(), mode='edit', field=field)>
  • Names:
    {'container': <FormFolder at /epditemplate/demo-core-products/forms-surveys/online-event-registration>,
    'context': <FormFolder at /epditemplate/demo-core-products/forms-surveys/online-event-registration>,
    'default': <object object at 0xb77977d0>,
    'here': <FormFolder at /epditemplate/demo-core-products/forms-surveys/online-event-registration>,
    'loop': {u'field': <Products.PageTemplates.Expressions.PathIterator object at 0xb40be6ac>},
    'nothing': None,
    'options': {'args': (),
    'state': <Products.CMFFormController.ControllerState.ControllerState object at 0xb40c246c>},
    'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0xb447e93c>,
    'request': <HTTPRequest, URL=http://localhost:8080/epditemplate/demo-core-products/forms-surveys/online-event-registration/fg_base_view_p3>,
    'root': ,
    'template': <FSControllerPageTemplate at /epditemplate/demo-core-products/forms-surveys/online-event-registration/fg_base_view_p3>,
    'traverse_subpath': [],
    'user': <User 'admin'>}
    Module Products.PageTemplates.ZRPythonExpr, line 48, in call
  • traceback_info: here.widget(field.getName(), mode='edit', field=field)
    Module PythonExpr, line 1, in
    Module Products.Archetypes.BaseObject, line 284, in widget
    Module Products.Archetypes.Renderer, line 24, in render
    Module Products.Archetypes.generator.widget, line 145, in call
    AttributeError: Macro captchaField_widget does not exist for

TypeError on multipage forms with empty hidden LinesField

Empty hidden fields on
PloneFormgen multipage forms
(multiple form folders connected via custom success action)
lead to a TypeError

reproduce:

  1. Create a folder with two FromFolders ("a","b").
  2. Both Formfolders contain a single hidden lines field ("testfield").
  3. set Custom success action of "a" to "traverse_to:string:b"
  4. submit form a and you'll get the "TypeError"

Versions:

Plone 4.1.2
Products.PloneFormGen 1.7b6

Traceback:

Traceback (innermost last):
Module ZPublisher.Publish, line 126, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 46, in call_object
Module Products.CMFFormController.FSControllerPageTemplate, line 91, in call
Module Products.CMFFormController.BaseControllerPageTemplate, line 28, in _call
Module Products.CMFFormController.ControllerBase, line 231, in getNext
Module Products.CMFFormController.Actions.TraverseTo, line 38, in call
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 46, in call_object
Module Products.CMFDynamicViewFTI.browserdefault, line 76, in call
Module Products.CMFFormController.FSControllerPageTemplate, line 91, in call
Module Products.CMFFormController.BaseControllerPageTemplate, line 31, in _call
Module Shared.DC.Scripts.Bindings, line 322, in call
Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
Module Products.CMFCore.FSPageTemplate, line 240, in _exec
Module Products.CMFCore.FSPageTemplate, line 180, in pt_render
Module Products.PageTemplates.PageTemplate, line 79, in pt_render
Module zope.pagetemplate.pagetemplate, line 113, in pt_render

  • Warning: Macro expansion failed
  • Warning: <type 'exceptions.KeyError'>: 'macro'
    Module zope.tal.talinterpreter, line 271, in call
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 858, in do_defineMacro
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 888, in do_useMacro
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 954, in do_defineSlot
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 858, in do_defineMacro
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 954, in do_defineSlot
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 946, in do_defineSlot
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 858, in do_defineMacro
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 888, in do_useMacro
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 954, in do_defineSlot
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 821, in do_loop_tal
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 852, in do_condition
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 852, in do_condition
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 888, in do_useMacro
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 888, in do_useMacro
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 852, in do_condition
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 888, in do_useMacro
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 376, in do_startEndTag
    Module zope.tal.talinterpreter, line 405, in do_startTag
    Module zope.tal.talinterpreter, line 482, in attrAction_tal
    Module Products.PageTemplates.Expressions, line 225, in evaluateText
    Module zope.tales.tales, line 696, in evaluate
  • URL: file:/Users/hplocher/develop/cbelt/collective.pfg.challenge/buildout/eggs/Products.Archetypes-1.7.9-py2.6.egg/Products/Archetypes/skins/archetypes/widgets/lines.pt
  • Line 33, Column 6
  • Expression: <PythonExpr '\n'.join(value)>
  • Names:
    {'container': <PloneSite at /Plone>,
    'context': <FormFolder at /Plone/multipage_folder/b used for /Plone/multipage_folder/a>,
    'default': <object object at 0x1002ebaf0>,
    'here': <FormFolder at /Plone/multipage_folder/b used for /Plone/multipage_folder/a>,
    'loop': {u'field': <Products.PageTemplates.Expressions.PathIterator object at 0x10c83c510>},
    'nothing': None,
    'options': {'args': (),
    'state': <Products.CMFFormController.ControllerState.ControllerState object at 0x10b8d8550>},
    'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x10bca6890>,
    'request': <HTTPRequest, URL=http://localhost:8080/Plone/multipage_folder/a/fg_base_view_p3>,
    'root': ,
    'template': <FSControllerPageTemplate at /Plone/fg_base_view_p3 used for /Plone/multipage_folder/b>,
    'traverse_subpath': [],
    'user': <PropertiedUser 'admin'>}
    Module Products.PageTemplates.ZRPythonExpr, line 48, in call
  • traceback_info: '\n'.join(value)
    Module PythonExpr, line 1, in
    TypeError

FormRichLabelField does not have a visual editor

When adding a Rich Label Field (via the "add new" dropdown menu) the label body is shown as a plain text field with text-format html. there is no visual editor.
(i used "add new" to get the edit form in a spearate window because i thought tiny might not work in the quickedit form's overlay)

according to the doucmentation (http://www.hasecke.com/plone-benutzerhandbuch/4.0/erweiterungen/ploneformgen/gliederungselemente.html#formatierter-text) this type of field should render a visual editor in edit mode so users can easily provide images, links within a form...

the visual editor (tiny) works for prologue and epilogue of the form. so it's properly activated for the user.

tested with Products.PloneFormGen 1.7.1 on plone 4.1.5 and 4.2rc1 in firefox 11.0 and chromium 18 on ubuntu

pfg file field causes crash in Plone 4.2.2

A PloneFormGen form that contains file fields to upload files causes this crash when the Plone site is upgraded to 4.2.2:

Traceback (innermost last):
Module ZPublisher.Publish, line 126, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 46, in call_object
Module Products.CMFFormController.FSControllerPageTemplate, line 91, in call
Module Products.CMFFormController.BaseControllerPageTemplate, line 31, in _call
Module Shared.DC.Scripts.Bindings, line 322, in call
Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
Module Products.CMFCore.FSPageTemplate, line 237, in _exec
Module Products.CMFCore.FSPageTemplate, line 177, in pt_render
Module Products.PageTemplates.PageTemplate, line 79, in pt_render
Module zope.pagetemplate.pagetemplate, line 113, in pt_render

  • Warning: Macro expansion failed
  • Warning: <type 'exceptions.KeyError'>: 'macro'
    Module zope.tal.talinterpreter, line 271, in call
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 858, in do_defineMacro
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 888, in do_useMacro
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 954, in do_defineSlot
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 858, in do_defineMacro
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 954, in do_defineSlot
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 946, in do_defineSlot
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 858, in do_defineMacro
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 888, in do_useMacro
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 954, in do_defineSlot
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 821, in do_loop_tal
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 852, in do_condition
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 852, in do_condition
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 888, in do_useMacro
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 888, in do_useMacro
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 852, in do_condition
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 852, in do_condition
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 946, in do_defineSlot
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 888, in do_useMacro
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 888, in do_useMacro
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 583, in do_setLocal_tal
    Module zope.tales.tales, line 696, in evaluate
  • URL: file:/srv/buildout/buildout-cache/eggs/Products.Archetypes-1.8.4-py2.7.egg/Products/Archetypes/skins/archetypes/widgets/file.pt
  • Line 17, Column 8
  • Expression: <PythonExpr context.lookupMime(field.getContentType(here))>
  • Names:
    {'container': <PloneSite at /testportal>,
    'context': <FormFolder at /testportal/formular>,
    'default': <object object at 0xb7ddb7e0>,
    'here': <FormFolder at /testportal/formular>,
    'loop': {u'field': <Products.PageTemplates.Expressions.PathIterator object at 0xd1e150c>},
    'nothing': None,
    'options': {'args': (),
    'state': <Products.CMFFormController.ControllerState.ControllerState object at 0xd159eec>},
    'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0xc1bf1e4>,
    'request': <HTTPRequest, URL=http://www.eehmke.de/formular/fg_base_view_p3>,
    'root': ,
    'template': <FSControllerPageTemplate at /testportal/fg_base_view_p3 used for /testportal/formular>,
    'traverse_subpath': [],
    'user': <PropertiedUser 'admin'>}
    Module Products.PageTemplates.ZRPythonExpr, line 48, in call
  • traceback_info: context.lookupMime(field.getContentType(here))
    Module PythonExpr, line 1, in
    Module Products.Archetypes.Field, line 899, in getContentType
    Module Products.Archetypes.Field, line 1009, in get
    Module Products.Archetypes.Field, line 1083, in _wrapValue
    Module Products.Archetypes.Field, line 1003, in _make_file
    Module OFS.Image, line 139, in init
    Module OFS.Image, line 532, in _read_data
    AttributeError: seek

After reinstallation of Plone 4.2.1 the crash was removed. Installing of Plone 4.2.2 again caused to the crash to reappear. Removal of the file field also removed the problem.

formMailerAdapter.py should quote recipient address

content/formMailerAdapter.py ::

       to = '%s <%s>' %(ownerid,toemail)

should read:

      from email.utils import formataddr
      to = formataddr((ownerid, toemail))

Otherwise ownerid="user@domain" (generated by Products.WebServerAuth and Shibboleth) generates a To: header of:

 To: user@domain <toemaill>

rather than the correct:

 To: "user@domain" <toemaill>

and formMailerAdapter proceeds to send emails to two separate addresses:

 user@domain,  toemaill

user@domain is a Shibboleth ID: there is no guarantee that this is a valid email address.

It might make sense to use userdest.getProperty('fullname', '') in place of ownerid if that is defined.

Could not import Products.PloneFormGen

2012-11-22T10:27:46 ERROR Application Could not import Products.PloneFormGen
Traceback (most recent call last):
File "c:\plone42\eggs\zope2-2.13.16-py2.6.egg\OFS\Application.py", line 606, in import_product
product=import(pname, global_dict, global_dict, silly)
File "c:\plone42\eggs\products.ploneformgen-1.7.4-py2.6.egg\Products\PloneFormGen__init__.py", line 26, in
from Products.CMFPlone.migrations import v3_1
ImportError: No module named migrations

Mailer: HTML / Plain text interchanged

Plone 4.2.0.1 (Localized to German) / PloneFormGen 1.7.2

When I set the eMail type of the eMail adapter to "HTML", I receive a message with content-type text/html, but body plain text eMail with all field's titles and content but no line breaks or anything, which is tedious to read. When I set the type to "Plain text", I receive an eMail of content type text/plain, but with HTML in the body.

Looks to me like somewhere in there, the "HTML"/"Plain Text" settings have mistakenly been interchanged.

QuickEdit Toolbox Unresponsive

The Quickedit ToolBox remains static when scrolling up and down on the page. Thus depending on browser window size, I cannot access any fields that are stuck below the bottom of the window. It does this regardless of the browser. I'm using Plone 4109 and PFG 1.7.11.

proposal - toolbox at a fixed position

The Toolbox in the QuickEdit View would be more usable if it would appear at a fixed position. It would be handy if one is working on long forms.

f.e.

position: fixed;
top: 300px;
right: 100px;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.