@arbrandes additionally I believe google analytics 4 may be breaking the generation of certificates? Does the “ga_4_id” in the below error refer to the Google Analytics 4 ID? The below is the error I get when I simply try to preview the certificate on a test page. (And when I remove the GA4 stuff it seems to go away…)
lms-1 | 2024-04-11 11:31:13,043 INFO 7 [lms.djangoapps.certificates.views.webview] [user 3] [ip 45.88.220.222] webview.py:598 - certificate language is: en for the course: course-v1:deleteme_test2+deleteme_test2+deleteme_test2
lms-1 | 2024-04-11 11:31:13,054 ERROR 7 [common.djangoapps.util.views] [user 3] [ip 45.88.220.222] views.py:148 - Error in django view.
lms-1 | Traceback (most recent call last):
lms-1 | File "/openedx/edx-platform/common/djangoapps/util/views.py", line 139, in inner
lms-1 | return func(request, *args, **kwargs)
lms-1 | File "/openedx/venv/lib/python3.8/site-packages/edx_django_utils/plugins/pluggable_override.py", line 77, in wrapper
lms-1 | return prev_fn(*args, **kwargs)
lms-1 | File "/openedx/edx-platform/./lms/djangoapps/certificates/views/webview.py", line 666, in render_html_view
lms-1 | response = _render_valid_certificate(request, context, custom_template)
lms-1 | File "/openedx/edx-platform/./lms/djangoapps/certificates/views/webview.py", line 756, in _render_valid_certificate
lms-1 | return render_to_response("certificates/valid.html", context)
lms-1 | File "/openedx/edx-platform/common/djangoapps/edxmako/shortcuts.py", line 188, in render_to_response
lms-1 | return HttpResponse(render_to_string(template_name, dictionary, namespace, request), **kwargs)
lms-1 | File "/openedx/edx-platform/common/djangoapps/edxmako/shortcuts.py", line 178, in render_to_string
lms-1 | return template.render(dictionary, request)
lms-1 | File "/openedx/edx-platform/common/djangoapps/edxmako/template.py", line 82, in render
lms-1 | return self.mako_template.render_unicode(**context_dictionary)
lms-1 | File "/openedx/venv/lib/python3.8/site-packages/mako/template.py", line 444, in render_unicode
lms-1 | return runtime._render(
lms-1 | File "/openedx/venv/lib/python3.8/site-packages/mako/runtime.py", line 874, in _render
lms-1 | _render_context(
lms-1 | File "/openedx/venv/lib/python3.8/site-packages/mako/runtime.py", line 916, in _render_context
lms-1 | _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
lms-1 | File "/openedx/venv/lib/python3.8/site-packages/mako/runtime.py", line 943, in _exec_template
lms-1 | callable_(context, *args, **kwargs)
lms-1 | File "/tmp/mako_lms/1ff981c2157d500713c1ce6bf7fdbce2/certificates/accomplishment-base.html.py", line 95, in render_body
lms-1 | __M_writer(js_escaped_string(ga_4_id ))
lms-1 | TypeError: 'Undefined' object is not callable
lms-1 | [pid: 7|app: 0|req: 127/457] 172.18.0.4 () {60 vars in 3737 bytes} [Thu Apr 11 11:31:13 2024] GET /certificates/course/course-v1:deleteme_test2+deleteme_test2+deleteme_test2?preview=honor => generated 10105 bytes in 79 msecs (HTTP/1.1 200) 7 headers in 502 bytes (1 switches on core 0)