Closed amardesi closed 5 years ago
Hi @amardesi,
v1.3.4 introduces default setting values When upgrading from previous versions, one has to run the command python3 src/manage.py load_default_settings
to load the default values into the database. This is the mechanism we will use to introduce new settings into Janeway from now on, so there is no need to copy the new settings to all the journals anymore. I've added a short upgrade guide to v1.3.4 release notes: https://github.com/BirkbeckCTP/janeway/releases/tag/v1.3.4
Thank you!
Describe the bug From the root level Manager page
Janeway version 1.3.4
To Reproduce Steps to reproduce the behavior:
DoesNotExist at /manager/settings/journal/ SettingValueTranslation matching query does not exist. Request Method: GET Request URL: http://pub-janeway2-dev.escholarship.org/manager/settings/journal/?journal=7 Django Version: 1.11.20 Exception Type: DoesNotExist Exception Value:
SettingValueTranslation matching query does not exist. Exception Location: /apps/eschol/.janewayenv/lib/python3.7/site-packages/django/db/models/query.py in get, line 380 Python Executable: /usr/bin/python3 Python Version: 3.7.2 Python Path:
['/apps/eschol/janeway/src', '/apps/eschol/.janewayenv/lib64/python37.zip', '/apps/eschol/.janewayenv/lib64/python3.7', '/apps/eschol/.janewayenv/lib64/python3.7/lib-dynload', '/usr/lib64/python3.7', '/usr/lib/python3.7', '/apps/eschol/.janewayenv/lib/python3.7/site-packages', '/apps/eschol/.janewayenv/src/django-bootstrap4', '/apps/eschol/.janewayenv/src/foundationform', '/apps/eschol/.janewayenv/src/django-mailgun', '/apps/eschol/.janewayenv/src/django-simple-math-captcha', '/apps/eschol/.janewayenv/src/dynamicsites', '/apps/eschol/.janewayenv/src/ebooklib', '/apps/eschol/.janewayenv/src/django-materialize', '/apps/eschol/janeway/src/plugins'] Server time: Thu, 18 Apr 2019 15:17:43 -0700 Traceback Switch to copy-and-paste view /apps/eschol/janeway/src/utils/setting_handler.py in _get_setting journal=journal, ... ▶ Local vars /apps/eschol/.janewayenv/lib/python3.7/site-packages/django/db/models/query.py in get self.model._meta.object_name ... ▶ Local vars During handling of the above exception (SettingValueTranslation matching query does not exist.), another exception occurred: /apps/eschol/.janewayenv/lib/python3.7/site-packages/django/core/handlers/exception.py in inner response = get_response(request) ... ▶ Local vars /apps/eschol/.janewayenv/lib/python3.7/site-packages/django/core/handlers/base.py in _legacy_get_response response = self._get_response(request) ... ▶ Local vars /apps/eschol/.janewayenv/lib/python3.7/site-packages/django/core/handlers/base.py in _get_response response = self.process_exception_by_middleware(e, request) ... ▶ Local vars /apps/eschol/.janewayenv/lib/python3.7/site-packages/django/core/handlers/base.py in _get_response response = wrapped_callback(request, *callback_args, *callback_kwargs) ... ▶ Local vars /apps/eschol/janeway/src/security/decorators.py in wrapper return func(request, args, **kwargs) ... ▶ Local vars /apps/eschol/janeway/src/core/views.py in edit_settings_group settings, setting_group = logic.get_settings_to_edit(group, journal) ... ▶ Local vars /apps/eschol/janeway/src/core/logic.py in get_settings_to_edit settings = process_setting_list(journal_settings, 'general', journal) ... ▶ Local vars /apps/eschol/janeway/src/core/logic.py in process_setting_list 'object': setting_handler.get_setting(type, setting, journal), ... ▶ Local vars /apps/eschol/janeway/src/utils/setting_handler.py in get_setting setting_group, setting, journal, lang, create, fallback, default) ... ▶ Local vars /apps/eschol/janeway/src/utils/setting_handler.py in _get_setting lang, create, fallback, ... ▶ Local vars /apps/eschol/janeway/src/utils/setting_handler.py in _get_setting journal=journal, ... ▶ Local vars /apps/eschol/.janewayenv/lib/python3.7/site-packages/django/db/models/query.py in get self.model._meta.object_name ... ▶ Local vars Request information USER CDL SuperUser
GET Variable Value journal '7' POST No POST data
FILES No FILES data
COOKIES Variable Value csrftoken 'fR9jTVrs4zmWc8gfRYkLJiHm7dzd78ETqPFH745vrnuPbnJxUKrMX7m1kpV534nL' JANEWAYSESSID 'ykvv4kqh4q4hdctjsaiqay8m4mxlrzhq' META Variable Value CONTEXT_DOCUMENT_ROOT '/apps/eschol/apache/htdocs' CONTEXT_PREFIX
<_io.TextIOWrapper name=''' CSRF_COOKIE 'fR9jTVrs4zmWc8gfRYkLJiHm7dzd78ETqPFH745vrnuPbnJxUKrMX7m1kpV534nL' DOCUMENT_ROOT '/apps/eschol/apache/htdocs' GATEWAY_INTERFACE 'CGI/1.1' HTTP_ACCEPT 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3' HTTP_ACCEPT_ENCODING
'gzip, deflate' HTTP_ACCEPT_LANGUAGE
'en-US,en;q=0.9' HTTP_CACHE_CONTROL
'max-age=0' HTTP_CONNECTION 'keep-alive' HTTP_COOKIE ('csrftoken=fR9jTVrs4zmWc8gfRYkLJiHm7dzd78ETqPFH745vrnuPbnJxUKrMX7m1kpV534nL; ' 'JANEWAYSESSID=ykvv4kqh4q4hdctjsaiqay8m4mxlrzhq') HTTP_HOST 'pub-janeway2-dev.escholarship.org' HTTP_REFERER
'http://pub-janeway2-dev.escholarship.org/manager/' HTTP_UPGRADE_INSECURE_REQUESTS
'1' HTTP_USER_AGENT ('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, ' 'like Gecko) Chrome/73.0.3683.103 Safari/537.36') PATH_INFO '/manager/settings/journal/' PATH_TRANSLATED '/apps/eschol/janeway/src/core/wsgi.py/manager/settings/journal/' QUERY_STRING
'journal=7' REMOTE_ADDR '128.48.204.65' REMOTE_PORT '65104' REQUEST_METHOD
'GET' REQUEST_SCHEME
'http' REQUEST_URI '/manager/settings/journal/?journal=7' SCRIPT_FILENAME '/apps/eschol/janeway/src/core/wsgi.py' SCRIPT_NAME '' SCRIPT_URI
'http://pub-janeway2-dev.escholarship.org:18880/manager/settings/journal/' SCRIPT_URL
'/manager/settings/journal/' SERVER_ADDR '172.31.20.67' SERVER_ADMIN
'info@escholarship.org' SERVER_NAME 'pub-janeway2-dev.escholarship.org' SERVER_PORT '18880' SERVER_PROTOCOL 'HTTP/1.1' SERVER_SIGNATURE
'' SERVER_SOFTWARE 'Apache/2.4.37 () mod_wsgi/4.6.5 Python/3.7' apache.version
(2, 4, 37) mod_wsgi.application_group
'' mod_wsgi.callable_object
'application' mod_wsgi.daemon_connects
'1' mod_wsgi.daemon_restarts
'0' mod_wsgi.daemon_start '1555625863719458' mod_wsgi.enable_sendfile
'0' mod_wsgi.handler_script '' mod_wsgi.ignore_activity
'0' mod_wsgi.listener_host
'pub-janeway2-dev.escholarship.org' mod_wsgi.listener_port
'18880' mod_wsgi.path_info
'/manager/settings/journal/' mod_wsgi.process_group
'janeway' mod_wsgi.queue_start
'1555625863719253' mod_wsgi.request_handler
'wsgi-script' mod_wsgi.request_id 'yagCXxWbu/4' mod_wsgi.request_start
'1555625863719113' mod_wsgi.script_name
'' mod_wsgi.script_reloading '1' mod_wsgi.script_start '1555625863719547' mod_wsgi.thread_id
1 mod_wsgi.thread_requests
48 mod_wsgi.total_requests 96 mod_wsgi.version
(4, 6, 5) wsgi.errors