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

NopTabsTagHelper - You can no longer add a class attribute to a tab #5325

Closed
AndreiMaz opened this issue Feb 8, 2021 · 1 comment
Closed

Comments

@AndreiMaz
Copy link
Member

nopCommerce version: 4.40 develop

Found an issue in the NopTabsTagHelper class. You can no longer add a class attribute to a tab. The application returns an error InvalidOperationException: The collection already contains an entry with key 'class'.
That's due to the fact that you've added the followin line in the NopTabsTagHelper.cs line 263:
tabTitle.AddCssClass("nav-item");

and after that on line 284 you do this:
if (context.AllAttributes.ContainsName("class"))
tabTitle.Attributes.Add("class", context.AllAttributes["class"].Value.ToString());

However, there is already a class key in the dictionary which results in the error mentioned above.

Source: https://www.nopcommerce.com/en/boards/topic/90152/nopcommerce-440-bug-fixes-and-improvements/page/2#280810

@DmitriyKulagin
Copy link
Contributor

Closed #5325

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

No branches or pull requests

2 participants