Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesCustom Module Throws Error after Upgrade to 7.xCustom Module Throws Error after Upgrade to 7.x
Previous
 
Next
New Post
2/7/2014 9:47 AM
 

Good Morning,

We upgraded a site to DNN 7.x this week and a custom module is now throwing the following error:

 DotNetNuke.Services.Exceptions.ModuleLoadException: Value cannot be null. Parameter name: source ---> System.ArgumentNullException: Value cannot be null. Parameter name: source at System.Linq.Enumerable.Where[TSource](IEnumerable`1 source, Func`2 predicate) at Find8.DNN.DiplomateManager.Components.DiplomateController.DiplomateCertifiedInfo(Int32 portalid, Int32 userid) at Find8.DNN.DiplomateManager.ProfileView.bindUserInfo() at Find8.DNN.DiplomateManager.ProfileView.Page_Load(Object sender, EventArgs e) --- End of inner exception stack trace ---

The module does you an Entity data model and it appears that the parameter name is null.  However, I need a better understanding of where to look in the module, what to fix etc. so that I can get the site on it's way.  Your expeditious help and guidance is appreciated.

Thanks,

Sid

 
New Post
2/7/2014 10:50 AM
 
Just run it up in the development environment and let Visual Studio tell you where the exception is.

Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
New Post
2/7/2014 1:48 PM
 
based on your error it's suggests the problem is populating some user data (bindUserInfo) - as most user data is stored in core tables (such as users/useroles etc.), I would guess that your entity model is linking to these core tables (entities) and that a change to one of those has caused your issue. This is the same as a 3rd party module doing direct database access - and we do not support this i.e. we do not guarantee our database will stay the same always (we guarantee that our API will be backwards compatible so using methods such as UserController methods will always work where as "select [columnname] from users" may not). You could try regenerating your entity model to see what happens (or even running sql profiler to see if there is a failing query based on the model), but the best option is what Richard suggested.

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
2/7/2014 3:01 PM
 

It appears I have a bit of a mess to cleanup.  The source code didn't include the .sln so I'm taking all the code into a new one and building.  Build errors total over 800 at this point.  In looking at the EDMX files, the Location entity is being used.  Is there a better way to approach this instead of relying on an EDMX which points to a core table?  

My build errors include entries like this:

Error 1 Type 'Find8.DNN.DiplomateManager.Data.AdminTaskEntities' already defines a member called 'AdminTaskEntities' with the same parameter types C:\dnndev.me\DesktopModules\Find8\Find8Diplomate\Find8Diplomate\Data\AdminTaskEfModel1.Designer.cs 40 16 Find8Diplomate


Referencing:

        public AdminTaskEntities() : base("name=AdminTaskEntities", "AdminTaskEntities")
        {
            this.ContextOptions.LazyLoadingEnabled = true;
            OnContextCreated();
        }


Any further suggestions on how to fix all this up?

 
New Post
2/7/2014 4:20 PM
 
hard to tell - that's likely a namespacing issue i.e. you've created a new solution but it doesn't have the same namespace as the old one . As for a better way, using the DNN API is better than direct access i.e. you could use something such as arrUsers = UserController.GetUsers(PortalId) to get a list of users (or just bind them directly to a control such as a dropdownlist)

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesCustom Module Throws Error after Upgrade to 7.xCustom Module Throws Error after Upgrade to 7.x


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.

Content Layout

Subscribe to DNN Digest

Subscribe to DNN Digest

DNN Digest is our monthly email newsletter. It highlights news and content from around the DNN ecosystem, such as new modules and themes, messages from leadership, blog posts and notable tweets. Keep your finger on the pulse of the ecosystem by subscribing.  


Copyright 2017 by DNN Corp Terms of Use Privacy
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out