Tracker log

An overview of recent activity in the tracker.

Harald Friessnegger added a new response to »ArrayField names cause ReferenceBrowserWidget popup to 404«:

the way the compoundfields are named (eg links|links:000|link) conflicts with rules for css ids.

when changing the referencebrowser.pt in archetypes.referencebrowserwidget to use a valid id::

  fieldname python:fieldName.replace('|','_').replace(':','_');

the error is gone and other refbrowsefields are working again.

however, the overlay for the compoundfields does not have any content.

the person that coded archetypes.referencebrowserwidget might solve this issue in a couple of minutes by either making archetypes.referencebrowserwidget more tolerant for fields having weired names or to add a way for such fields to tell atrefbrowser which id to use.
(it seems there already is such a difference when you take a look at the ursl the refbrowser opens:
refbrowser_popup?fieldName=relatedItems&fieldRealName=relatedItems&at_url=/plone/

it might also be necessary to use jquery's .live in atrefbrowserwidget or call a callback function of atrefbrowser to hook up everything correctly after a new field/widget has been added to the arrayfield using the "+" button

Added 129 day(s) ago.

Harald Friessnegger added a new response to »ArrayField names cause ReferenceBrowserWidget popup to 404«:

just had the same idea: use a combination of arrayfield and referencebrowserwidget to add arbitrary links with an optional title.

the presence of the arrayfield renders all other fields using referencebrowserwidget (eg related items) unusable.

that's what i see in firebug:
uncaught exception: Could not find Overlay: #atrb_links|links:000|link

plone4.1; archetypes.referencebrowserwidget-2.4.3;
compoundfield svn trunk rev 13820

Added 129 day(s) ago.

Andrea Zauli added a new response to »Plone 4 compatibility«:

The problem is due to the different import source of i18n module.
Essentially the proposed patch is for retro-compatibility with plone versions < 4.

To solve the problem it should be replaced the "import i18n part":
try:
    from Products.generator import i18n
except ImportError:
    from Products.Archetypes.generator import i18n

With something like this (is an example):
try:
    # Plone 4 and higher
    import plone.app.upgrade
    PLONE_VERSION = ">=4"
except ImportError:
    PLONE_VERSION = "<4"

if PLONE_VERSION == ">=4":
        from zope import i18n
elif PLONE_VERSION == "<4":
        try:
                from Products.generator import i18n
        except:
                from Products.Archetypes.generator import i18n

This will ensure backward compatibility with previous releases.


I found the ""legacy"" import in this modules, but its presence depends strictly on the release:
Products/CompoundField/testClasses/SimpleCompoundTestField.py
Products/CompoundField/testClasses/XPolygonField.py
Products/CompoundField/testClasses/XBoxField.py
Products/CompoundField/testClasses/NestedArrayField.py
Products/CompoundField/testClasses/XPointField.py
Products/CompoundField/CompoundField.py
Products/CompoundField/ArrayField.py

For example in the trunk is present only in thi module:
Products/CompoundField/testClasses/SimpleCompoundTestField.py


Added 344 day(s) ago.

Michael Smith added a new response to »ArrayField of CompoundField of TextField breaks with Products.LinguaPlone«:

This patch seems to resolve the issue.

Added 399 day(s) ago.

New issue »Plone 4 compatibility (archetypes tool)« added by Michael Smith

Using https://svn.plone.org/[…]/EnhancedArrayWidget.py@13382

around line 78 needs
atool = getattr(atool, "tool", atool)

right after the initial definition of atool for plone 4 compatibility. getToolByName(context, 'archetype_tool') returns a fauxArchetypeTool now, which doesn't have a listTypes method, causing EnhancedArrayWidget to crash.

Added 413 day(s) ago.

Michael Smith added a new response to »ImportError: cannot import name _guessPackage«:

Unfortunately _guessPackage looks like it was always a little dicey, and atool.listTypes() is really particular. Attached is a patch that does a best-effort to find the right type.

Added 413 day(s) ago.

New issue »ArrayField of CompoundField of TextField breaks with Products.LinguaPlone« added by Michael Smith

I'm using revision 13317 from svn and Plone 3.3.5.

Traceback (innermost last):
  Module ZPublisher.Publish, line 119, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 42, in call_object
  Module Products.CMFPlone.FactoryTool, line 379, in __call__
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 42, in call_object
  Module Products.CMFFormController.FSControllerPageTemplate, line 90, 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 88, in mapply
  Module ZPublisher.Publish, line 42, in call_object
  Module Products.CMFFormController.FSControllerPythonScript, line 106, in __call__
  Module Products.CMFFormController.ControllerBase, line 231, in getNext
  Module Products.CMFFormController.Actions.TraverseTo, line 38, in __call__
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 42, in call_object
  Module Products.CMFFormController.FSControllerPythonScript, line 104, in __call__
  Module Products.CMFFormController.Script, line 145, in __call__
  Module Products.CMFCore.FSPythonScript, line 140, in __call__
  Module Shared.DC.Scripts.Bindings, line 313, in __call__
  Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
  Module Products.CMFCore.FSPythonScript, line 196, in _exec
  Module None, line 1, in content_edit
   - <FSControllerPythonScript at /Plone/content_edit used for /Plone/connections/portal_factory/DetailFlexPage/detailflexpage.2010-12-21.4800953378>
   - Line 1
  Module Products.CMFCore.FSPythonScript, line 140, in __call__
  Module Shared.DC.Scripts.Bindings, line 313, in __call__
  Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
  Module Products.CMFCore.FSPythonScript, line 196, in _exec
  Module None, line 13, in content_edit_impl
   - <FSPythonScript at /Plone/content_edit_impl used for /Plone/connections/portal_factory/DetailFlexPage/detailflexpage.2010-12-21.4800953378>
   - Line 13
  Module Products.LinguaPlone.I18NBaseObject, line 413, in processForm
  Module Products.Archetypes.BaseObject, line 668, in processForm
  Module Products.LinguaPlone.I18NBaseObject, line 404, in _processForm
   - __traceback_info__: (<DetailFlexPage at /Plone/connections/detailflexpage.2010-12-21.4800953378>, <Field showhide(arrayfield:rw)>, <bound method DetailFlexPage.setShowhide of <DetailFlexPage at /Plone/connections/detailflexpage.2010-12-21.4800953378>>)
  Module Products.Archetypes.utils, line 160, in mapply
  Module Products.Archetypes.ClassGen, line 76, in generatedMutator
  Module Products.CompoundField.ArrayField, line 106, in set
  Module Products.CompoundField.CompoundField, line 125, in set
  Module Products.CompoundField.CompoundField, line 127, in set
  Module wicked.fieldevent, line 34, in store
  Module zope.event, line 23, in notify
  Module zope.component.event, line 26, in dispatch
  Module zope.component._api, line 130, in subscribers
  Module zope.component.registry, line 290, in subscribers
  Module zope.interface.adapter, line 535, in subscribers
  Module wicked.fieldevent, line 24, in notifyFieldEvent
  Module zope.component._api, line 130, in subscribers
  Module zope.component.registry, line 290, in subscribers
  Module zope.interface.adapter, line 539, in subscribers
  Module wicked.fieldevent.meta, line 83, in field_value_set
  Module Products.Archetypes.Field, line 1047, in set
  Module Products.Archetypes.Field, line 1323, in _process_input
TextFieldException: Value is not File or String (<type 'object'> - <type 'object'>)

Added 415 day(s) ago.

Tim Cook added a new response to »Plone 4 compatibility«:

+1 on Ubuntu 10.10 AMD64


2010-11-29 13:58:00 ERROR Application Couldn't install CompoundField
Traceback (most recent call last):
  File "/home/tim/HKCR-dev/buildout-cache/eggs/Zope2-2.12.11-py2.6-linux-x86_64.egg/OFS/Application.py", line 671, in install_product
    initmethod(context)
  File "/home/tim/HKCR-dev/buildout-cache/eggs/Products.CompoundField-1.1-py2.6.egg/Products/CompoundField/__init__.py", line 72, in initialize
    import testClasses
  File "/home/tim/HKCR-dev/buildout-cache/eggs/Products.CompoundField-1.1-py2.6.egg/Products/CompoundField/testClasses/__init__.py", line 29, in <module>
    import CompoundFieldTest
  File "/home/tim/HKCR-dev/buildout-cache/eggs/Products.CompoundField-1.1-py2.6.egg/Products/CompoundField/testClasses/CompoundFieldTest.py", line 20, in <module>
    from Products.CompoundField.CompoundField import CompoundField
  File "/home/tim/HKCR-dev/buildout-cache/eggs/Products.CompoundField-1.1-py2.6.egg/Products/CompoundField/CompoundField.py", line 33, in <module>
    from Products.Archetypes.generator import i18n
ImportError: cannot import name i18n
Traceback (most recent call last):
  File "/home/tim/HKCR-dev/buildout-cache/eggs/Zope2-2.12.11-py2.6-linux-x86_64.egg/Zope2/Startup/run.py", line 56, in <module>
    run()
  File "/home/tim/HKCR-dev/buildout-cache/eggs/Zope2-2.12.11-py2.6-linux-x86_64.egg/Zope2/Startup/run.py", line 21, in run
    starter.prepare()
  File "/home/tim/HKCR-dev/buildout-cache/eggs/Zope2-2.12.11-py2.6-linux-x86_64.egg/Zope2/Startup/__init__.py", line 87, in prepare
    self.startZope()
  File "/home/tim/HKCR-dev/buildout-cache/eggs/Zope2-2.12.11-py2.6-linux-x86_64.egg/Zope2/Startup/__init__.py", line 264, in startZope
    Zope2.startup()
  File "/home/tim/HKCR-dev/buildout-cache/eggs/Zope2-2.12.11-py2.6-linux-x86_64.egg/Zope2/__init__.py", line 47, in startup
    _startup()
  File "/home/tim/HKCR-dev/buildout-cache/eggs/Zope2-2.12.11-py2.6-linux-x86_64.egg/Zope2/App/startup.py", line 116, in startup
    OFS.Application.initialize(application)
  File "/home/tim/HKCR-dev/buildout-cache/eggs/Zope2-2.12.11-py2.6-linux-x86_64.egg/OFS/Application.py", line 251, in initialize
    initializer.initialize()
  File "/home/tim/HKCR-dev/buildout-cache/eggs/Zope2-2.12.11-py2.6-linux-x86_64.egg/OFS/Application.py", line 279, in initialize
    self.install_products()
  File "/home/tim/HKCR-dev/buildout-cache/eggs/Zope2-2.12.11-py2.6-linux-x86_64.egg/OFS/Application.py", line 492, in install_products
    return install_products(app)
  File "/home/tim/HKCR-dev/buildout-cache/eggs/Zope2-2.12.11-py2.6-linux-x86_64.egg/OFS/Application.py", line 523, in install_products
    folder_permissions, raise_exc=debug_mode)
  File "/home/tim/HKCR-dev/buildout-cache/eggs/Zope2-2.12.11-py2.6-linux-x86_64.egg/OFS/Application.py", line 671, in install_product
    initmethod(context)
  File "/home/tim/HKCR-dev/buildout-cache/eggs/Products.CompoundField-1.1-py2.6.egg/Products/CompoundField/__init__.py", line 72, in initialize
    import testClasses
  File "/home/tim/HKCR-dev/buildout-cache/eggs/Products.CompoundField-1.1-py2.6.egg/Products/CompoundField/testClasses/__init__.py", line 29, in <module>
    import CompoundFieldTest
  File "/home/tim/HKCR-dev/buildout-cache/eggs/Products.CompoundField-1.1-py2.6.egg/Products/CompoundField/testClasses/CompoundFieldTest.py", line 20, in <module>
    from Products.CompoundField.CompoundField import CompoundField
  File "/home/tim/HKCR-dev/buildout-cache/eggs/Products.CompoundField-1.1-py2.6.egg/Products/CompoundField/CompoundField.py", line 33, in <module>
    from Products.Archetypes.generator import i18n
