Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two alerts displayed in admin settings to reload the current tenant #14286

Closed
agriffard opened this issue Sep 7, 2023 · 9 comments · Fixed by #14299
Closed

Two alerts displayed in admin settings to reload the current tenant #14286

agriffard opened this issue Sep 7, 2023 · 9 comments · Fixed by #14299
Assignees
Milestone

Comments

@agriffard
Copy link
Member

The /Admin/Settings/email page displays 2 identical warning alerts:
The current tenant will be reloaded when the settings are saved.

image

@agriffard
Copy link
Member Author

/Admin/Settings/localization too.

@hishamco hishamco self-assigned this Sep 7, 2023
@agriffard agriffard changed the title Email settings displays two alerts Two alerts displayed in admin settings to reload the current tenant Sep 8, 2023
@ns8482e
Copy link
Contributor

ns8482e commented Sep 9, 2023

Maybe added twice by notifier service?

@agriffard
Copy link
Member Author

/Admin/Settings/SecurityHeader

@jtkech
Copy link
Member

jtkech commented Sep 11, 2023

The easiest way is to remove the alert from Settings-General.Wrapper.cshtml where it has been added, and re-add the alert in Settings.Edit.cshtml. So that we don't have to check where we need or not to remove the alert in all other dedicated settings shape views.

@MikeAlhayek
Copy link
Member

@jtkech the notification is needed in the wrapper. But we should only apply the wrapper when the group is general. I'll submit a PR

@jtkech
Copy link
Member

jtkech commented Sep 11, 2023

Okay so maybe the right fix is in the driver

        if (context.GroupId.Equals(GroupId, StringComparison.OrdinalIgnoreCase))
        {
            context.Shape.Metadata.Wrappers.Add("Settings_Wrapper__General");
        }

@jtkech
Copy link
Member

jtkech commented Sep 11, 2023

Or just

        if (!context.GroupId.Equals(GroupId, StringComparison.OrdinalIgnoreCase))
        {
            return Task.FromResult<IDisplayResult>(null);
        }

@MikeAlhayek
Copy link
Member

@jtkech yes that is what I suggested in the PR #14315

@jtkech
Copy link
Member

jtkech commented Sep 11, 2023

Okay then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants