diff --git a/library/layout/src/logger/shared_logger.e b/library/layout/src/logger/shared_logger.e index 35c4917..dbe04d9 100644 --- a/library/layout/src/logger/shared_logger.e +++ b/library/layout/src/logger/shared_logger.e @@ -83,7 +83,10 @@ feature {NONE} -- JSON create Result if attached json_file_from (a_path) as json_file then l_parser := new_json_parser (json_file) - if attached {JSON_OBJECT} l_parser.parse as jv and then l_parser.is_parsed and then + l_parser.parse_content + if + l_parser.is_valid and then + attached l_parser.parsed_json_object as jv and then attached {JSON_OBJECT} jv.item ("logger") as l_logger and then attached {JSON_STRING} l_logger.item ("backup_count") as l_count and then attached {JSON_STRING} l_logger.item ("level") as l_level then diff --git a/src/kernel/content/cms_block.e b/src/kernel/content/cms_block.e index 4da3f62..3782ab3 100644 --- a/src/kernel/content/cms_block.e +++ b/src/kernel/content/cms_block.e @@ -5,6 +5,9 @@ note deferred class CMS_BLOCK +inherit + DEBUG_OUTPUT + feature -- Access name: READABLE_STRING_8 @@ -35,4 +38,28 @@ feature -- Conversion deferred end +feature -- Status report + + debug_output: STRING_32 + -- String that should be displayed in debugger to represent `Current'. + do + create Result.make_from_string_general ("Block") + if is_raw then + Result.append_string_general (" ") + end + if not is_enabled then + Result.append_string_general (" ") + end + Result.append_character (' ') + Result.append_character ('[') + Result.append_string_general (name) + Result.append_character (']') + if attached title as l_title then + Result.append_character (' ') + Result.append_character ('%"') + Result.append (l_title) + Result.append_character ('%"') + end + end + end diff --git a/src/service/cms_service.e b/src/service/cms_service.e index 79e3576..c683006 100644 --- a/src/service/cms_service.e +++ b/src/service/cms_service.e @@ -119,6 +119,7 @@ feature -- Settings: router local l_root_handler: CMS_ROOT_HANDLER l_methods: WSF_REQUEST_METHODS + h: WSF_URI_HANDLER do log.write_debug (generator + ".configure_api_root") create l_root_handler.make (api) @@ -126,6 +127,7 @@ feature -- Settings: router l_methods.enable_get a_router.handle_with_request_methods ("/", l_root_handler, l_methods) a_router.handle_with_request_methods ("", l_root_handler, l_methods) + map_uri_agent_with_request_methods ("/favicon.ico", agent handle_favicon, a_router.methods_head_get) end configure_api_file_handler (a_router: WSF_ROUTER) @@ -238,6 +240,23 @@ feature -- Access feature -- Execution + handle_favicon (req: WSF_REQUEST; res: WSF_RESPONSE) + local + ut: FILE_UTILITIES + p: PATH + r: NOT_FOUND_ERROR_CMS_RESPONSE + f: WSF_FILE_RESPONSE + do + p := api.setup.theme_assets_location.extended ("favicon.ico") + if ut.file_path_exists (p) then + create f.make_with_path (p) + res.send (f) + else + create r.make (req, res, api) + r.execute + end + end + execute_default (req: WSF_REQUEST; res: WSF_RESPONSE) -- Default request handler if no other are relevant local diff --git a/src/theme/cms_theme.e b/src/theme/cms_theme.e index a038482..e5036b4 100644 --- a/src/theme/cms_theme.e +++ b/src/theme/cms_theme.e @@ -62,7 +62,7 @@ feature -- Conversion debug ("refactor_fixme") fixme ("Refactor HTML code to use the new Bootstrap theme template") end - if attached a_block.is_raw then + if a_block.is_raw then create s.make_empty if attached a_block.title as l_title then s.append ("
" + html_encoded (l_title) + "
")