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

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Display on all pages not workingDisplay on all pages not working
Previous
 
Next
New Post
7/1/2011 7:20 AM
 
Yep - this is affecting my sites too, resulting is support calls from dissatisfied customers, and requiring a manual visit to each and every page to insert a copy of the module from the original page. I hope someone has an aswer for this soon.
 
New Post
7/1/2011 7:21 AM
 
Yep - this is affecting my sites too, resulting is support calls from dissatisfied customers, and requiring a manual visit to each and every page to insert a copy of the module from the original page. I hope someone has an aswer for this soon.
 
New Post
7/1/2011 1:27 PM
 
Sorry about the dupe posting above - dunno what happened there.

OK, done some research and discovered this:

If you place a module on one page (tab), it gets a corresponding entry in the dnn_modules table for the module itself, then another in the dnn_tabmodules table for the tab on which it appears.

If you then turn on 'Show on all pages', the entry in dnn_modules is updated as you would expect plus a new entry is created in dnn_tabmodules for every page on the site - and all is well.

Now turn off 'show on all pages', and the dnn_tabmodules have their isdeleted bit set, and the module once again shows only on a single page.

Now turn it on again, and the isdeleted bit is NOT cleared in the dnn_tabmodules table, and the module does NOT appear on all pages, but the AllTabs bit in the dnn_modules table IS correctly set

OK, so that clearly shows the problem, but sadly it is not the WHOLE problem, as clearing the bit using SQL does NOT make the module appear on all pages again, nor does restarting the application, so there must be another table coming into play - ie it is not just a caching issue.

If someone more knowledgeable about the architecture wants to suggest what this might be, I'd be happy to knock up (sorry, I meant finely craft) some SQL to correct the problem. It would have to be run each time the problem occurred, but that's better then having to manually re-add modules to every page!

 
New Post
7/1/2011 1:49 PM
 
Cracked it - well sort of.

When you unset the 'show on all pages' flag, the Data Access Layer iteratively calls stored procedure DNN_DeleteTabModule for every tab OTHER then the current tab, and sets the softdelete flag. The procedure then sets the matching dnn_tabmodules entries isdeleted flag, but is ALSO sets the versionguid to newid - which is what I guess is breaking it when you unset the flag.

The solution is to simply hard delete those rows. I assumed this can be done without breaking any referential integrity, since it is exactly what the stored procedure above does when the soft delete parameter is NOT set.

I tried this, and my module started appearing on all pages again!

So the solution to make a module that refuses to appear on all pages do so (which I intend to code into an XModPro module so I can do it through a new admin page) is simply this:

1. Go to the page on which it does appear and click the edit settings button

2. Determine the module id from the url on the resulting screen, which will end with 'moduleid/1157' for example

3. Make sure 'show on all pages' is off - if not, turn it off and update the page.

4. Run the SQL delete dnn_tab_modules where moduleid=1157 and isdeleted = 1

5. Go back into module settings and turn 'show on all pages' on again - the module will then do exactly what it says on the tin (sorry: an expression from a British advert :-)

IMPORTANT: use your actual moduleid, and NOT the 1157 shown in the above examples

Now if someone can figure out the 'proper' way to fix that version guid, we can come up with a more elegant solution!

HTH

Steve
 
New Post
7/1/2011 2:11 PM
 
The above solution DOES work, but my guess about the version being the cause was incorrect. A little work with the SQL profiler revealed that when you turn the 'show on all pages' module setting on (after previously having turned it on and then off again, the Data Access Layer iteratively calls the stored procedure dnn_add_tabmodule.

The problem is that there is a unqiue index on moduleid+tabid on that table, and there is already an entry with the isdeleted flag set. So the add fails - and clearly, throws no error that you get to see!

I suspect the proper solution would be to modify that procedure to check for a deleted entry first for the keys in question, then unset the isdeleted bit and set the various guids to those passed into the procedure call. Otherwise, simply insert a new entry as it already does.

I am NOT going to experiment with this as I don't want to risk breaking my site and/or corrupting my database - but perhaps someone more knowledgeable could comment if this is the correct solution. If it is, then the corrected code for the stored procedure can be written. Not hard - but I'll not post it unless we get confirmation of my findings and of EXACTLY what should be updated.

Meanwhile, keep hard deleting those soft deleted rows and all is well :-)

Regards
Steve

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Display on all pages not workingDisplay on all pages not working


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