Hi,
I recently updated our reviewboard server from reviewboard 0.9 to the
latest release.
We are using PostgreSQL, and I had to update more than I expected. I
managed to fix almost every issues I encountered, but now, I'm stuck.
Once the website has been updated, after I logged into reviewboard, If
I try to display the content of a review request,
I get the error described below.
What's confuses me is that there is nothing wrong with the html page
itself.
It looks as if the {%if statement itself is not understood by the
parser.
I had a look at base.py and defaulttags.py, but the code is pretty
much what I expected.
Has anybody else encountered the same error, or is it just my config?
I'm not sure that this is a bug, as it seems to me that such error
would be noticed straight away. So I suspect that some of my egg files
are too recent or unstable.
Many thanks for your time and help.
TemplateSyntaxError at /r/149/
Invalid block tag: 'endif', expected 'else' or 'endifequal'
Request Method: GET
Request URL: http://reviewboard/r/149/
Django Version: 1.4 alpha 1
Exception Type: TemplateSyntaxError
Exception Value:
Invalid block tag: 'endif', expected 'else' or 'endifequal'
Exception Location: /usr/lib/python2.5/site-packages/django/template/
base.py in invalid_block_tag, line 323
Python Executable: /usr/bin/python
Python Version: 2.5.2
Python Path:
['/var/www/reviewboard/conf',
'/usr/lib/python2.5/site-packages/PIL-1.1.6-py2.5-linux-i686.egg',
'/usr/lib/python2.5/site-packages/ReviewBoard-1.6.3-py2.5.egg',
'/usr/lib/python2.5/site-packages/recaptcha_client-1.0.6-py2.5.egg',
'/usr/lib/python2.5/site-packages/pytz-2011n-py2.5.egg',
'/usr/lib/python2.5/site-packages/python_memcached-1.48-py2.5.egg',
'/usr/lib/python2.5/site-packages/python_dateutil-1.5-py2.5.egg',
'/usr/lib/python2.5/site-packages/paramiko-1.7.7.1-py2.5.egg',
'/usr/lib/python2.5/site-packages/Pygments-1.4-py2.5.egg',
'/usr/lib/python2.5/site-packages/Djblets-0.6.15-py2.5.egg',
'/usr/lib/python2.5/site-packages/django_evolution-0.6.5-py2.5.egg',
'/usr/lib/python2.5/site-packages/pycrypto-2.4.1-py2.5-linux-
i686.egg',
'/usr/lib/python2.5/site-packages/setuptools-0.6c12dev_r88846-
py2.5.egg',
'/usr/lib/python2.5/site-packages/psycopg2-2.4.4-py2.5-linux-
i686.egg',
'/usr/lib/python25.zip',
'/usr/lib/python2.5',
'/usr/lib/python2.5/plat-linux2',
'/usr/lib/python2.5/lib-tk',
'/usr/lib/python2.5/lib-dynload',
'/usr/local/lib/python2.5/site-packages',
'/usr/lib/python2.5/site-packages',
'/usr/lib/python2.5/site-packages/PIL',
'/var/lib/python-support/python2.5']
Server time: Fri, 6 Jan 2012 13:21:25 +0000
Error during template rendering
In template /usr/lib/python2.5/site-packages/ReviewBoard-1.6.3-
py2.5.egg/reviewboard/templates/reviews/review_header.html, error at
line 16
Invalid block tag: 'endif', expected 'else' or 'endifequal'
6 <h1>{% trans "This change has been marked as submitted." %}</h1>
7 {% ifuserorperm review_request.submitter
"reviews.can_change_status" %}
8 <input type="submit" id="btn-review-request-reopen"
9 value="{% trans "Reopen for Review" %}" />
10 <p><label for="changedescription">{% trans "Describe the
submission (optional):" %}</label></p>
11 <pre id="changedescription" class="editable">{{close_description}}
</pre>
12 {% endifuserorperm %}
13 {% ifnotuserandperm review_request.submitter
"reviews.can_change_status" %}
14 {% if close_description %}
15 <pre id="changedescription">{{close_description}}</pre>
16 {% endif %}
17 {% endifnotuserandperm %}
18 </div>
19 {% else %}
20 {% ifequal review_request.status 'D' %}
21 <div class="banner" id="discard-banner">
22 <h1>{% trans "This change has been discarded." %}</h1>
23 {% ifequal request.user review_request.submitter %}
24 <input type="submit" id="btn-review-request-reopen"
25 value="{% trans "Reopen for Review" %}" />
26 {% endifequal %}
Traceback Switch to copy-and-paste view
/usr/lib/python2.5/site-packages/django/core/handlers/base.py in
get_response
response = callback(request,
*callback_args, **callback_kwargs)
...
▶ Local vars
/usr/lib/python2.5/site-packages/ReviewBoard-1.6.3-py2.5.egg/
reviewboard/accounts/decorators.py in _check
return view_func(*args, **kwargs)
...
▶ Local vars
/usr/lib/python2.5/site-packages/ReviewBoard-1.6.3-py2.5.egg/
reviewboard/reviews/views.py in review_detail
'PRE_CREATION': PRE_CREATION,
...
▶ Local vars
/usr/lib/python2.5/site-packages/django/shortcuts/__init__.py in
render_to_response
return HttpResponse(loader.render_to_string(*args,
**kwargs), **httpresponse_kwargs)
...
▶ Local vars
/usr/lib/python2.5/site-packages/django/template/loader.py in
render_to_string
t = get_template(template_name)
...
▶ Local vars
/usr/lib/python2.5/site-packages/django/template/loader.py in
get_template
template, origin = find_template(template_name)
...
▶ Local vars
/usr/lib/python2.5/site-packages/django/template/loader.py in
find_template
source, display_name = loader(name, dirs)
...
▶ Local vars
/usr/lib/python2.5/site-packages/django/template/loader.py in
__call__
return self.load_template(template_name,
template_dirs)
...
▶ Local vars
/usr/lib/python2.5/site-packages/django/template/loader.py in
load_template
template = get_template_from_string(source,
origin, template_name)
...
▶ Local vars
/usr/lib/python2.5/site-packages/django/template/loader.py in
get_template_from_string
return Template(source, origin, name)
...
▶ Local vars
/usr/lib/python2.5/site-packages/django/template/base.py in
__init__
self.nodelist = compile_string(template_string,
origin)
...
▶ Local vars
/usr/lib/python2.5/site-packages/django/template/base.py in
compile_string
return parser.parse()
...
▶ Local vars
/usr/lib/python2.5/site-packages/django/template/base.py in parse
compiled_result = compile_func(self,
token)
...
▶ Local vars
/usr/lib/python2.5/site-packages/django/template/loader_tags.py in
do_extends
nodelist = parser.parse()
...
▶ Local vars
/usr/lib/python2.5/site-packages/django/template/base.py in parse
compiled_result = compile_func(self,
token)
...
▶ Local vars
/usr/lib/python2.5/site-packages/django/template/loader_tags.py in
do_block
nodelist = parser.parse(('endblock',))
...
▶ Local vars
/usr/lib/python2.5/site-packages/django/template/base.py in parse
compiled_result = compile_func(self,
token)
...
▶ Local vars
/usr/lib/python2.5/site-packages/django/template/loader_tags.py in
do_include
isolated_context=isolated_context)
...
▶ Local vars
/usr/lib/python2.5/site-packages/django/template/loader_tags.py in
__init__
t = get_template(template_path)
...
▶ Local vars
/usr/lib/python2.5/site-packages/django/template/loader.py in
get_template
template, origin = find_template(template_name)
...
▶ Local vars
/usr/lib/python2.5/site-packages/django/template/loader.py in
find_template
source, display_name = loader(name, dirs)
...
▶ Local vars
/usr/lib/python2.5/site-packages/django/template/loader.py in
__call__
return self.load_template(template_name,
template_dirs)
...
▶ Local vars
/usr/lib/python2.5/site-packages/django/template/loader.py in
load_template
template = get_template_from_string(source,
origin, template_name)
...
▶ Local vars
/usr/lib/python2.5/site-packages/django/template/loader.py in
get_template_from_string
return Template(source, origin, name)
...
▶ Local vars
/usr/lib/python2.5/site-packages/django/template/base.py in
__init__
self.nodelist = compile_string(template_string,
origin)
...
▶ Local vars
/usr/lib/python2.5/site-packages/django/template/base.py in
compile_string
return parser.parse()
...
▶ Local vars
/usr/lib/python2.5/site-packages/django/template/base.py in parse
compiled_result = compile_func(self,
token)
...
▶ Local vars
/usr/lib/python2.5/site-packages/django/template/defaulttags.py in
ifequal
return do_ifequal(parser, token, False)
...
▶ Local vars
/usr/lib/python2.5/site-packages/django/template/defaulttags.py in
do_ifequal
nodelist_true = parser.parse(('else', end_tag))
...
▶ Local vars
/usr/lib/python2.5/site-packages/django/template/base.py in parse
self.invalid_block_tag(token, command,
parse_until)
...
▶ Local vars
/usr/lib/python2.5/site-packages/django/template/base.py in
invalid_block_tag
(command, get_text_list(["'%s'" % p for p in
parse_until])))
...
▶ Local vars
Request information
GET
No GET data
POST
No POST data
FILES
No FILES data
COOKIES
Variable Value
rbsessionid
'18041b524b4c8826df09d49397b35f84'
META
Variable Value
AUTH_TYPE
None
HTTP_REFERER
'http://reviewboard/r/'
SERVER_SOFTWARE
'mod_python'
SCRIPT_NAME
''
REQUEST_METHOD
'GET'
PATH_INFO
u'/r/149/'
SERVER_PROTOCOL
'HTTP/1.1'
QUERY_STRING
None
CONTENT_LENGTH
0
HTTP_ACCEPT_CHARSET
'ISO-8859-1,utf-8;q=0.7,*;q=0.7'
REMOTE_USER
None
HTTP_CONNECTION
'keep-alive'
HTTP_COOKIE
'rbsessionid=18041b524b4c8826df09d49397b35f84'
SERVER_NAME
'reviewboard.ncipher.com'
REMOTE_ADDR
'172.23.136.135'
PATH_TRANSLATED
None
SERVER_PORT
80
HTTP_USER_AGENT
'Mozilla/5.0 (Windows NT 6.1; rv:8.0) Gecko/20100101 Firefox/8.0'
HTTP_HOST
'reviewboard'
HTTP_CACHE_CONTROL
'max-age=0'
HTTP_ACCEPT
'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
GATEWAY_INTERFACE
'CGI/1.1'
HTTP_ACCEPT_LANGUAGE
'en-gb,en;q=0.5'
REMOTE_IDENT
None
CONTENT_TYPE
None
REMOTE_HOST
None
HTTP_ACCEPT_ENCODING
'gzip, deflate'
Settings
Using settings module reviewboard.settings
Setting Value
CACHE_EXPIRATION_TIME
2592000
TEST_PACKAGES
['reviewboard']
USE_L10N
False
USE_THOUSAND_SEPARATOR
False
CSRF_COOKIE_SECURE
False
LDAP_URI
u'ldap://ncipheradpri.ncipher.com:389'
LANGUAGE_CODE
u'en-gb'
ROOT_URLCONF
'djblets.util.rooturl'
MANAGERS
((u'admin', u'[email protected]'),)
LDAP_BASE_DN
u'ou=ncipher,dc=ncipher,dc=com'
DEFAULT_CHARSET
'utf-8'
STATIC_ROOT
''
MESSAGE_STORAGE
'django.contrib.messages.storage.fallback.FallbackStorage'
EMAIL_SUBJECT_PREFIX
'[Review Board] '
SEND_BROKEN_LINK_EMAILS
False
URL_VALIDATOR_USER_AGENT
'Django/1.4 alpha 1 (http://www.djangoproject.com)'
STATICFILES_FINDERS
('django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder')
SESSION_COOKIE_DOMAIN
None
SESSION_COOKIE_NAME
'rbsessionid'
AWS_STORAGE_BUCKET_NAME
''
ADMIN_FOR
()
TIME_INPUT_FORMATS
('%H:%M:%S', '%H:%M')
DATABASES
{'default': {'ENGINE': 'django.db.backends.postgresql_psycopg2',
'HOST': 'psql-ssdis.ncipher.com',
'NAME': 'reviewboard',
'OPTIONS': {},
'PASSWORD': u'********************',
'PORT': '',
'TEST_CHARSET': None,
'TEST_COLLATION': None,
'TEST_MIRROR': None,
'TEST_NAME': None,
'TIME_ZONE': 'US/Pacific',
'USER': 'reviewboard'}}
LOCAL_ROOT
'/var/www/reviewboard'
FILE_UPLOAD_PERMISSIONS
None
FILE_UPLOAD_HANDLERS
('django.core.files.uploadhandler.MemoryFileUploadHandler',
'django.core.files.uploadhandler.TemporaryFileUploadHandler')
DEFAULT_CONTENT_TYPE
'text/html'
APPEND_SLASH
True
FIRST_DAY_OF_WEEK
0
DATABASE_ROUTERS
[]
LDAP_UID_MASK
u'sAMAccountName=%s'
YEAR_MONTH_FORMAT
u'F Y'
STATICFILES_STORAGE
'django.contrib.staticfiles.storage.StaticFilesStorage'
CACHES
{'default': {'BACKEND':
'django.core.cache.backends.memcached.CacheClass',
'LOCATION': 'localhost:11211'}}
SERVER_EMAIL
u'root@localhost'
SESSION_COOKIE_PATH
'/'
USE_X_FORWARDED_HOST
False
MIDDLEWARE_CLASSES
('django.middleware.gzip.GZipMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.doc.XViewMiddleware',
'django.middleware.http.ConditionalGetMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'djblets.siteconfig.middleware.SettingsMiddleware',
'reviewboard.admin.middleware.LoadSettingsMiddleware',
'djblets.log.middleware.LoggingMiddleware',
'reviewboard.admin.middleware.CheckUpdatesRequiredMiddleware',
'reviewboard.admin.middleware.X509AuthMiddleware',
'reviewboard.site.middleware.LocalSiteMiddleware')
USE_I18N
False
THOUSAND_SEPARATOR
','
SECRET_KEY
u'********************'
LANGUAGE_COOKIE_NAME
'rblanguage'
AJAX_SERIAL
1325853830
FILE_UPLOAD_TEMP_DIR
None
TRANSACTIONS_MANAGED
False
LOGGING_ENABLED
False
LDAP_EMAIL_DOMAIN
u'ncipher.com'
TEMPLATE_LOADERS
('django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader')
WSGI_APPLICATION
None
TEMPLATE_DEBUG
True
X_FRAME_OPTIONS
'SAMEORIGIN'
AUTHENTICATION_BACKENDS
('reviewboard.accounts.backends.LDAPBackend',
'reviewboard.accounts.backends.StandardAuthBackend')
FORCE_SCRIPT_NAME
None
CACHE_BACKEND
u'memcached://localhost:11211/'
SIGNING_BACKEND
'django.core.signing.TimestampSigner'
SESSION_COOKIE_SECURE
False
SITE_ROOT
'/'
CSRF_COOKIE_DOMAIN
None
FILE_CHARSET
'utf-8'
DEBUG
True
DOMAIN_METHOD
u'http'
SESSION_FILE_PATH
None
AWS_ACCESS_KEY_ID
''
DEFAULT_FILE_STORAGE
'django.core.files.storage.FileSystemStorage'
INSTALLED_APPS
('django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.markup',
'django.contrib.sites',
'django.contrib.sessions',
'djblets.datagrid',
'djblets.feedview',
'djblets.gravatars',
'djblets.log',
'djblets.siteconfig',
'djblets.util',
'djblets.webapi',
'reviewboard.accounts',
'reviewboard.admin',
'reviewboard.attachments',
'reviewboard.changedescs',
'reviewboard.diffviewer',
'reviewboard.notifications',
'reviewboard.reports',
'reviewboard.reviews',
'reviewboard.scmtools',
'reviewboard.site',
'reviewboard.webapi',
'django_evolution')
LANGUAGES
(('en', 'English'),)
COMMENTS_ALLOW_PROFANITIES
False
STATICFILES_DIRS
()
SITE_ROOT_URLCONF
'reviewboard.urls'
PREPEND_WWW
False
SECURE_PROXY_SSL_HEADER
None
PASSWORD_RESET_TIMEOUT_DAYS
u'********************'
SESSION_COOKIE_HTTPONLY
True
AWS_SECRET_ACCESS_KEY
u'********************'
DEBUG_PROPAGATE_EXCEPTIONS
False
MEDIA_URL
u'/media/'
MONTH_DAY_FORMAT
u'F j'
LOGIN_URL
'/account/login/'
SESSION_EXPIRE_AT_BROWSER_CLOSE
False
TIME_FORMAT
u'P'
DATE_INPUT_FORMATS
('%Y-%m-%d',
'%m/%d/%Y',
'%m/%d/%y',
'%b %d %Y',
'%b %d, %Y',
'%d %b %Y',
'%d %b, %Y',
'%B %d %Y',
'%B %d, %Y',
'%d %B %Y',
'%d %B, %Y')
CSRF_COOKIE_NAME
'csrftoken'
EMAIL_HOST_PASSWORD
u'********************'
MEDIA_SERIAL_DIRS
['admin', 'djblets', 'rb']
AUTH_PROFILE_MODULE
'accounts.Profile'
CACHE_MIDDLEWARE_ALIAS
'default'
SESSION_SAVE_EVERY_REQUEST
False
ADMIN_MEDIA_PREFIX
u'/media/admin/'
NUMBER_GROUPING
0
SESSION_ENGINE
'django.contrib.sessions.backends.db'
AWS_CALLING_FORMAT
2
CSRF_FAILURE_VIEW
'django.views.csrf.csrf_failure'
CSRF_COOKIE_PATH
'/'
LOGIN_REDIRECT_URL
'/accounts/profile/'
WEB_API_ENCODERS
('djblets.webapi.encoders.ResourceAPIEncoder',)
LDAP_TLS
False
LOGGING
{'disable_existing_loggers': False,
'filters': {'require_debug_false': {'()':
'django.utils.log.RequireDebugFalse'}},
'handlers': {'mail_admins': {'class':
'django.utils.log.AdminEmailHandler',
'filters': ['require_debug_false'],
'level': 'ERROR'}},
'loggers': {'django.request': {'handlers': ['mail_admins'],
'level': 'ERROR',
'propagate': True}},
'version': 1}
IGNORABLE_404_URLS
()
LOGGING_DIRECTORY
None
LOCALE_PATHS
()
TEMPLATE_STRING_IF_INVALID
''
LOGOUT_URL
'/accounts/logout/'
EMAIL_USE_TLS
False
FIXTURE_DIRS
()
EMAIL_HOST
u'mailrelay.ncipher.com'
DATE_FORMAT
u'N j, Y'
MEDIA_ROOT
u'/var/www/reviewboard/htdocs/media'
DEFAULT_EXCEPTION_REPORTER_FILTER
'django.views.debug.SafeExceptionReporterFilter'
ADMINS
((u'admin', u'[email protected]'),)
FORMAT_MODULE_PATH
None
DEFAULT_FROM_EMAIL
u'[email protected]'
LDAP_ANON_BIND_PASSWD
u'I1aTWctdp?'
MEDIA_SERIAL
1325602793
HTDOCS_ROOT
'/var/www/reviewboard/htdocs'
DATETIME_FORMAT
u'N j, Y, P'
TEMPLATE_DIRS
('/usr/lib/python2.5/site-packages/ReviewBoard-1.6.3-py2.5.egg/
reviewboard/templates',)
SITE_ID
1
DISALLOWED_USER_AGENTS
()
ALLOWED_INCLUDE_ROOTS
()
DECIMAL_SEPARATOR
'.'
LOGGING_NAME
'reviewboard'
SHORT_DATE_FORMAT
'm/d/Y'
REVIEWBOARD_ROOT
'/usr/lib/python2.5/site-packages/ReviewBoard-1.6.3-py2.5.egg/
reviewboard'
TEST_RUNNER
'reviewboard.test.RBTestRunner'
CACHE_MIDDLEWARE_KEY_PREFIX
''
TIME_ZONE
'GMT'
FILE_UPLOAD_MAX_MEMORY_SIZE
2621440
EMAIL_BACKEND
'django.core.mail.backends.smtp.EmailBackend'
NIS_EMAIL_DOMAIN
u''
DEFAULT_TABLESPACE
''
TEMPLATE_CONTEXT_PROCESSORS
('django.contrib.auth.context_processors.auth',
'django.core.context_processors.debug',
'django.core.context_processors.i18n',
'django.core.context_processors.media',
'django.core.context_processors.request',
'djblets.siteconfig.context_processors.siteconfig',
'djblets.util.context_processors.settingsVars',
'djblets.util.context_processors.siteRoot',
'djblets.util.context_processors.ajaxSerial',
'djblets.util.context_processors.mediaSerial',
'reviewboard.accounts.context_processors.auth_backends',
'reviewboard.admin.context_processors.version',
'reviewboard.site.context_processors.localsite')
SESSION_COOKIE_AGE
31536000
SETTINGS_MODULE
'reviewboard.settings'
USE_ETAGS
False
LOGGING_ALLOW_PROFILING
False
LANGUAGES_BIDI
('he', 'ar', 'fa')
DEFAULT_INDEX_TABLESPACE
''
INTERNAL_IPS
()
STATIC_URL
None
EMAIL_PORT
25
USE_TZ
False
SHORT_DATETIME_FORMAT
'm/d/Y P'
PASSWORD_HASHERS
u'********************'
ABSOLUTE_URL_OVERRIDES
{}
CACHE_MIDDLEWARE_SECONDS
600
LDAP_ANON_BIND_UID
u'[email protected]'
DATETIME_INPUT_FORMATS
('%Y-%m-%d %H:%M:%S',
'%Y-%m-%d %H:%M:%S.%f',
'%Y-%m-%d %H:%M',
'%Y-%m-%d',
'%m/%d/%Y %H:%M:%S',
'%m/%d/%Y %H:%M:%S.%f',
'%m/%d/%Y %H:%M',
'%m/%d/%Y',
'%m/%d/%y %H:%M:%S',
'%m/%d/%y %H:%M:%S.%f',
'%m/%d/%y %H:%M',
'%m/%d/%y')
LOGGING_CONFIG
'django.utils.log.dictConfig'
EMAIL_HOST_USER
''
PROFANITIES_LIST
u'********************'
--
Want to help the Review Board project? Donate today at
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/reviewboard?hl=en