nopCommerce 4.50 -Suggestions, bug reports and improvements

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
2 years ago
Hi nopCommerce team/community,

We are once again very excited about the upcoming version of nopCommerce 4.50, especially the move to .NET 6.

We would like to congratulate the whole nopCommerce team for the job well done (as usual)!!!

We are opening this thread to share issues and suggestions from developers so they can be addressed before the release of the new version.

So we will post anything we find as a bug, a breaking change, could be improved or is still missing in nopCommerce 4.50 in this thread in a separate post.

Important: We would like to keep this thread strictly related to development issues/suggestions only so please don't write with any suggestions for new features etc. as it makes it harder for the nopCommerce team to follow and take appropriate actions.

Keep up the good work guys!

Thanks,
Nop-Templates Dev Team
2 years ago
Hi guys,

Is there a reason why we can't include the js scripts of the plugins to the Javascript bundle?

For example the Nivo Slider won't work if its script is part of the js bundle and the same applies with any other plugins.

Is this supposed to be like this or it is a bug?

If this is by design then I can foresee a lot of angry store owners as they usually try to beat Google Page Speed tests and bundling is a major part of having a good score.

p.s: Each of our themes come with at least 12 plugins which means you will end up with many js files not part of the bundle and the scores will automatically be low on Google Page Speed.

Thanks,
Boyko
2 years ago
Nop-Templates.com wrote:
Hi guys,

Is there a reason why we can't include the js scripts of the plugins to the Javascript bundle?

For example the Nivo Slider won't work if its script is part of the js bundle and the same applies with any other plugins.


Hi! We've added some clarifications that you can find here. In the case of OOTB Nova Slider, it uses jQuery in scripts but registered much earlier. We're making efforts to contribute to the library, but not always promptly as we would like.
2 years ago
alexey.a wrote:

Hi! We've added some clarifications that you can find here. In the case of OOTB Nova Slider, it uses jQuery in scripts but registered much earlier. We're making efforts to contribute to the library, but not always promptly as we would like.


Hi Alexey,

Thank you for the clarification!

I hope this will be fixed prior to 4.5 being released (fingers crossed)!

Please don't release nopCommerce 4.50 without this being fixed as it will be a nightmare for us to support our clients as otherwise we will simply not recommend them upgrading to 4.50 until this is corrected.

How could we add script parts now as before with Add/Append as sometimes we need to add script parts first (prior to any other scripts) from different plugins without caring about the order of the plugins being called i.e shared js libraries etc.?

Thanks,
Boyko
2 years ago
Hi Alexey,

Maybe I wasn't clear enough in my previous post but I will try to illustrate the problem better now.

In the previous versions of nopCommerce we had two options for adding CSS and JS files  - Add and Append.
In the theme's Head file we have always used to use AppendCSS to ensure that the theme's css files will be loaded prior to any plugins' css files.
This way the plugins reuse the styling from the theme and are able to override certain elements if needed.

Unfortunately, in the new version of nopCommerce we don't see a way to do this as the only option we have is to use the <link> tag that adds the files in the order they have been executed in the code.
For example, now the styling of the Nivo slider is loaded prior to the styling of the theme and this also applies to any other plugins.

So at the moment the styling of the theme is loaded after the stylings of all the plugins, which is a problem as it is a breaking change and could cause a lot of styling issues in the themes and plugins.

I hope you have already thought about this and will provide us with an option to keep the order of the files the same as it used to be in previous versions of nopCommerce.

p.s: We would need the same mechanism for js files as there are cases where we need to add certain js files to be loaded first and we can't do this with the <script> tag at the moment.

Thank you,
Boyko
2 years ago
Nop-Templates.com wrote:
Hi Alexey,

I hope you have already thought about this and will provide us with an option to keep the order of the files the same as it used to be in previous versions of nopCommerce.

p.s: We would need the same mechanism for js files as there are cases where we need to add certain js files to be loaded first and we can't do this with the <script> tag at the moment.

Thank you,
Boyko


Hi! I apologize for the long wait. We're implementing this feature at the moment and should release it with the 4.50 version.
2 years ago
Hi guys,

It seems like you have removed the EntityFromSqlAsync method from the IRepository interface and from the EntityRepository respectively.
We use this method to call a stored procedure (yes we still use stored procedures in some of our plugins) so we need some alternative method we could use to call a stored procedure now.
I don't seem to find how to do it in nopCommerce 4.50.

Have you thought about this and could you please advise on what we should use now?

p.s: Please note that probably there are other nopCommerce vendors still using stored procedures for their plugins and also many customizations of nopCommerce require the usage of stored procedures.

Thanks,
Boyko
2 years ago
Nop-Templates.com wrote:
Please note that probably there are other nopCommerce vendors still using stored procedures for their plugins and also many customizations of nopCommerce require the usage of stored procedures.

Fully agree with it, sometimes we need to use store procedure for customization.
And for complex, large and performance optimized DB operation, we still prefer store procedure over Linq query!
2 years ago
Hi guys,

