diff --git a/modules/weko-gridlayout/weko_gridlayout/utils.py b/modules/weko-gridlayout/weko_gridlayout/utils.py index d58e0aa1ca..cb0b1c56ac 100644 --- a/modules/weko-gridlayout/weko_gridlayout/utils.py +++ b/modules/weko-gridlayout/weko_gridlayout/utils.py @@ -40,6 +40,7 @@ FilesException, UnexpectedFileSizeError from invenio_files_rest.models import Bucket, Location, ObjectVersion from invenio_search import RecordsSearch +from invenio_search.utils import build_alias_name from simplekv.memory.redisstore import RedisStore from sqlalchemy import asc from sqlalchemy.orm.exc import MultipleResultsFound @@ -783,7 +784,7 @@ def get_elasticsearch_result_by_date(start_date, end_date, query_with_publish_st records_search = RecordsSearch() records_search = records_search.with_preference_param().params( version=False) - records_search._index[0] = current_app.config['SEARCH_UI_SEARCH_INDEX'] + records_search._index[0] = build_alias_name(current_app.config['SEARCH_UI_SEARCH_INDEX']) result = None try: search_instance, _qs_kwargs = item_search_factory( diff --git a/modules/weko-theme/weko_theme/assets/bootstrap3/js/weko_theme/widget.js b/modules/weko-theme/weko_theme/assets/bootstrap3/js/weko_theme/widget.js index 062d5a977a..83024e7e5b 100644 --- a/modules/weko-theme/weko_theme/assets/bootstrap3/js/weko_theme/widget.js +++ b/modules/weko-theme/weko_theme/assets/bootstrap3/js/weko_theme/widget.js @@ -314,8 +314,8 @@ const PageBodyGrid = function () { } let innerHTML = '
' + rssHtml + '
' + '
'; - for (let data in result) { - innerHTML += '
  • ' + result[data].name + '
  • '; + for (let data of result) { + innerHTML += '
  • ' + data.name + '
  • '; } innerHTML += '
    '; $("#" + id).append(innerHTML); @@ -340,12 +340,12 @@ const PageBodyGrid = function () { let mainLayoutTitle = ""; let childNavBar = ""; let navbarHeader = ""; - for (let i in endpoints) { // Create links + for (let point of endpoints) { // Create links let liClass = ''; let communityArgs = (repoID === DEFAULT_REPOSITORY) ? '' : '?community=' + repoID; - let title = endpoints[i].title; - let endpointsURL = endpoints[i].url; - if (endpoints[i].is_main_layout) { + let title = point.title; + let endpointsURL = point.url; + if (point.is_main_layout) { mainLayoutTitle = title; } else { if (window.location.pathname === endpointsURL) {