Getting error of "Method not found: 'System.String Nop.Core.Domain.ClassName.get_PictureURL()'."

2 years ago
Hello,

I have customized code and added new table in nopCommerce and I am getting error whenever opening the page which is using new table.

Method not found: 'System.String Nop.Core.Domain.ClassName.get_PictureURL()'

But It works fine when I restart the site and again after some time it's stopped working.
It never happens in local environment.

Please help me if some one knows this error.

Thank you,
Faiz
2 years ago
faizahemed wrote:
Hello,

I have customized code and added new table in nopCommerce and I am getting error whenever opening the page which is using new table.

Method not found: 'System.String Nop.Core.Domain.ClassName.get_PictureURL()'

But It works fine when I restart the site and again after some time it's stopped working.
It never happens in local environment.

Please help me if some one knows this error.

Thank you,
Faiz
.


Hello,

Did you pass extra parameter in existing nop service?

Otherwise,could you please post some code of your customization so ,I will assist you.
6 months ago
Hi

Did you get the solution? I am facing the same issue.
I have only added new property in order class.

Displaying the below error.

Method not found: 'Nop.Core.IPagedList`1<Nop.Core.Domain.Orders.Order> Nop.Services.Orders.IOrderService.SearchOrders(Int32, Int32, Int32, Int32, Int32, Int32, Int32, System.String, System.Nullable`1<System.DateTime>, System.Nullable`1<System.DateTime>, System.Collections.Generic.List`1<Int32>, System.Collections.Generic.List`1<Int32>, System.Collections.Generic.List`1<Int32>, System.String, System.String, System.String, System.String, Int32, Int32)'.

I have added new parameter in SearchOrders method but it is optional - default false

  var lastOrder = _orderService.SearchOrders(storeId: _storeContext.CurrentStore.Id,
                customerId: _workContext.CurrentCustomer.Id, pageSize: 1)
                .FirstOrDefault();

It works fine in local environment.
when uploading the code - it works.but after some time - it starts showing above error

My nop-commerce version is 3.90.
It only happens in nop.web

I have to replace the dll to resolve this error :(

Thanks in advance
6 months ago
Hi Parth,

In live environment, there is might be any other plugin which is overridden this service, so can you check plugin list.

The best practice to add additional parameter in service is Method Overloading instead of change in existing.

So just overload method with your additional parameter, build and upload on live. This should be work.

If still not work then share code snippet so can get an exact idea about issue.