fix(admin/theme): remove duplicate <la:errors> rendering on theme list page#3179
Merged
Conversation
…t page The theme admin list page rendered a bare <la:errors/> together with <la:errors property="_global"/> and <la:errors property="name"/> in the same message block. Because a bare <la:errors/> already outputs errors for every property, any global action error (for example a failed theme reload or a theme-not-found error) was shown twice. The property="name" tag was also dead code, since the list flow never registers errors under the "name" property. Keep only the bare <la:errors/> so each error is displayed exactly once, consistent with the other admin list pages (dict, backup, maintenance, plugin, storage, log).
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.
Problem
On the theme admin list page (
admin_theme.jsp), the message block rendered a bare<la:errors/>and two property-specific tags:A bare
<la:errors/>already outputs the errors of every property, so any global action error (for example a failed theme reload or a theme-not-found error, whichAdminThemeActionregisters under the global property) was rendered twice on the screen.In addition,
<la:errors property="name"/>was dead code: the theme list flow never registers errors under thenameproperty (ThemeListFormonly has adefaultThemefield).This is the only admin page that combined a bare
<la:errors/>with property-specific<la:errors>tags in the same block; all sibling list pages use a single bare<la:errors/>.Fix
Keep only the bare
<la:errors/>, removing the two redundant property-specific tags. Every error is now displayed exactly once, and no error is dropped (the bare tag still covers_globalas well as field errors such asdefaultTheme). This matches the other admin list pages (dict,backup,maintenance,plugin,storage,log).How to reproduce
Trigger any global error on the theme list page (e.g. a theme reload failure). Before the fix the message appears twice; after the fix it appears once.