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 moved to Default page when Settings savedCustom module moved to Default page when Settings saved
Previous
 
Next
New Post
4/17/2013 5:16 PM
 

Has anyone experienced an issue with a custom module, where it is moved to the Default page (from the page it was added to) when Settings are saved?  This only happens with my custom module.  I tried commenting out the code within the UpdateSettings method of my Settings control, but the control is still moved.

FWIW, the environment that my module is loaded into is running DotNetNuke 6.2.3 on IIS 7.

 
New Post
4/18/2013 1:37 AM
 
Hi,

I never experienced an issue like that. What I suggest is: clear the cache and recycle the AppPool. Then have a look at the TabModules table in the database to find on which Tab (=page) your module is placed. Repeat the steps to update the module settings, and then inspect that table again. Has the TabID field changed? If yes, there must be some code in your Settings control that changes the TabID - if you find this part, correct it and you're done.

Best wishes and good luck
Michael

Michael Tobisch
DNN★MVP
dnn-Connect.org - The most vibrant community around the DNN-platform
 
New Post
4/18/2013 12:15 PM
 

I've followed your steps and found that the TabID is indeed getting changed in the database.  However, I haven't located any code responsible for changing it.

I've realized that it's also worth noting that my Settings control has a custom usercontrol added to it.  Somehow it's within the custom control that the problem begins.  However, the custom usercontrol has no knowledge of its container (in this case the DotNetNuke Settings control).  What I've learned is that commenting out the line in the code below (in bold font) keeps the module from moving, but the input controls aren't bound and are therefore blank.  I've also placed breakpoints throughout my code and attached to the process, hoping to glean some more useful information.

 Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    [...]
    If Not Page.IsPostBack Then
        Page.DataBind()
    End If
    [...]
End Sub

 
New Post
4/18/2013 2:53 PM
 

I figured it out, just after posting my last comment!  By calling Page.DataBind, I've caused DotNetNuke to bind controls outside my custom control.  This somehow caused the TabID to change.  Therefore, I changed my code to call Me.DataBind, which binds only my controls.  Here's an example of the code as it looks now:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
     [...]
     If Not Page.IsPostBack Then
         Me.DataBind()
     End If
     [...]
End Sub

 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesCustom module moved to Default page when Settings savedCustom module moved to Default page when Settings saved


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

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