2.1.1 migration issue, possibly template bug?

classic Classic list List threaded Threaded
5 messages Options
carey carey
Reply | Threaded
Open this post in threaded view
|

2.1.1 migration issue, possibly template bug?

Hi All,

I have managed to upgrade my plone site from 2.0.5 to 2.1.1 on zope 2.7.7 python
2.3.5
However some of my documents (that were CMF Documents and are now AT Document)
fail to render with the error below.

I have found I can make these pages render correctly by removing the following

                <a href="/Members/runyaga"
                   tal:define="actorid python:items.get('actor');
                               actor python:mtool.getMemberInfo(actorid);
                               fullname actor/fullname"
                   tal:attributes="href string:${portal_url}/author/${actorid}"
                   tal:content="python:fullname or actorid">
                  runyaga
                </a>

from
CMFPlone/skins/plone_content/review_history.pt

What is the correct way to resolve this issue? or perhaps this is a bug?
Should I be posting this to the developers list or something else?

Cheers

Carey




 Request URL
    http://localhost:11080/cellml/index_html/document_view
Exception Type
    AttributeError
Exception Value
    'NoneType' object has no attribute 'fullname'

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 Shared.DC.Scripts.Bindings, line 306, in __call__
    * Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
    * Module Products.CMFCore.FSPageTemplate, line 188, in _exec
    * Module Products.CMFCore.FSPageTemplate, line 127, in pt_render
    * Module Products.PageTemplates.PageTemplate, line 96, in pt_render
      <FSPageTemplate at /cellml/document_view used for /cellml/index_html>
    * Module TAL.TALInterpreter, line 190, in __call__
    * Module TAL.TALInterpreter, line 234, in interpret
    * Module TAL.TALInterpreter, line 671, in do_useMacro
    * Module TAL.TALInterpreter, line 234, in interpret
    * Module TAL.TALInterpreter, line 409, in do_optTag_tal
    * Module TAL.TALInterpreter, line 394, in do_optTag
    * Module TAL.TALInterpreter, line 389, in no_tag
    * Module TAL.TALInterpreter, line 234, in interpret
    * Module TAL.TALInterpreter, line 702, in do_defineSlot
    * Module TAL.TALInterpreter, line 234, in interpret
    * Module TAL.TALInterpreter, line 409, in do_optTag_tal
    * Module TAL.TALInterpreter, line 394, in do_optTag
    * Module TAL.TALInterpreter, line 389, in no_tag
    * Module TAL.TALInterpreter, line 234, in interpret
    * Module TAL.TALInterpreter, line 650, in do_defineMacro
    * Module TAL.TALInterpreter, line 234, in interpret
    * Module TAL.TALInterpreter, line 694, in do_defineSlot
    * Module TAL.TALInterpreter, line 234, in interpret
    * Module TAL.TALInterpreter, line 409, in do_optTag_tal
    * Module TAL.TALInterpreter, line 394, in do_optTag
    * Module TAL.TALInterpreter, line 389, in no_tag
    * Module TAL.TALInterpreter, line 234, in interpret
    * Module TAL.TALInterpreter, line 650, in do_defineMacro
    * Module TAL.TALInterpreter, line 234, in interpret
    * Module TAL.TALInterpreter, line 409, in do_optTag_tal
    * Module TAL.TALInterpreter, line 394, in do_optTag
    * Module TAL.TALInterpreter, line 389, in no_tag
    * Module TAL.TALInterpreter, line 234, in interpret
    * Module TAL.TALInterpreter, line 671, in do_useMacro
    * Module TAL.TALInterpreter, line 234, in interpret
    * Module TAL.TALInterpreter, line 637, in do_condition
    * Module TAL.TALInterpreter, line 234, in interpret
    * Module TAL.TALInterpreter, line 671, in do_useMacro
    * Module TAL.TALInterpreter, line 234, in interpret
    * Module TAL.TALInterpreter, line 637, in do_condition
    * Module TAL.TALInterpreter, line 234, in interpret
    * Module TAL.TALInterpreter, line 409, in do_optTag_tal
    * Module TAL.TALInterpreter, line 394, in do_optTag
    * Module TAL.TALInterpreter, line 389, in no_tag
    * Module TAL.TALInterpreter, line 234, in interpret
    * Module TAL.TALInterpreter, line 637, in do_condition
    * Module TAL.TALInterpreter, line 234, in interpret
    * Module TAL.TALInterpreter, line 613, in do_loop_tal
    * Module TAL.TALInterpreter, line 234, in interpret
    * Module TAL.TALInterpreter, line 409, in do_optTag_tal
    * Module TAL.TALInterpreter, line 394, in do_optTag
    * Module TAL.TALInterpreter, line 389, in no_tag
    * Module TAL.TALInterpreter, line 234, in interpret
    * Module TAL.TALInterpreter, line 637, in do_condition
    * Module TAL.TALInterpreter, line 234, in interpret
    * Module TAL.TALInterpreter, line 460, in do_setLocal_tal
    * Module Products.PageTemplates.TALES, line 221, in evaluate
      URL: file:CMFPlone/skins/plone_content/review_history.pt
      Line 35, Column 16
      Expression: standard:'actor/fullname'
      Names:

      {'container': <PloneSite instance at b6b6dbf0>,
       'context': <ATDocument at /cellml/index_html>,
       'default': <Products.PageTemplates.TALES.Default instance at 0xb714e84c>,
       'here': <ATDocument at /cellml/index_html>,
       'loop': <SafeMapping instance at b6a39ca0>,
       'modules': <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter
instance at 0xb714e92c>,
       'nothing': None,
       'options': {'args': ()},
       'repeat': <SafeMapping instance at b6a39ca0>,
       'request': <HTTPRequest,
URL=http://localhost:11080/cellml/index_html/document_view>,
       'root': <Application instance at b68d2b30>,
       'template': <FSPageTemplate at /cellml/document_view used for
/cellml/index_html>,
       'traverse_subpath': [],
       'user': admin}

    * Module Products.PageTemplates.Expressions, line 172, in __call__
    * Module Products.PageTemplates.Expressions, line 160, in _eval
    * Module Products.PageTemplates.Expressions, line 116, in _eval
      __traceback_info__: actor
    * Module Products.PageTemplates.Expressions, line 332, in restrictedTraverse
      __traceback_info__: {'path': ['fullname'], 'TraversalRequestNameStack':
[]}