I randomly get the following error about 1 out of every 200-300 requests either in the administration or in the public page:

System.ArgumentException: The route "/css/PluginList.styles.admin.css" was already specified (Parameter 'route')
  at WebOptimizer.AssetPipeline.AddBundle(String route, String contentType, String[] sourceFiles)
  at WebOptimizer.TagHelpersDynamic.Helpers.AddBundleByKey(IAssetPipeline pipeline, String route, String contentType)
  at WebOptimizer.TagHelpersDynamic.Helpers.CreateCssAsset(IAssetPipeline pipeline, String key)
  at WebOptimizer.TagHelpersDynamic.Helpers.GetOrCreateAssetByKey(IAssetPipeline pipeline, String key, Func`3 createAsset)
  at WebOptimizer.TagHelpersDynamic.Helpers.HandleBundle(Func`3 createAsset, IAssetPipeline pipeline, TagHelperOutput output, ActionContext actionContext, WebOptimizerOptions options, String attrName, String attrValue, String bundleKey, String destBundleKey)
  at WebOptimizer.Extensions.TagHelperExtensions.HandleCssBundle(TagHelperOutput output, IAssetPipeline pipeline, ActionContext actionContext, WebOptimizerOptions options, String href, String bundleKey, String destBundleKey)
  at Nop.Web.Framework.TagHelpers.Shared.NopLinkTagHelper.ProcessAsync(TagHelperContext context, TagHelperOutput output) in C:\dev\Nop-Templates\nopCommerce_4.5\Presentation\Nop.Web.Framework\TagHelpers\Shared\NopLinkTagHelper.cs:line 135
  at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.RunAsync(TagHelperExecutionContext executionContext)
  at AspNetCore._Areas_Admin_Views_Shared__AdminScripts.ExecuteAsync() in C:\dev\Nop-Templates\nopCommerce_4.5\Presentation\Nop.Web\Areas\Admin\Views\Shared\_AdminScripts.cshtml:line 15
  at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context)
  at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, Boolean invokeViewStarts)
  at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context)
  at Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper.RenderPartialCoreAsync(String partialViewName, Object model, ViewDataDictionary viewData, TextWriter writer)
  at AspNetCore._Areas_Admin_Views_Shared_AdminLayout.<>c_DisplayClass30_0.<<ExecuteAsync>b__0>d.MoveNext() in C:\dev\Nop-Templates\nopCommerce_4.5\Presentation\Nop.Web\Areas\Admin\Views\Shared\_AdminLayout.cshtml:line 46
--- End of stack trace from previous location ---
  at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext.SetOutputContentAsync()
  at AspNetCore._Areas_Admin_Views_Shared__AdminLayout.ExecuteAsync() in C:\dev\Nop-Templates\nopCommerce_4.5\Presentation\Nop.Web\Areas\Admin\Views\Shared\_AdminLayout.cshtml:line 37
  at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context)
  at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, Boolean invokeViewStarts)
  at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderLayoutAsync(ViewContext context, ViewBufferTextWriter bodyWriter)
  at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context)
  at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode)
  at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode)
  at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ActionContext actionContext, IView view, ViewDataDictionary viewData, ITempDataDictionary tempData, String contentType, Nullable`1 statusCode)
  at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor.ExecuteAsync(ActionContext context, ViewResult result)
  at Microsoft.AspNetCore.Mvc.ViewResult.ExecuteResultAsync(ActionContext context)
  at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsync>g__Awaited|30_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
  at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context)
  at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted)
  at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters()
--- End of stack trace from previous location ---
  at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
  at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
  at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
  at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
  at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
  at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
  at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
  at StackExchange.Profiling.MiniProfilerMiddleware.Invoke(HttpContext context) in C:\projects\dotnet\src\MiniProfiler.AspNetCore\MiniProfilerMiddleware.cs:line 103
  at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
  at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
  at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
  at Nop.Services.Installation.InstallUrlMiddleware.InvokeAsync(HttpContext context, IWebHelper webHelper) in C:\dev\Nop-Templates\nopCommerce_4.5\Libraries\Nop.Services\Installation\InstallUrlMiddleware.cs:line 52
  at Nop.Services.Common.KeepAliveMiddleware.InvokeAsync(HttpContext context, IWebHelper webHelper) in C:\dev\Nop-Templates\nopCommerce_4.5\Libraries\Nop.Services\Common\KeepAliveMiddleware.cs:line 49
  at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
  at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
  at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)


I would like to note that this error is not specific to the /css/PluginList.styles.admin.css file but appears with other css files. Only css files generate this error. It doesn't seem to have any affiliation to any plugin but rather be a core nopCommerce issue.
What could be the issue here?

Regards,
Anton
2 years ago
Nop-Templates.com wrote:
I randomly get the following error about 1 out of every 200-300 requests either in the administration or in the public page...

It'll be fixed soon. Please see this post.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.