I think the Sunburst theme provides a good example of adding some of those globals back into main_template.pt.

You'll see these and a few other lines as a guide of what to do:

   tal:define="portal_state context/@@plone_portal_state;
        context_state context/@@plone_context_state;
        plone_view context/@@plone;
        lang portal_state/language;
        view nocall:view | nocall: plone_view;
        dummy python: plone_view.mark_view(view);
        portal_url portal_state/portal_url;


-Ken


On 11/24/10 3:20 PM, Steve McMahon wrote:
You need to update your template. To quote the upgrade guide:

"""
Lots of definitions that were available in templates in Plone 3.x are no longer there. You need to add the ones you really need yourself.
"""

http://plone.org/documentation/manual/upgrade-guide/version/upgrading-plone-3-x-to-4.0/updating-add-on-products-for-plone-4.0/no-more-global-definitions-in-templates

On Wed, Nov 24, 2010 at 7:23 AM, dustinh <[email protected] <mailto:[email protected]>> wrote:


    Hi everyone!

    It seems I just can't migrate my existing Plone 3.x site to the
    new Plone 4.
    I tried this with Plone 4 and also the new Plone 4.0.2 released
    recently.

    To be more specific: After I copied over my data.fs to a fresh
    install of
    Plone 4, the login form isn't working anymore. As soon as I'm
    navigating to
    myURL/login_form, I get an error message.

    This is what my instance.log says:
    ____
    2010-11-24T08:51:51 ERROR Zope.SiteErrorLog
    1290585111.670.861549948062
    http://localhost:8080/login_form
    Traceback (innermost last):
     Module ZPublisher.Publish, line 127, in publish
     Module ZPublisher.mapply, line 77, in mapply
     Module ZPublisher.Publish, line 47, in call_object
     Module Products.CMFFormController.ControllerPageTemplate, line 75, in
    __call__
     Module Products.CMFFormController.BaseControllerPageTemplate,
    line 31, in
    _call
     Module Shared.DC.Scripts.Bindings, line 324, in __call__
     Module Shared.DC.Scripts.Bindings, line 361, in _bindAndExec
     Module Products.PageTemplates.ZopePageTemplate, line 335, in _exec
     Module Products.PageTemplates.ZopePageTemplate, line 432, in
    pt_render
     Module Products.PageTemplates.PageTemplate, line 80, in pt_render
     Module zope.pagetemplate.pagetemplate, line 115, in pt_render
     Module zope.tal.talinterpreter, line 271, in __call__
     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 583, in do_setLocal_tal
     Module zope.tales.tales, line 696, in evaluate
      - URL: /Plone/login_form
      - Line 23, Column 0
      - Expression: <PythonExpr test(utool.isURLInPortal(came_from),
    came_from,
    None)>
      - Names:
         {'container': <PloneSite at /Plone>,
          'context': <PloneSite at /Plone>,
          'default': ,
          'here': <PloneSite at /Plone>,
          'loop': {},
          'nothing': None,
          'options': {'args': (),
                      'state':
    <Products.CMFFormController.ControllerState.ControllerState object at
    0x0815A670>},
          'repeat': <Products.PageTemplates.Expressions.SafeMapping
    object at
    0x08092150>,
          'request': <HTTPRequest, URL=http://localhost:8080/login_form>,
          'root': <Application at >,
          'template': <ControllerPageTemplate at /Plone/login_form>,
          'traverse_subpath': [],
          'user': <SpecialUser 'Anonymous User'>}
     Module Products.PageTemplates.ZRPythonExpr, line 49, in __call__
      - __traceback_info__: test(utool.isURLInPortal(came_from),
    came_from,
    None)
     Module PythonExpr, line 1, in <expression>
    NameError: name 'utool' is not defined
    ___

    Unfortunately, I have no idea where to even start to debug this error
    (utool?)
    To be sure it's not related to any addon I might be using, I also
    tried
    uninstalling all addons prior to the migration, leading to the
    same result.

    Maybe someone here could offer some assistance?
    --
    View this message in context:
    
http://plone.293351.n2.nabble.com/Problem-with-Migration-to-Plone-4-tp5769880p5769880.html
    Sent from the Installation, Setup, Upgrades mailing list archive
    at Nabble.com.
    _______________________________________________
    Setup mailing list
    [email protected] <mailto:[email protected]>
    http://lists.plone.org/mailman/listinfo/setup



_______________________________________________
Setup mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/setup
_______________________________________________
Setup mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/setup

Reply via email to