nopCommerce 4.40 - Bug fixes and improvements

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 年 前
>ExecuteNonQuery
Yes, please add it ExecuteNonQueryAsync
3 年 前
Hello,

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.

Hope I've explained this well enough!

Regards,
Anton
3 年 前
Nop-Templates.com wrote:
...Found an issue in the NopTabsTagHelper class...

Thanks, Anton! We'll check it soon - https://github.com/nopSolutions/nopCommerce/issues/5325
3 年 前
Hello All,

I am trying to follow the plugin implementation from the document.

Can anyone share how to set up a developer environment correctly? Thus, as I develop, I should able to deploy plugin and installed it correctly and run.

I followed the plugin development document page, but it seems too little as no further instruction is given for end to end deployment and post-installed.

Any help much appreciated.

RL
3 年 前
Use the existing plugin from the nopcommerce as a template.
We don't have any issues with development new plugins.
3 年 前
foxnetsoft wrote:
Use the existing plugin from the nopcommerce as a template.
We don't have any issues with development new plugins.


Thank you for your reply.

I did the same, it compiles correctly, copies to the plugin folder. But not able to install correctly.
Restart application fails and due to that, it is not registering the plugin. :(

My question is simple. I want to set up a development environment which allows continuing working with plugin or theme and debug it correctly. Also if possible want to write unit tests for the plugins so that it will help to excel the process.  I hope it makes sense.

Can anyone share thoughts on that?

Thanks.

RL:
3 年 前
rlodhiya wrote:
Use the existing plugin from the nopcommerce as a template.
We don't have any issues with development new plugins.

Thank you for your reply.

I did the same, it compiles correctly, copies to the plugin folder. But not able to install correctly.
Restart application fails and due to that, it is not registering the plugin. :(

My question is simple. I want to set up a development environment which allows continuing working with plugin or theme and debug it correctly...

Thanks.

RL:

Hi.
You're absolutely right,  definitely, it(since ver.4.3 and VS 2019) does not work for me as well.
Best Regards.
3 年 前
rlodhiya wrote:

...But not able to install correctly.

... I want to set up a development environment


Please clarify "not... install correctly".  Any error message in the log?

A "development environment" can be Visual Studio on your local PC.  What is your concern - how to "Publish" updates to your QA or production site?
3 年 前
New York wrote:

Please clarify "not... install correctly".  Any error message in the log?


Okay after digging bit more about the plugin development and setup environment, identify the issue was with ~/App_Data/plugin.json.

due to an orphan entry in the  "PluginNamesToInstall": [
{
      "Item1": "xyz.abc.pqr",
      "Item2": "2dd5b46c-9bb8-4c91-9593-778a322976c1"
    }]
cause the issue. A dll resource file does not exist in the directory but entry leftover in the plugin.json file.

To replicate the issue Please do the following:
1. Add a new plugin project
2. Compile and Run (Assuming that the initial setup has been successfully done).
3. Now open admin panel and try to install it.
4. It should ask for restart Application (Failed).
5. Remove the plugin project.
6. Clean  Solution and rebuild.
7. Add new plugin project with a new name.
8. Compile and rebuild
9. Repeat Step 2,3,4
10. Now check the plugin.json file status.

I am still trying to get my head around, how to prevent happening again.

Also, Restart application in the local environment (dev machine - localhost) throwing an unhandled exception. I think that is a separate issue.

New York wrote:

A "development environment" can be Visual Studio on your local PC.  What is your concern


Yes, My development environment is a visual studio 2019, and it is a local (VM).

My concern is that every time a new version releases, vital documents are not up to date. That confuses new developer and set back on pushing upgrades. I wish I have an architecture document and learn this entire framework through the document. Thus, I could be more confident about any changes in the patterns and develop with confidence. Ideally, it should be like LTS for a version and archives of documents related to the version for the references.

New York wrote:

- how to "Publish" updates to your QA or production site?


Not at the moment, I would love to create some CI/CD to push development cycle quicker, but I think I am far from it.
3 年 前
rlodhiya wrote:
A dll resource file does not exist in the directory but entry leftover in the plugin.json file.

This plugin.json can only be edited and maintained by the system if you follow some work flow

rlodhiya wrote:
5. Remove the plugin project.

If you are removing the project and are no plannind to immediatly rebuild before you run the solution then you can manualy edit the plugin.json file

Although I dont see the problem myself if I manually remove the plugin for testing
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.