fairwinds at eastlink.ca
Sat Jul 23 08:47:41 EDT 2005
Hi Nuray. Access rules can be dangerous, especially when you place
them at the root of your ZMI as you have found out. I am not sure how
you can get back into ZMI at this point unless you have a backup of
your Data.fs, You might consider swapping your current Data.fs with
your backup in the /var directory of your zope installation at this
point unless someone else has a better solution.
If you had placed the access rule at the root of your Plone site
instead, you could have locked yourself out of your Plone site instead
- then gone into ZMI and just clicked undo tab to undo to the point at
which you put your access rule script into play. Then you could have
got back in to your Plone and adjusted your script.
On Saturday, July 23, 2005, at 06:01 AM, Nuray Dedeoglu wrote:
> While I was trying to change the language of my plone portal from
> turkish to enlish I created a python script named accessrule and
> placed it in the root directory in my ZMI,then set the access rule
> with the one I created. I inserted the following code in to the python
> request = container.REQUEST
> response = request.RESPONSE
> request.set(HTTP_ACCEPT_LANGUAGE, en)
> response.setCookie(LOCALIZER_LANGUAGE, en)
> but then it didn' t work, moreover I cannot even open the ZMI
> receiving the following error:
> Site Error
> An error was encountered while publishing this resource.
> Error Type: NameError
> Error Value: global name 'HTTP_ACCEPT_LANGUAGE' is not defined
> What can I do for this? Can anyone help?
> ZPT mailing list
> ZPT at zope.org
More information about the ZPT