Google Shopping v1.75 (nop 3.8) - The entity type GoogleProductRecord is not part of the model for the current context.

Posted: May 26, 2017 at 10:32 AM Quote #188272
Getting this error when trying to save configuration of this plugin and when trying to generate the feed.

System.InvalidOperationException: The entity type GoogleProductRecord is not part of the model for the current context. at System.Data.Entity.Internal.InternalContext.UpdateEntitySetMappingsForType(Type entityType) at System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) at System.Data.Entity.Internal.Linq.InternalSet`1.Initialize() at System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext() at System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider() at System.Linq.Queryable.Where[TSource](IQueryable`1 source, Expression`1 predicate) at Nop.Plugin.Feed.Froogle.Services.GoogleService.GetByProductId(Int32 productId) at Nop.Plugin.Feed.Froogle.Controllers.FeedFroogleController.<GoogleProductList>b__15_0(Product x) at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext() at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) at Nop.Plugin.Feed.Froogle.Controllers.FeedFroogleController.GoogleProductList(DataSourceRequest command) at lambda_method(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End() at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d() at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass33.<BeginInvokeActionMethodWithFilters>b__32(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End() at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<>c__DisplayClass2b.<BeginInvokeAction>b__1c() at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End() at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) at System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End() at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) at System.Web.Mvc.Controller.<BeginExecute>b__15(IAsyncResult asyncResult, Controller controller) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End() at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) at System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) at System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End() at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: June 01, 2017 at 11:41 PM Quote #188530
Anyone?
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: June 19, 2017 at 5:29 PM Quote #189097
Any suggestions for getting this to work?
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: October 04, 2017 at 5:28 PM Quote #194158
Bump
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: October 07, 2017 at 1:17 AM Quote #194306
I’m having this issue as well, just started happening
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: October 07, 2017 at 4:37 AM Quote #194316
chadwixk wrote:
Any suggestions for getting this to work?


Hi chadwixk,

After about 6 hours of combing through absolutely everything having to do with Froogle/Google (including almost boring myself to death going through each line of source code), I finally figured out what happened with my store and it is now working properly (or at least it seems to).

For me, it turns out that it was an error related to Newtonsoft.JSON. For some reason the Google/Froogle plugin refused to work because there was another plugin that I had been playing around with which had a copy of the Newtonsoft.JSON library inside its folder. When I looked at Admin -> System Information -> Loaded assemblies, I saw that there was two instances of Newtonsoft.JSON.

Now, even though the plugin that i was playing around with was TECHNICALLY not installed, it still failed because the library was being picked up and loaded. As soon as I physically deleted the offending plugin's folder and restarted the store -> BAM! No error and I was able to generate a new feed without an issue.

The offending plugin for me was the XcellenceIT.Plugin.Solr package.

If you don't have it installed, then simply do a search in your plugins folder for any instances of the file 'Newtonsoft.Json.dll'. Hopefully if you find one and remove it as a test, it will work for you.

Please let me know if you try and this and if it works for you!


Cheers
Travis
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: October 07, 2017 at 9:30 AM Quote #194325
Awesomeness me Travis. Thank you! I have that same Solr plugin as well. So I'll check this solution out.

Thanks again!

barfnuts wrote:
Any suggestions for getting this to work?

Hi chadwixk,

After about 6 hours of combing through absolutely everything having to do with Froogle/Google (including almost boring myself to death going through each line of source code), I finally figured out what happened with my store and it is now working properly (or at least it seems to).

For me, it turns out that it was an error related to Newtonsoft.JSON. For some reason the Google/Froogle plugin refused to work because there was another plugin that I had been playing around with which had a copy of the Newtonsoft.JSON library inside its folder. When I looked at Admin -> System Information -> Loaded assemblies, I saw that there was two instances of Newtonsoft.JSON.

Now, even though the plugin that i was playing around with was TECHNICALLY not installed, it still failed because the library was being picked up and loaded. As soon as I physically deleted the offending plugin's folder and restarted the store -> BAM! No error and I was able to generate a new feed without an issue.

The offending plugin for me was the XcellenceIT.Plugin.Solr package.

If you don't have it installed, then simply do a search in your plugins folder for any instances of the file 'Newtonsoft.Json.dll'. Hopefully if you find one and remove it as a test, it will work for you.

Please let me know if you try and this and if it works for you!


Cheer's
Travis
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: October 07, 2017 at 9:35 AM Quote #194326
Well that’s good to hear - at least we know that it’s likely the issue.

I’m wondering if you just simply delete the NewtonsoftJson.dll file from the Solr folder if it will fix everything up for you. Technically Solr should still work because the library is already loaded by default, but that’s just a lightly-educated guess...

Let me know how you make out!


Cheers
Travis
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: October 19, 2017 at 12:10 AM Quote #194885
So, did you get it working? Don’t leave me hangin lol
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: October 19, 2017 at 12:38 PM Quote #194922
No luck :(

Sorry Barfnuts...this wasn't a priority for us as we've started looking at 3rd party tools to do this. But I did look at it now. I renamed the NewtonSoft.JSON.dll and restarted the application. It does not show in the loaded assemblies, but still getting the same error in Nop. :(

I thought I'd search for other similar situations, so copied the Loaded Assemblies list into Excel and slapped into a pivot table to see if any had more than one instance. The only one that does is:


Microsoft.GeneratedCode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
Microsoft.GeneratedCode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
Microsoft.GeneratedCode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null


Do you have multiple version of these in your Loaded Assemblies? Not sure what these actually refer to dll wise as I can't find specific dlls for this...and by the name of GeneratedCode, assuming that they are somehow generated on the fly? I don't know, grasping at straws here and showing my ignorance in this area. But curious if you have this same assembly listed multiple times like I do.


barfnuts wrote:
So, did you get it working? Don’t leave me hangin lol
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Premium support services
  • Dedicated premium support services provided by core developers are intended for persons who run mission critical websites, work on projects with tight deadlines, or want to get dedicated support.
Professional services
  • Want to open a new store? Want to take your store to the next level? Need a custom extension? We can customize nopCommerce to fit your store perfectly. Request a quote to get started.