ImportError: cannot import name i18n

Added 437 day(s) ago.

Carlos Hanson added a new response to »Replacing __inplements__ with interface.implements breaks Plone 3 compatibility«:

Because I am registering the validators (see http://plone.org/products/compoundfield/issues/19), I get the following error with this fix:

  Products.validation.exceptions.FalseValidatorError: <Products.CompoundField.validators.CompoundValidator instance at 0x461c680>

While the fix is correct, I think the test is not. It seems that Plone 4 runs with __implements__= (IValidator,), but fails when registering the validator.

I used the test mentioned in the upgrade documentation:

  http://plone.org/[…]/detecting-plone-4

I've attached a diff of my change.

Added 475 day(s) ago.

New issue »ImportError: cannot import name _guessPackage« added by Carlos Hanson

Using svn r12637 on Plone 4, I receive the following error when starting Zope:

  ImportError: cannot import name _guessPackage

The _guessPackage method was removed from ArchetypeTool:

  http://dev.plone.org/archetypes/changeset/9972

For a temporary solution, I have created a _guessPackage function in EnhancedArrayWidget.py. I have attached my patch.

Added 483 day(s) ago.

Kees Hink added a new response to »Replacing __inplements__ with interface.implements breaks Plone 3 compatibility«:

Previous "fix" (actually a reversion) broke Plone 4. The real fix (by toutpt) is:

https://dev.plone.org/[…]/validators.py

Added some doc in
https://dev.plone.org/[…]/validators.py

Added 601 day(s) ago.

Kees Hink added a new response to »Replacing __inplements__ with interface.implements breaks Plone 3 compatibility«:

Fixed it by reverting to old version: https://dev.plone.org/[…]/validators.py

Added 601 day(s) ago.

New issue »Replacing __inplements__ with interface.implements breaks Plone 3 compatibility« added by Kees Hink

(Found in trunk, r12633)

The changeset r12603 (https://dev.plone.org/[…]/validators.py) breaks Plone 3 compatibility. When starting the instance, i get an error for the interface.implements statement. (See http://pastie.org/1010001 for full error message.)

Tested on Plone 3.3.4 and 3.3.5.

Added 601 day(s) ago.

Michael Smith added a new response to »Plone 4 compatibility«:

+1: Full traceback attached

Added 621 day(s) ago.

Mike Muzurakis added a new response to »NoneType error in Products.CompoundField.validators, line 70, in _getSubfields«:

You've probably hit this bug:
http://blog.mfabrik.com/[…]/

Added 651 day(s) ago.

New issue »Plone 4 compatibility« added by Michael Graf

...
File "c:\server\plone\eggs\products.compoundfield-1.1-py2.6.egg\Products\CompoundField\CompoundField.py", line 33, in <module>
    from Products.Archetypes.generator import i18n
ImportError: cannot import name i18n

Archetypes 1.6b5 has no Archetypes/generator/i18n.py

System:
Windows Server 2008
Plone 4.0b1
Archetypes 1.6b5
CompoundField 1.1

Added 673 day(s) ago.

Kees Hink added a new response to »Macro 'EnhancedArrayWidget' registered only in plone_default skin layer«:

Fixed on trunk: r12364, https://dev.plone.org/[…]/profiles

Added 693 day(s) ago.

Kees Hink added a new response to »Download of file in ArrayField fails: "AttributeError: download"«:

Fixed on trunk: r12364, https://dev.plone.org/[…]/profiles

Added 693 day(s) ago.

Kees Hink added a new response to »Download of file in ArrayField fails: "AttributeError: download"«:

The cause is that in my setup, the skins layer wasn't registered after 'custom', but at the end. Therefore, the default at_download script took precedence over CompoundField's. Putting the skin layer in the right place fixed this.

Replacing name="Plone Default" in the skin-path with name="*" fixes the registering of the skin layer, so propose this as a patch. This patch also fixes http://plone.org/products/compoundfield/issues/20

Added 695 day(s) ago.

Kees Hink added a new response to »Macro 'EnhancedArrayWidget' registered only in plone_default skin layer«:

I proposed to use this patch to solve issue.

Added 696 day(s) ago.