Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
84 lines (62 sloc) 3.55 KB
===============
Troubleshooting
===============
.. contents :: :local:
Introduction
------------
This page contains tips regarding troubleshooting Go Mobile installations.
ImportError: initLevenshtein
-----------------------------
If you get example::
ImportError: dynamic module does not define init function (initLevenshtein)
It usually means that you have manually copied python-Levenshtein package
from a computer to another. It must be recompiled to be compatible with new OS/Python binary format.
* Remove src/python-Levenshtein
* Rerun buildout
plone_view.mark_view(view) exception
-------------------------------------
Traceback::
# Line 3, Column 0
Expression: <PythonExpr plone_view.mark_view(view)>
Names:
{'container': <CampaignPage at /mfabrik/front-page>,
'context': <CampaignPage at /mfabrik/front-page>,
'default': <object object at 0x10030a200>,
'here': <CampaignPage at /mfabrik/front-page>,
'loop': {},
'nothing': None,
'options': {'args': (<Products.Five.metaclass.SimpleViewClass from /Users/moo/twinapex/twinapex/src/mfabrik.app/mfabrik/app/browser/campaignmobileview.pt object at 0x10e2fa9d0>,)},
'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x11117d488>,
'request': <HTTPRequest, URL=http://m.localhost:8080/mfabrik/front-page/campaignpageview>,
'root': <Application at >,
'template': <ImplicitAcquirerWrapper object at 0x111185bd0>,
'traverse_subpath': [],
'user': <SpecialUser 'Anonymous User'>,
'view': <Products.Five.metaclass.SimpleViewClass from /Users/moo/twinapex/twinapex/src/mfabrik.app/mfabrik/app/browser/campaignmobileview.pt object at 0x10e2fa9d0>,
'views': <zope.app.pagetemplate.viewpagetemplatefile.ViewMapper object at 0x111185c90>}
# Module Products.PageTemplates.ZRPythonExpr, line 49, in __call__
__traceback_info__: plone_view.mark_view(view)
# Module PythonExpr, line 1, in <expression>
You are trying to use Plone 4 main_template.pt on Plone 3 site.
Please see :doc:`installation instructions </user-manual/installation>` how to fix this.
Too many redirects error on mobile device when using NGINX
-----------------------------------------------------------
If you set up NGINX to run in front of Zope, and set up a virtual host with it like this:
server {
server_name demo.webandmobile.mfabrik.com;
location / {
rewrite ^/(.*)$ /VirtualHostBase/http/demo.webandmobile.mfabrik.com:80/Plone/VirtualHostRoot/$1 break;
proxy_pass http://127.0.0.1:8080/;
}
}
the site won't work on a mobile device. The mobile browser will return with a too many redirects error. This is because Zope will always get the request from 127.0.0.1:8080 and not from the actual host, due to the redirection. To solve this problem correct your configuration to be like this:
server {
server_name demo.webandmobile.mfabrik.com;
location / {
rewrite ^/(.*)$ /VirtualHostBase/http/demo.webandmobile.mfabrik.com:80/Plone/VirtualHostRoot/$1 break;
proxy_pass http://127.0.0.1:8080/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
You can’t perform that action at this time.