nopCommerce 4.0 - Bug fixes and improvements

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 years ago
Hi nopCommerece team,

Sorry for the so many issues/improvements that we report recently but we want to make sure we report them as early as possible as we know that the sooner we report them the chances for fixing/adding them are better.

I am not sure if this is made on purpose but we noticed that in many cases when we have some errors they are not logged in the System -> Log.

Here are some cases in which there is an error but it is not logged in the Log and is quite hard to investigate what is wrong.

- if a Razor view could not be found when doing Ajax calls. You can see the error in the Response in the Network tab in the browser but no error is being logged in the Log.

- Missing AntyForgeryToken in Ajax requests. Again no error in the Log (and no details for the error in the response in the browser as you just get bad request 400 error).

I am sure there are other cases when errors are not logged in the Log.

In the previous version of nopCommerce all errors were logged in the System -> Log.

This is quite important for troubleshooting any nopCommerce problems.
When our clients have any problems we usually ask them to check the Log for any errors that usually help us to understand what is wrong and advise them. If this functionality is missing in nopCommerce 4.0 then the support of nopCommerce will be much harder and more time consuming.

If you need help with this issue please let me know and we can investigate further what could be done to improve the error handling logging as it is very very important!

Thanks,
Boyko
6 years ago
Hi guys,

Although the introduction of Components instead of Controllers is a great step forward (especially for the performance) it causes some extensibility limitations that we would like to discuss and try to find a solution for this.

The fact that the Components are not part of the controller life cycle is good for the performance but at the same time is bad for the their extensibility because we could no longer use Action Filters to intercept the Models being returned from them if we need to add some additional data.

I will give you a concrete example.
In the Uptown theme (see the demo) when you hover over the Featured Products on the Home page you can see that we change the main image.
To achieve this we have an action filter for the Featured Products action (Product controller / HomepageProducts action) and after it is executed we add the second picture to the Model (we use the CustomProperties dictionary to add the second image for each product).
But now in nopCommerce 4.0 the Featured Products are now moved into a component and we no longer can implement the same functionality as we can't add the additional data to the model.

This is just one example but we use this action filters extensibility approach in many plugins and themes.
So this applies to all components that build some models i.e HomepageBestSellers, HomepageCategories etc.
Since we do not want to drop functionality in nopCommerce 4.0 (no one will be happy of doing this) we need to find some other way of adding data to the Model.

For example this great new feature you have added for the controllers is perfect but it is not applicable for the components since it is based on action filters (you can't add action filters on components)

Do you think we can do something similar but for Components? Any other suggestions?

Thanks,
Boyko
6 years ago
Nop-Templates.com wrote:
If you reference the Nop.Web project from a plugin (we reference it in all our plugins) while you don't do it in any of the default plugins then the Nop.Web.exe and Nop.Web.exe.config are copied to the Plugins folder and then this causes DuplicateContentItems build error when building the Nop.Web project

They are automatically deleted when a project is built by the \Build\ClearPluginAssemblies.proj. We reference it in plugin csproj files now (open it in any text editor). I know it's not obvious now but we'll release a complete guide to upgrade plugins to 4.00 soon. And the issue with Nop.Web.exe was also fixed several days ago
6 years ago
Nop-Templates.com wrote:
Sorry for the so many issues/improvements that we report recently but we want to make sure we report them as early as possible as we know that the sooner we report them the chances for fixing/adding them are better.

Thanks a lot! That's why we'll also release BETA version

Nop-Templates.com wrote:
I am not sure if this is made on purpose but we noticed that in many cases when we have some errors they are not logged in the System -> Log...

Thanks. Here is a work item

Nop-Templates.com wrote:
If you need help with this issue please let me know and we can investigate further what could be done to improve the error handling logging as it is very very important!

Sure. Any help or conribution is always welcome!
6 years ago
Nop-Templates.com wrote:
Although the introduction of Components instead of Controllers is a great step forward (especially for the performance) it causes some extensibility limitations that we would like to discuss and try to find a solution for this
...
Do you think we can do something similar but for Components? Any other suggestions?

Here is a work item. I'm sure we'll find a way to support it
6 years ago
a.m. wrote:
Here is a work item. I'm sure we'll find a way to support it

And done. Please see this commit
6 years ago
a.m. wrote:
We reference it in plugin csproj files now (open it in any text editor). I know it's not obvious now but we'll release a complete guide to upgrade plugins to 4.00 soon. And the issue with Nop.Web.exe was also fixed several days ago


Hi Andrei,

I am aware of this file as we also use it in our plugins. Looks like I had some local changes and have missed the updated version.

Many thanks again!

Boyko
6 years ago
a.m. wrote:
Here is a work item. I'm sure we'll find a way to support it
And done. Please see this commit


Hi Andrei,

Great! It looks quite promising!
I will give it a try on Monday and will let you know if everything is fine!

Many thanks again for the quick solution!

Boyko
6 years ago
Nop-Templates.com wrote:
On the "Customer settings" page when you add a customer attribute and save it the link "back to customer attribute list" is not working and you can't go back. It points to this "/Admin/CustomerAttribute/List" which does not exist while I guess it should return to the customer settings page

And fixed
6 years ago
Nop-Templates.com wrote:
- if a Razor view could not be found when doing Ajax calls. You can see the error in the Response in the Network tab in the browser but no error is being logged in the Log

Could you please provide some details on how to reproduce the issue?

Nop-Templates.com wrote:
- Missing AntyForgeryToken in Ajax requests. Again no error in the Log (and no details for the error in the response in the browser as you just get bad request 400 error)

ASP.NET AntiFogery implementation doesn't send any specific error details. So we can log only general 400 error (bad request). I've just implemented it
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.