docs(15.9): the search screen is now the bundled static theme - #543
Merged
Merged
Conversation
Fess 15.9 serves the search screen with the bundled static theme bootstrap whenever no other theme is selected, including after an upgrade, and renders errors in place with their real status. Document the switch and what clients see in upgrade.rst, stop the upgrade steps from copying the 15.8 bootstrap theme over the 15.9 one, add a section on customizing a copy of the bundled theme, and replace the per-virtual-host JSP instructions with a theme named after the virtual host. The theme guide gains the install-from-repository form of its page. All seven languages, 15.9 tree only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Since codelibs/fess#3460 the search screen (
/,/search,/advance,/help,/profile,/cache,/chatand the error pages) is always a static theme: whentheme.defaultis unset, the bundledbootstraptheme is used. A 15.8 installation that never chose a theme has notheme.default, so an upgrade switches it silently, and no setting brings the JSP search screen back. The 15.9 documentation did not say so, and several pages still described the JSP screen:install/upgrade.rstdid not mention the switch. It also did not say that errors are now rendered at the requested URL with the real status instead of a302to/error/*, or that withlogin.required=truethe page now returns200and/api/v2/*answers401.app/themes/.from the old installation. That directory also holds the bundledbootstraptheme, so following the step replaced the 15.9 search screen with the 15.8 version of the theme (1.0.5 over 1.3.0).dev/theme-development.rst, whose CSS and logo section sits under "JAR theme (legacy)" and said the search screen is built from JSPs.config/security-virtual-host.rsttold users to edit the per-virtual-host JSPs. They are still generated, but the search screen no longer uses them.admin/theme-guide.rstsaid there are two ways to install a theme and left out the install form on the Theme page itself (feat(theme): fetch and install static themes from a maven repository fess#3462).What changes
All seven languages (ja, en, de, es, fr, ko, zh-cn), 15.9 only.
install/upgrade.rst: new section "The Search Screen Is Now a Static Theme":/go/,/thumbnail/,/sso/metadata,/sso/logout,/api/v1/*, unknown URLs, uncaught exceptions and/error/*;login.requiredbehaviour.Step 3 now copies only the user's own theme directories, warns against copying
bootstrap, and points tobin/fess-setup install themefor published themes.dev/theme-development.rst: the overview now says the search screen is always a static theme. New section "Customizing the Bundled Theme":bootstrapand rename it intheme.yml;themes/bootstrap/references inindex.html. Without this step, the copy keeps loading the bundled CSS, logos and script, so edits do not show;Also:
spaFallbackis marked as no longer read,/advanceis added to the served paths, and the section describes the Content-Security-Policy on the entry HTML. The JAR theme section now says that since 15.9 it affects only the login screen.admin/theme-guide.rst:bootstrap;theme.repositoriesproperty.config/security-virtual-host.rst,config/multitenancy.rst(and the English-onlyconfig/virtual-host.rst): a per-host look is a static theme whose name is the virtual host name in lowercase. The generated JSPs are used only by the login screen.install/run.rst,install/install-docker.rst: the first-run pages say the search screen is the bundled static theme, and how to change it.The customization steps describe
index.htmlas it is onmaintoday: a copy must reference its own theme directory, so step 3 rewrites the four paths. codelibs/fess#3470 (not merged) would make that step unnecessary; if it lands, step 3 is the only part to update.Verification
codelibs/fesssource onmain:ThemeRegistry.resolveActiveTheme: virtual host, thentheme.default, thenbootstrap. Nothing is logged whentheme.defaultis unset.StaticThemeFilter: the served paths.spaFallbackis not read.ErrorPageServletandweb.xml: errors are rendered in place, withAccept-basedtext/plainbodies.GoAction,ThumbnailAction,SsoAction: the400and404responses.LoginRequirement: which/api/v2/endpoints need a login.StaticThemeInstaller:bootstrapis refused on upload and delete.ThemeArtifactHelperandadmin_theme.jsp: installing from the repository, with a checksum check.VirtualHostHelper: only the login actions still resolve per-host JSPs.index.html: fourthemes/bootstrap/references.i18n.jsandhelp.jsload relative toassets/app.js./serves the static theme;app/themes/.from 15.8 puts the 15.8bootstrapover the 15.9 one;bootstrapshows its own CSS, logo and footer only after itsindex.htmlpaths are changed;main;theme-customize-bundled,upgrade-159-static-theme,Installing from the Repository) resolve;