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

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesProgrammatically Created Redirects Can't be ClearedProgrammatically Created Redirects Can't be Cleared
Previous
 
Next
New Post
3/26/2013 2:29 PM
 

Greetings,

 I have a module that imports from a .chm file and creates pages in the same structure as the imported .chm file. As chm files can have empty pages that redirect (or show content from) the first child with content, so have my pages been created.  Each page that represents a chm tree item that does not have content is redirected to the first child page with content (TabInfo.Url = TabId, TabInfo.PermanentRedirect = true).  This works fine.

But, as I have to continuously fine tune the import (trial and error), I have to delete the child pages and start all over with the import from the base (root) page from which I originally started the import.

Even if I comment out the page redirect section in my code and don't create those redirects, as soon as the pages are imported, they still contain the previous redirects (the subsequent import creates exactly the same page/tree structure).  In fact, if I go to Page Settings and clear the redirect (and even double check the URL and PermanentRedirect columns of the Tabs table), those redirects are still in effect.  Clicking on a root that has no HTML module (how I define if a page requires a redirect - if not content on import, no HTML module is added) on a page that in Page Settings does not have a redirect, it still navigates to the first child with content.

I've:

  • Cleared the Cache
  • Restarted the Application
  • Restarted IIS (iisreset)
  • Recycled the App Pool
  • Made sure deleted pages were permanently deleted (cleared Recycle Bin)
  • Double checked the URL and PermanentRedirect columns of the Tabs table

And nothing seems to work.  It's as if the cache really isn't being cleared.  The only thing that will clear out all the links is if I delete the root page (my module will delete all child pages from where it is placed -- only requiring a clearing of the Recycle Bin).

 DNN version 7.0.3

Creating a new redirect:

        currentTab.Url = nextPage.TabID.ToString();
        currentTab.PermanentRedirect = true;
        TabController tc = new TabController();
        tc.UpdateTab(currentTab);

Any idea why a page with no redirect that previously had a redirect is still redirecting?

Thanks in advance.

G

 
New Post
3/26/2013 5:12 PM
 
Caveat - I know nothing about this!

I think you should NOT use permanent redirect. I did a quick Google search and found this. It suggests to me that permanent redirect may be a bit evil.

http://getluky.net/2010/12/14/301-red...

If I understand his post then it's not the server that's causing your problem. It may be that your browser has cached the 301.

Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
New Post
3/27/2013 4:23 AM
 

Brilliant!  Thanks!  That was exactly it.

 Thanks for posting the link to the 301 article as well.  I truly missed the possibility that it was the browser and not my implementation or the server.

I'll steer clear of permanent redirects from now on.

Cheers,

Greg

 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesProgrammatically Created Redirects Can't be ClearedProgrammatically Created Redirects Can't be Cleared


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