Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settings page is broken after localizing Arches 7.6.x #11773

Closed
tris-ots opened this issue Feb 6, 2025 · 2 comments
Closed

Settings page is broken after localizing Arches 7.6.x #11773

tris-ots opened this issue Feb 6, 2025 · 2 comments

Comments

@tris-ots
Copy link

tris-ots commented Feb 6, 2025

Every time I localize Arches to Haitian or metropolitan French, following the current Localizations instructions on Readthedocs, the Settings page seems to break. I've reproduced this problem on four Arches installs, running 7.6.0, 7.6.4, and 7.6.6.

I checked settings.py and urls.py, to make sure the right import statements, middleware, and so on were set properly, ran the django-admin makemessages and compilemessages commands successfully, and restarted Arches afterward. The only errors I got were makemessages telling me that it had skipped various License.txt files due to an invalid start byte. On all four systems, Arches seems to work fine other than the broken system settings page. At @chrabyrd 's suggestion, i ran python manage.py graph publish --update and got a message that it was Publishing ... Arches System Settings , but the same error remained after restarting Arches and force refreshing the page.

Expected behavior:
The French Settings page looks and functions like the normal English Settings page, but in French :)

Actual behavior:
The metropolitan or Haitian French Settings page returns this error:

AttributeError at /fr-ht/settings/ (or /fr-fr/settings/)
'NoneType' object has no attribute 'serialized_graph'

In some but not all cases, the English Settings page is still visible and usable at domain:/en/settings

I dug through the system logs on one of these machines and found the following more detailed error message:


Internal Server Error: /fr-fr/settings/
Traceback (most recent call last):
  File "/opt/arches/.venv/lib/python3.11/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/arches/.venv/lib/python3.11/site-packages/django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/arches/.venv/lib/python3.11/site-packages/django/views/generic/base.py", line 104, in view
    return self.dispatch(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/arches/.venv/lib/python3.11/site-packages/django/utils/decorators.py", line 46, in _wrapper
    return bound_method(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/arches/.venv/lib/python3.11/site-packages/django/contrib/auth/decorators.py", line 23, in _wrapper_view
    return view_func(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/arches/.venv/lib/python3.11/site-packages/django/views/generic/base.py", line 143, in dispatch
    return handler(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/arches/.venv/lib/python3.11/site-packages/django/utils/decorators.py", line 46, in _wrapper
    return bound_method(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/arches/arches_source/arches/app/utils/decorators.py", line 91, in wrapper
    return function(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/arches/arches_source/arches/app/views/resource.py", line 289, in get
    serialized_graph = published_graph.serialized_graph
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'serialized_graph'
django.core.exceptions.ImproperlyConfigured: Using i18n_patterns in an included URLconf is not allowed.
@chiatt chiatt added this to pipeline Feb 6, 2025
@kfogel
Copy link
Contributor

kfogel commented Feb 7, 2025

Adding link to related forum thread.

@tris-ots
Copy link
Author

tris-ots commented Feb 9, 2025

This issue was due to me entering the LANGUAGES code for french as fr-FR instead of fr-fr. Correcting this, rerunning makemessages and compilemessages (unsure if this was necessary) and then python manage.py graph publish --update, followed by restarting Arches, fixed the Settings page.

@tris-ots tris-ots closed this as completed Feb 9, 2025
@github-project-automation github-project-automation bot moved this to ✅ Done in pipeline Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants