Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URL datatype does not provide link to external URL #65

Closed
sleupold opened this issue Sep 19, 2019 · 11 comments
Closed

URL datatype does not provide link to external URL #65

sleupold opened this issue Sep 19, 2019 · 11 comments
Labels

Comments

@sleupold
Copy link

sleupold commented Sep 19, 2019

Describe the bug

If you use a column of data type "URL", enable "Track Number of Downloads" and add a row with an http or https link, the link is properly displayed in caption but the link simply contains current page address.

To Reproduce

Steps to reproduce the behavior:

  1. Add FnL to a page
  2. Add a column of type "URL" and enable checkbox Track Number of Downloads.
    Save (without entering a value for caption)
  3. Add a record with an URL like "http://www.github.com" and save
  4. See the url properly displayed, but when you click it, it just reloads the current page.

Expected behavior

you are forwarded to the displayed page

Error log

non

Additional context

variables file and file_UDT_URL in XML view are not properly populated (blanks added):

< File>
< !--https://www.github.com-->< a href="">https://www.github.com< /a>
< /File>

@SCullman
Copy link
Contributor

@sleupold , thank you for reporting!
Do you want to try to fix the issue? 🙏 Of course I can help you along the way, but most of the code and concepts should still be familiar to you.

@sleupold
Copy link
Author

@SCullman atm i am not sure, whether it is a FnL issue or a feature ripped out of DNN platform. Still investigating.

@SCullman
Copy link
Contributor

@sleupold I am quite sure it is a bug.
See here, url is unmodified (and just empty) if it is set to Url and tracking.
And there are no extra actions taken for any other link type to enable tracking.

@SCullman SCullman added the bug label Sep 20, 2019
@sleupold
Copy link
Author

@SCullman other data types are using linkclick.aspx handler, but do not count clicks either.
I am travelling atm, will have a look nect but one week.
PS: I encountered the issue, while trying to support another community member.

@SCullman
Copy link
Contributor

Well, this is fixed. But shouldn't the download number appear anywhere? I cannot remember.

@SCullman
Copy link
Contributor

Ok, with DataType LookUp and token [File:Clicks].
The urlController is always initialized with false , as the setting URLDownloadTrackingis not set anywhere, AND it should be controlled by the proper field setting.

@vmasanas
Copy link

I have a similar issue if you just select a file, not a url.
In this case a link limilar to this is generated:

<Document_UDT_Url>/LinkClick.aspx?fileticket=ORvcmU6B_Us%3d&tabid=3708&portalid=0&mid=10056</Document_UDT_Url>

The problem is that on DotNetNuke.Services.FileSystem.FileServerHandler, line 71 this will not correctly identify the mid or tabid parameters so any tracking fill fail.

if (context.Request.QueryString["mid"] != null)
{
Int32.TryParse(context.Request.QueryString["mid"], out ModuleId);
}

BTW, if you select a File, not a URL, should not it also ask for tracking?

@SCullman
Copy link
Contributor

It's starting to feel like a family reunion here.

  • The link was html encoded, which makes no sense and breaks any following querystring parms.
  • If the type is URL, it should never ask for tracking. But it should do for type download.

@SCullman
Copy link
Contributor

New release 6.5.4 available for testing.
@sleupold , @vmasanas Thank you for reporting and commenting, is was indeed helpful.

@vmasanas
Copy link

vmasanas commented Sep 23, 2019

@SCullman I installed the new version of the module but I still see the url has the same format as before.
The link I see there is
..../LinkClick.aspx?fileticket=jbdt2JJoHbA%3d& amp; tabid=3708& amp; portalid=0& amp; mid=10056

am I missing something here?

@SCullman
Copy link
Contributor

@vmasanas Can't reproduce. I see links like
/LinkClick.aspx?fileticket=wX7FnQbzE18%3d&tabid=33&portalid=0&mid=381&language=en-US
And I double checked and verified that the correct assembly (tagged with fileversion 6.5.4) is both in my bin and in release.

Btw, if you test with old data:

  • Ensure Track Number of Downloads is enabled for the filed of type url
  • You need to edit and save the row, otherwise the file/ url is not regstered for tracking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants