question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tab Redirect Url improved hinting/placeholder

See original GitHub issue

Description of Problem

I would like to request for comment/consideration a small improvement to the Page Settings (tab settings) interface to give better help/information to admin users.

I often see an issue where admin users will attempt to setup a page redirect and encounter issues because they do not realize that the Redirect URL expected is a full path complete URL vs being able to accept a local path / incomplete URL. Because of the error messages seen, it can be hard for them to troubleshoot if they don’t fully understand what has happened in their page redirect.

Take the example of an admin who attempts to set the Page Setings (tab settings) URL Redirect for a page originally called “Dictionary”

They want to redirect from //Dictionary to //Glossary so in the URL field, they enter //Glossary and are expecting the redirect to happen as https://www.domainname.com/Glossary they often enter this type of value into the HTML module when working with anchor links and among other reasons have learned to enter //Glossary so that it loads correctly whether https or http for their domain name.

however, what is saved in the database and displays in the Page Settings the next time it is loaded is a value of http:////Glossary

image

This then performs a redirect loading either a browser’s error message of “cannot locate domain”, OR in older DNN versions, an error message like this

Exception:
Invalid URI: The hostname could not be parsed.
Stack Trace:
at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind) at System.Uri.CreateUri(Uri baseUri, String relativeUri, Boolean dontEscape) at System.Uri..ctor(Uri baseUri, String relativeUri) at System.Web.HttpResponse.ConvertToFullyQualifiedRedirectUrlIfRequired(String url) at System.Web.HttpResponse.Redirect(String url, Boolean endResponse, Boolean permanent) at System.Web.HttpResponse.RedirectPermanent(String url) at DotNetNuke.Entities.Urls.AdvancedUrlRewriter.CheckForTabExternalForwardOrRedirect(HttpContext context, UrlAction& result, HttpResponse response, FriendlyUrlSettings settings, Guid parentTraceId) at DotNetNuke.Entities.Urls.AdvancedUrlRewriter.ProcessRequest(HttpContext context, Uri requestUri, Boolean useFriendlyUrls, UrlAction result, FriendlyUrlSettings settings, Boolean allowSettingsChange, Guid parentTraceId)
Administrators
You can see this exception because the customErrors attribute in the web.config is set to 'off'. Change this value to 'on' or 'RemoteOnly' to show Error Handling
The error handling would have shown this page : Default.aspx?TabId=412

This can be difficult for an admin to troubleshoot if they do not understand what has happened with the redriect attempt. The information within the DNN Event Log is perfect and gives good information regarding the issue, but they may not see the error.

Proposed Solution Option 1

I would like to propose that we improve the help text and the hinting/placeholder in the field to give better information to the user regarding what is expected for the field

image

Suggested Help Text: Redirect to a URL Address. Please enter a full-path URL complete with http/https. Suggested Field Hinting: Enter complete path URL

Affected version

  • 9.3.2
  • 9.3.1
  • 9.2.2
  • 9.2.1
  • 9.2
  • 9.1.1
  • 9.1
  • 9.0
  • 8.x
  • 7.x

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
valadascommented, May 30, 2019

That being said should it be instead possible to be able to redirect to a relative URL. I saw another issue or question somewhere where the user wanted to redirect a page to an anchor on another page, so he entered /ThePage#TheAnchor

Should it instead be modified in the code to not automatically add http:// ?

3reactions
valadascommented, Jul 1, 2021

Whohoo! Go David Go!

Read more comments on GitHub >

github_iconTop Results From Across the Web

New Tab Redirect
Allows you to change the new tab page to the New Tab Redirect app page, or a custom URL of your choice! Choose...
Read more >
How to redirect current tab's url in Chrome extension?
When user clicks on search engine's icon in popup window, I need to redirect current tab to a new url using the search...
Read more >
The Ultimate Guide to Redirects: URL ...
Here's how an HTTP redirect works: The user's browser requests the old (redirected) URL. The server automatically displays the webpage for the ...
Read more >
New Tab Redirect Add On... : r/edge
To answer the original Question: I have been using the New Tab Redirect from the Edge Extension page for nearly a year with...
Read more >
Set up a flexible pattern URL redirect
Create a flexible pattern URL redirect · In the left sidebar menu, click Website > Domains & URLs. · Click the URL Redirects...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found