Compare commits

...

2 Commits

Author SHA1 Message Date
ab8a357137 Added logger output on error 500
Cherry picked and tweaked from
fdec916528
2025-06-06 16:34:32 +01:00
6cba9a6d2b Patch: revert static routes from package level to relative 2025-06-06 14:51:59 +01:00
9 changed files with 19 additions and 14 deletions

View File

@@ -8,4 +8,4 @@
"""Metadata for this python module.""" """Metadata for this python module."""
__version__ = "2025.6.6.2" __version__ = "2025.6.6.4"

View File

@@ -39,7 +39,7 @@
<title>{{ title }}</title> <title>{{ title }}</title>
{%- endblock head_title %} {%- endblock head_title %}
{%- block head_links %} {%- block head_links %}
<link rel="shortcut icon" href="{{ url_for('invenio_theme_iform.static', filename='favicon.ico') }}" /> <link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}" />
{%- if keywords %}<link rel="canonical" href="{{ canonical_url }}" />{% endif %} {%- if keywords %}<link rel="canonical" href="{{ canonical_url }}" />{% endif %}
{%- block head_links_langs %} {%- block head_links_langs %}
{%- if alternate_urls %} {%- if alternate_urls %}
@@ -58,7 +58,7 @@
<link <link
rel="apple-touch-icon-precomposed" rel="apple-touch-icon-precomposed"
sizes="{{ size }}x{{ size }}" sizes="{{ size }}x{{ size }}"
href="{{ url_for('invenio_theme_iform.static', filename=icon_name) }}" href="{{ url_for('static', filename=icon_name) }}"
/> />
{%- endfor %} {%- endfor %}
{%- endblock head_apple_icons %} {%- endblock head_apple_icons %}

View File

@@ -36,7 +36,7 @@
Log in with Log in with
{{ config.SSO_SAML_IDPS[name]['title']|default("SAML", true) }} {{ config.SSO_SAML_IDPS[name]['title']|default("SAML", true) }}
<img <img
src="{{ url_for('invenio_theme_iform.static', filename=config.INVENIO_THEME_IFORM_ICON) }}" src="{{ url_for('static', filename=config.INVENIO_THEME_IFORM_ICON) }}"
height="20px" height="20px"
/> />
</a> </a>

View File

@@ -47,7 +47,7 @@
> >
<span style="font-size: 18px;">Sign up with I-Form</span> <span style="font-size: 18px;">Sign up with I-Form</span>
<img <img
src="{{ url_for('invenio_theme_iform.static', filename=config.INVENIO_THEME_IFORM_ICON) }}" src="{{ url_for('static', filename=config.INVENIO_THEME_IFORM_ICON) }}"
height="20px" height="20px"
/> />
</a> </a>

View File

@@ -36,7 +36,7 @@
{%- endblock head_title %} {%- endblock head_title %}
{%- block head_links %} {%- block head_links %}
<link rel="shortcut icon" href="{{ url_for('inveino_theme_iform.static', filename='favicon.ico') }}" /> <link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}" />
{%- if keywords %} {%- if keywords %}
<link rel="canonical" href="{{ canonical_url }}" /> <link rel="canonical" href="{{ canonical_url }}" />

View File

@@ -132,7 +132,7 @@
title="invenioRDM" title="invenioRDM"
> >
<img <img
src="{{ url_for('invenio_theme_iform.static', filename='images/inveniordm-tail.svg') }}" src="{{ url_for('static', filename='images/inveniordm-tail.svg') }}"
alt="InvenioRDM logo" alt="InvenioRDM logo"
style="display: block; height: 90px; margin-top: 8px;" style="display: block; height: 90px; margin-top: 8px;"
/> />
@@ -148,7 +148,7 @@
title="Science Foundation Ireland" title="Science Foundation Ireland"
> >
<img <img
src="{{ url_for('invenio_theme_iform.static', filename='images/SFI_logo.png') }}" src="{{ url_for('static', filename='images/SFI_logo.png') }}"
alt="Science Foundation Ireland" alt="Science Foundation Ireland"
style="display: block; height: auto; margin-top: 15px; width: 230px;" style="display: block; height: auto; margin-top: 15px; width: 230px;"
/> />

View File

@@ -15,7 +15,7 @@
<a href="{{ creators.identifiers.orcid|pid_url('orcid') }}" target="_blank" <a href="{{ creators.identifiers.orcid|pid_url('orcid') }}" target="_blank"
><img ><img
class="inline-orcid" class="inline-orcid"
src="{{ url_for('invenio_theme_iform.static', filename='extra/orcid.png') }}" src="{{ url_for('static', filename='extra/orcid.png') }}"
/></a> /></a>
{%- endif %} {%- endif %}

View File

@@ -33,7 +33,7 @@
<img <img
width="400px" width="400px"
alt="Research Results" alt="Research Results"
src="{{ url_for('invenio_theme_iform.static', filename='images/diamond.svg') }}" src="{{ url_for('static', filename='images/diamond.svg') }}"
/> />
</a> </a>
<div class="ui right floated text"> <div class="ui right floated text">
@@ -48,7 +48,7 @@
<img <img
width="400px" width="400px"
alt="Communities" alt="Communities"
src="{{ url_for('invenio_theme_iform.static', filename='images/group-discussion.svg') }}" src="{{ url_for('static', filename='images/group-discussion.svg') }}"
/> />
</a> </a>
<div>Overview: Description of Communities</div> <div>Overview: Description of Communities</div>
@@ -61,7 +61,7 @@
<img <img
width="400px" width="400px"
alt="Requests" alt="Requests"
src="{{ url_for('invenio_theme_iform.static', filename='images/umbrella.svg') }}" src="{{ url_for('static', filename='images/umbrella.svg') }}"
/> />
</a> </a>
<div>Overview: Description of Requests</div> <div>Overview: Description of Requests</div>
@@ -112,7 +112,7 @@
<img <img
width="400px" width="400px"
alt="Research Results" alt="Research Results"
src="{{ url_for('invenio_theme_iform.static', filename='images/diamond.svg') }}" src="{{ url_for('static', filename='images/diamond.svg') }}"
/> />
</div> </div>
<div class="ui right floated text"> <div class="ui right floated text">
@@ -143,7 +143,7 @@
<img <img
width="400px" width="400px"
alt="Open Educational Resources" alt="Open Educational Resources"
src="{{ url_for('invenio_theme_iform.static', filename='images/play.svg') }}" src="{{ url_for('static', filename='images/play.svg') }}"
/> />
</a> </a>
<div>Overview: Description for open educational resources</div> <div>Overview: Description for open educational resources</div>

View File

@@ -8,6 +8,7 @@
"""invenio module for I-Form theme.""" """invenio module for I-Form theme."""
import traceback
from functools import wraps from functools import wraps
from typing import Dict from typing import Dict
@@ -121,6 +122,10 @@ def default_error_handler(e: Exception):
# - `e`, the passed-in exception # - `e`, the passed-in exception
# to get proxied-to objects: `flask.request._get_current_object()` # to get proxied-to objects: `flask.request._get_current_object()`
msg = f"default_error_handler of invenio-theme-iform captured following error type: {
type(e)
} with message {e} and stack trace {traceback.format_exc()}"
current_app.logger.error(msg)
return render_template(current_app.config["THEME_500_TEMPLATE"]), 500 return render_template(current_app.config["THEME_500_TEMPLATE"]), 500