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

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 years ago
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)
6 years ago
Anyone?
6 years ago
Any suggestions for getting this to work?
6 years ago
Bump
6 years ago
I’m having this issue as well, just started happening
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
So, did you get it working? Don’t leave me hangin lol
6 years ago
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 topic was automatically closed 365 days after the last reply. New replies are no longer allowed.