Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

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

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsStoreStoreDuplicate Data - But how?Duplicate Data - But how?
Previous
 
Next
New Post
4/16/2008 6:49 PM
 

Recently we implemented the store for a customer and the module worked fine until a user complained about duplicate data in the store. After some research we realized that this occurred because the user had created new pages and copied them from existing pages that had the store module(s) on the page.

The Reason: When copying a page the ManageTabs core page presents the user with three options based on whether or not the module implements IPortable. In this case the store module does support it and the "copy" option is available. The user selected this which in turn causes the Export and then Import to be invoked. This on the surface seems ok until you look at the Store tables and they don't use ModuleId in the Categories/Products table. Therefore, all your categories and products are recreated.

The Solution: The solution has several parts. Cleaning up the data which is a very painful process and I can't really offer any ideas here. You'll have to pick through the data depending on how bad (and how long) this has been going on. In my case, a lot.  Since ModelNumber and ModelName are required in my implementation I simply modified the underlying stored procedure Store_Products_AddProduct and wrapped them with an If NOT Exists(...) first and only insert if not found. I used CategoryName and did the same for Store_Categories_AddCategory.

This solved my problem but has yet to be tested fully but I'm fairly confident this will fix the issue.

This is another reason why all Modules should use ModuleId as part of table design. I realize there are special cases where ModuleId doesn't make sense so developers beware.

 


Henry Kenuam
Engage Software
St. Louis, MO
314.966.4000



The leading provider of DotNetNuke support, training and custom module development
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsStoreStoreDuplicate Data - But how?Duplicate Data - But how?


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.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out