Nop 4.0 beta bug: Scheduled tasks inside plugins not working

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 years ago
I'm migrating a plugin to Nop 4.0 and our custom scheduled task is not working -



It's throwing an exception on line 48 of Libraries\Nop.Services\Tasks\Task.cs -



Here you can see there is nothing wrong with the way the task is written and how it is set up -




Database row just to be extra sure -




Has anybody else tested a scheduled task from inside a plugin and confirmed it is working?

Edit:


Another user has found this problem -
https://www.nopcommerce.com/boards/t/49293/type-not-found-in-plugin-for-400.aspx
6 years ago
Hi,

It works fine. Please see this topic

timmit wrote:
Has anybody else tested a scheduled task from inside a plugin and confirmed it is working?

Sure. The built-in "Square" payment plugin has a schedule task
6 years ago
The solutioin is to include the full assemblyname in the [Type] column in the ScheduleTask table.

Nop.Plugin.Misc.WebServices.Njord.ProcessOutQueueTask, Nop.Plugin.Misc.WebServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null
6 years ago
Hi,

This doesn't sound good to me.

If you install a plugin in 4.00 and the plugins has a version 4.0.0.0 and it is written in the database then when nopCommerce 4.10 is released the version in the database will still be 4.0.0.0 while the assembly will be version 4.1.0.0 and the assembly will not be loaded.

This means that we need to updated the scheduled tasks every time we change the assembly version!!!

Not to mention that we change the assembly version after every build we do on our CI server.
For example:

SevenSpikes.Nop.Plugins.SalesCampaigns.Tasks.SaleCampaignsTask, SevenSpikes.Nop.Plugins.SalesCampaigns, Version=4.0.1.2500, Culture=neutral, PublicKeyToken=null

then

SevenSpikes.Nop.Plugins.SalesCampaigns.Tasks.SaleCampaignsTask, SevenSpikes.Nop.Plugins.SalesCampaigns, Version=4.0.2.2501, Culture=neutral, PublicKeyToken=null

and so on ....

This will make the addition of scheduled tasks in plugins much harder to be supported.

Why the old way of keeping only the name of the assembly is not working anymore? Any suggestions?


Thanks,
Boyko
6 years ago
How about this approach? Now it's enoguh to specify only the type name (with assembly name). Please test it out with your plugins andlet me know if it works (not in the "develop" branch yet)
6 years ago
Hi Team,
I am trying to override a controller but do not require to override its view.
In nop 4.0 ,
I am able to override controller through attribute routing but I do not want to override view of that controller.
When I tried to override view of that controller then it gives error of its partial view, that partial views are  not found to the specific path.

I want to use existing view through my override controller Is it possible ? How can we achieve that in nop 4.0 ?

Thanks
6 years ago
a.m. wrote:
How about this approach? Now it's enoguh to specify only the type name (with assembly name). Please test it out with your plugins andlet me know if it works (not in the "develop" branch yet)


Hi Andrei,

We tested this and everything is working fine.

Regards,
Hristian
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.