AttributeError: 'NoneType' object has no attribute 'fullname'


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Plone-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Raphael Ritz Raphael Ritz
Reply | Threaded
Open this post in threaded view
|

Re: 2.1.1 migration issue, possibly template bug?

Carey Stevens wrote:

> Hi All,
>
> I have managed to upgrade my plone site from 2.0.5 to 2.1.1 on zope 2.7.7 python
> 2.3.5
> However some of my documents (that were CMF Documents and are now AT Document)
> fail to render with the error below.
>
> I have found I can make these pages render correctly by removing the following
>
>                 <a href="/Members/runyaga"
>                    tal:define="actorid python:items.get('actor');
>                                actor python:mtool.getMemberInfo(actorid);
>                                fullname actor/fullname"

change this to

             fullname actor/fullname|nothing

>                    tal:attributes="href string:${portal_url}/author/${actorid}"
>                    tal:content="python:fullname or actorid">
>                   runyaga
>                 </a>

[..]

>  Request URL
>     http://localhost:11080/cellml/index_html/document_view
> Exception Type
>     AttributeError
> Exception Value
>     'NoneType' object has no attribute 'fullname'

This points to the fact that you have an actorid in your
workflow history that does not correspond to a current
memberid and therefore getMemberInfo fails to find something.

This by itself may point to some data corruption on your side :-(

Raphael

>
> 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 Shared.DC.Scripts.Bindings, line 306, in __call__
>     * Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
>     * Module Products.CMFCore.FSPageTemplate, line 188, in _exec
>     * Module Products.CMFCore.FSPageTemplate, line 127, in pt_render
>     * Module Products.PageTemplates.PageTemplate, line 96, in pt_render
>       <FSPageTemplate at /cellml/document_view used for /cellml/index_html>
>     * Module TAL.TALInterpreter, line 190, in __call__
>     * Module TAL.TALInterpreter, line 234, in interpret
>     * Module TAL.TALInterpreter, line 671, in do_useMacro
>     * Module TAL.TALInterpreter, line 234, in interpret
>     * Module TAL.TALInterpreter, line 409, in do_optTag_tal
>     * Module TAL.TALInterpreter, line 394, in do_optTag
>     * Module TAL.TALInterpreter, line 389, in no_tag
>     * Module TAL.TALInterpreter, line 234, in interpret
>     * Module TAL.TALInterpreter, line 702, in do_defineSlot
>     * Module TAL.TALInterpreter, line 234, in interpret
>     * Module TAL.TALInterpreter, line 409, in do_optTag_tal
>     * Module TAL.TALInterpreter, line 394, in do_optTag
>     * Module TAL.TALInterpreter, line 389, in no_tag
>     * Module TAL.TALInterpreter, line 234, in interpret
>     * Module TAL.TALInterpreter, line 650, in do_defineMacro
>     * Module TAL.TALInterpreter, line 234, in interpret
>     * Module TAL.TALInterpreter, line 694, in do_defineSlot
>     * Module TAL.TALInterpreter, line 234, in interpret
>     * Module TAL.TALInterpreter, line 409, in do_optTag_tal
>     * Module TAL.TALInterpreter, line 394, in do_optTag
>     * Module TAL.TALInterpreter, line 389, in no_tag
>     * Module TAL.TALInterpreter, line 234, in interpret
>     * Module TAL.TALInterpreter, line 650, in do_defineMacro
>     * Module TAL.TALInterpreter, line 234, in interpret
>     * Module TAL.TALInterpreter, line 409, in do_optTag_tal
>     * Module TAL.TALInterpreter, line 394, in do_optTag
>     * Module TAL.TALInterpreter, line 389, in no_tag
>     * Module TAL.TALInterpreter, line 234, in interpret
>     * Module TAL.TALInterpreter, line 671, in do_useMacro
>     * Module TAL.TALInterpreter, line 234, in interpret
>     * Module TAL.TALInterpreter, line 637, in do_condition
>     * Module TAL.TALInterpreter, line 234, in interpret
>     * Module TAL.TALInterpreter, line 671, in do_useMacro
>     * Module TAL.TALInterpreter, line 234, in interpret
>     * Module TAL.TALInterpreter, line 637, in do_condition
>     * Module TAL.TALInterpreter, line 234, in interpret
>     * Module TAL.TALInterpreter, line 409, in do_optTag_tal
>     * Module TAL.TALInterpreter, line 394, in do_optTag
>     * Module TAL.TALInterpreter, line 389, in no_tag
>     * Module TAL.TALInterpreter, line 234, in interpret
>     * Module TAL.TALInterpreter, line 637, in do_condition
>     * Module TAL.TALInterpreter, line 234, in interpret
>     * Module TAL.TALInterpreter, line 613, in do_loop_tal
>     * Module TAL.TALInterpreter, line 234, in interpret
>     * Module TAL.TALInterpreter, line 409, in do_optTag_tal
>     * Module TAL.TALInterpreter, line 394, in do_optTag
>     * Module TAL.TALInterpreter, line 389, in no_tag
>     * Module TAL.TALInterpreter, line 234, in interpret
>     * Module TAL.TALInterpreter, line 637, in do_condition
>     * Module TAL.TALInterpreter, line 234, in interpret
>     * Module TAL.TALInterpreter, line 460, in do_setLocal_tal
>     * Module Products.PageTemplates.TALES, line 221, in evaluate
>       URL: file:CMFPlone/skins/plone_content/review_history.pt
>       Line 35, Column 16
>       Expression: standard:'actor/fullname'
>       Names:
>
>       {'container': <PloneSite instance at b6b6dbf0>,
>        'context': <ATDocument at /cellml/index_html>,
>        'default': <Products.PageTemplates.TALES.Default instance at 0xb714e84c>,
>        'here': <ATDocument at /cellml/index_html>,
>        'loop': <SafeMapping instance at b6a39ca0>,
>        'modules': <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter
> instance at 0xb714e92c>,
>        'nothing': None,
>        'options': {'args': ()},
>        'repeat': <SafeMapping instance at b6a39ca0>,
>        'request': <HTTPRequest,
> URL=http://localhost:11080/cellml/index_html/document_view>,
>        'root': <Application instance at b68d2b30>,
>        'template': <FSPageTemplate at /cellml/document_view used for
> /cellml/index_html>,
>        'traverse_subpath': [],
>        'user': admin}
>
>     * Module Products.PageTemplates.Expressions, line 172, in __call__
>     * Module Products.PageTemplates.Expressions, line 160, in _eval
>     * Module Products.PageTemplates.Expressions, line 116, in _eval
>       __traceback_info__: actor
>     * Module Products.PageTemplates.Expressions, line 332, in restrictedTraverse
>       __traceback_info__: {'path': ['fullname'], 'TraversalRequestNameStack':
> []}
>
> AttributeError: 'NoneType' object has no attribute 'fullname'
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Plone-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
carey carey
Reply | Threaded
Open this post in threaded view
|

Re: Re: 2.1.1 migration issue, possibly template bug?


>
> This points to the fact that you have an actorid in your
> workflow history that does not correspond to a current
> memberid and therefore getMemberInfo fails to find something.
>
> This by itself may point to some data corruption on your side :-(


ahaa, that makes sense to me now, thank you very much. I also changed the zope instance root login
when when I upgraded the zope and removed the previous administrator's account from the plone sites.
The bung pages must have had something to do with either of those.

Modifying the template provides a fix for me, that I will need to re-apply to future plone releases
on my site. Is there a way I can fix my objects instead? Or perhaps this is a reasonable thing to
have added to the plone product?

Thanks again.

Carey


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Plone-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Raphael Ritz Raphael Ritz
Reply | Threaded
Open this post in threaded view
|

Re: 2.1.1 migration issue, possibly template bug?

Carey Stevens wrote:

>
>>
>> This points to the fact that you have an actorid in your
>> workflow history that does not correspond to a current
>> memberid and therefore getMemberInfo fails to find something.
>>
>> This by itself may point to some data corruption on your side :-(
>
>
>
> ahaa, that makes sense to me now, thank you very much. I also changed
> the zope instance root login when when I upgraded the zope and removed
> the previous administrator's account from the plone sites. The bung
> pages must have had something to do with either of those.
>
> Modifying the template provides a fix for me, that I will need to
> re-apply to future plone releases on my site.

Place the modified template in a product of yours and make
sure its skin layer is looked up before the default Plone ones.

> Is there a way I can fix
> my objects instead?

If it is really only the actor_id in the workflow
history you can write an external method that visits
all content items of your site and looks up their
workflow history. In there, you can replace all occurences
of the old admin id by a new one.

> Or perhaps this is a reasonable thing to have added
> to the plone product?

Changing the workflow history: no

Making the template more robust: yes

Feel free to file a bug report including the fix
to Plone's collector.

Raphael

>
> Thanks again.
>
> Carey
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Plone-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Luca Olivetti-4 Luca Olivetti-4
Reply | Threaded
Open this post in threaded view
|

Re: Re: 2.1.1 migration issue, possibly template bug?

En/na Raphael Ritz ha escrit:

> Feel free to file a bug report including the fix
> to Plone's collector.

http://plone.org/collector/4800
(not exactly the same but very similar).

Bye
--
Luca Olivetti
Wetron Automatización S.A. http://www.wetron.es/
Tel. +34 93 5883004      Fax +34 93 5883007


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Plone-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users