Discussion:
[Erp5-dev] form_list missing
Bartek Gorny
2006-06-27 15:30:11 UTC
Permalink
Hi

In a brand new installation (checked out from svn, bt5 installed from
repository), installed some basic templates (base, trade and pdm), an
attempt to view any module other then Person, Organisation and
Currency results in an attribute error - form_list (traceback below).
Is some other bt5 required, or is something missing?

B.

Request URL http://erp5.no-ip.org:9081/erp5/component_module/view
Exception Type AttributeError
Exception Value form_list

Traceback (innermost last):

* Module ZPublisher.Publish, line 101, in publish
* Module ZPublisher.mapply, line 88, in mapply
* Module ZPublisher.Publish, line 39, in call_object
* Module Products.CMFCore.PortalContent, line 117, in view
* Module Products.CMFCore.PortalContent, line 109, in __call__
* Module Products.ERP5Form.Form, line 360, in __call__
* Module Products.ERP5Form.Form, line 369, in __call__

AttributeError: form_list
--
"Software is largely a service industry operating under the persistent
but unfounded delusion that it is a manufacturing industry."
Eric S.Raymond, "The Magic Cauldron"
Pelletier Vincent
2006-06-28 08:32:35 UTC
Permalink
Post by Bartek Gorny
AttributeError: form_list
I forgot to mention that I wrote a script to move the forms to xhtml style.
See the attached file (it's a ZODB script, exported as bare python). It checks
context (and subfolders) for forms and proposes fixes.

Note that it is not backward compatible : a form designed for xhtml style will
not work in html style.

I commited erp5_core and erp5_base in xhtml style mode, and I will revert it
as soon as the compatibility layer will be commited (as a part of xhtml
style). So please do not upgrade erp5_core and erp5_base if you're using an
"old" (ie, more than 2 days old) site.
--
Vincent Pelletier
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ERP5Site_checkXhtmlForm.py
Type: application/x-python
Size: 2789 bytes
Desc: not available
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20060628/206b0da6/attachment.bin>
Jean-Paul Smets
2006-06-28 10:29:49 UTC
Permalink
Post by Pelletier Vincent
Post by Bartek Gorny
AttributeError: form_list
I forgot to mention that I wrote a script to move the forms to xhtml
style. See the attached file (it's a ZODB script, exported as bare
python). It checks context (and subfolders) for forms and proposes fixes.
Note that it is not backward compatible : a form designed for xhtml style
will not work in html style.
I commited erp5_core and erp5_base in xhtml style mode, and I will revert
it as soon as the compatibility layer will be commited (as a part of
xhtml style). So please do not upgrade erp5_core and erp5_base if you're
using an "old" (ie, more than 2 days old) site.
I have asked Vincent to add form_list (its was actually missing)

JPS
--
Jean-Paul Smets-Solanes, Nexedi CEO - Tel. +33(0)6 62 05 76 14
Nexedi: Consulting and Development of Libre / Open Source Software
http://www.nexedi.com
ERP5: Libre/ Open Source ERP Software for small and medium companies
http://www.erp5.org
Rentalinux: Desktop Linux Server
http://www.rentalinux.com
Pelletier Vincent
2006-06-28 13:31:17 UTC
Permalink
Post by Jean-Paul Smets
Post by Pelletier Vincent
Post by Bartek Gorny
AttributeError: form_list
I forgot to mention that I wrote a script to move the forms to xhtml
style. See the attached file (it's a ZODB script, exported as bare
python). It checks context (and subfolders) for forms and proposes fixes.
Note that it is not backward compatible : a form designed for xhtml style
will not work in html style.
I commited erp5_core and erp5_base in xhtml style mode, and I will revert
it as soon as the compatibility layer will be commited (as a part of
xhtml style). So please do not upgrade erp5_core and erp5_base if you're
using an "old" (ie, more than 2 days old) site.
I have asked Vincent to add form_list (its was actually missing)
JPS
I've commited changes to erp5_xhtml_style, erp5_core and erp5_base.
Here is the current status :
-All forms from erp5_core and erp5_base are back to erp5_html_style
compatibility (ie, they use the old page template names). They should work
like before in html style.
-All form groups have been renamed to follow xhtml choices. this change is
backward compatible with html.
-erp5_xhtml_style contains a compatibility folder, named
erp5_html_compatibility, that contains pages templates which just call their
renamed equivalent in erp5_xhtml_style. This allows upgrading a site from
html to xhtml.

There is a limitation though.
Historically, the form groups were accessed using their position, then using
their names with few restrictions ("Left" == "left" == "left group"...). In
xhtml style, the names must be set exactly, otherwise the missnamed group
will not be rendered. To know how to rename groups, please use the script I
sent in an earlier mail.
--
Vincent Pelletier
Łukasz Nowak
2006-06-29 11:24:14 UTC
Permalink
Hello,
Post by Bartek Gorny
Hi
In a brand new installation (checked out from svn, bt5 installed from
repository), installed some basic templates (base, trade and pdm), an
attempt to view any module other then Person, Organisation and
Currency results in an attribute error - form_list (traceback below).
Is some other bt5 required, or is something missing?
Is that problem connected with:

Error Type: AttributeError
Error Value: list_main

While viewing Organisations & Persons?

BTW. Which SVN revision is "the good" one? For Products and for bts?

Bye,
Luke
--
?ukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 392 10 60 int 37 fax: +48 32 392 10 61
https://ssl.ventis.com.pl/keys/lukasz.nowak.pub.asc
Pelletier Vincent
2006-06-29 15:37:16 UTC
Permalink
Post by Łukasz Nowak
Error Type: AttributeError
Error Value: list_main
While viewing Organisations & Persons?
Yes.
Sorry, you hit the "complementary" bug :
html style with forms configured for xhtml style.
To fix locally such message (so you can access portal_templates if you can't
for now) you ca edit the form and change list_main into form_list.
Post by Łukasz Nowak
BTW. Which SVN revision is "the good" one? For Products and for bts?
Current version works :
-Install by default on a new site erp5_xhtml_style, including compatibility
layer.
-Forms configured with "old" page template IDs, so they work in html style.

Although, if you find something that doens't work in current SVN version :
-A form or a script who uses the new page template name : please contact me so
I can revert it as soon as possible.
-A form whose groups have been renamed and which doesn't render correctly in
html style. This would mean that you have a very old html style version that
displays groups based on their positions, and should consider upgrading - if
not to xhml style, at least to latest html style. If it still doesn't work,
please contact me so I can correct it.

If you want to update to xhtml style, you must first update erp5_core, because
it contains scripts xhtml style depends on.
How to recover from an upgrade which failed :
If you upgraded from a site using html style, you can remove
"erp5_xhtml_style" and "erp5_html_compatibility" from
you_site_id/portal_skins/manage_propertiesForm, "View" group and put (if not
already present) "erp5_html_style" in it.
If you upgraded from a site with only xhtml, you must import manually the new
versions of the scripts which fail. (xml version of these scripts, ready to
import in zope, can be found by extracting the .bt5 containing them, here
erp5_core.bt5 - or by fetching them from svn).
--
Vincent Pelletier
Łukasz Nowak
2006-06-30 08:14:11 UTC
Permalink
Hello,

Dnia 29-06-2006, czw o godzinie 17:37 +0200, Pelletier Vincent
Post by Pelletier Vincent
Post by Łukasz Nowak
While viewing Organisations & Persons?
Yes.
html style with forms configured for xhtml style.
To fix locally such message (so you can access portal_templates if you can't
for now) you ca edit the form and change list_main into form_list.
Thank you for such explanatory response. Right now, I'm using revision
7500 for Products and BTes. When sources will be stabilized, I'll try to
update to newest version.

Are you planning to make some tags (not branches) for "almost stable"
versions?

Bye and thanks,
Luke
--
?ukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 392 10 60 int 37 fax: +48 32 392 10 61
https://ssl.ventis.com.pl/keys/lukasz.nowak.pub.asc
Loading...