Roger Goodwin
Nuke Pro Posts:95
|
01/06/2010 6:57 AM |
|
Hi, I am having an issue on a site that I am developing. I have setup the site with a temp url and in the portal alias put both the correct live url and the temp url. I have added links to a text module which when friendly urls are selected hold the main url and don’t use the temp url. This means that when my client views the site, when they select that link it goes to their original site. If i turn off friendly urls it fixes the problem. I want to use friendly urls and also I have done a lot of work so far and don’t want to have to go back through each of the links I have created so far and change them all. I am sure this is either me doing something wrong or a bug in dnn 514. Any one go any suggestions on how I can use friendly urls in a development site and them change once the site goes live.
Thanks
Roger |
|
|
|
|
Joseph Craig DNN MVP Posts:11667
|
01/06/2010 8:44 AM |
|
It is better to use relative links rather than absolute ones. That way, it doesn't matter what the base URL is for the site. If that's not enough of a pointer, please give an example of the way that you are specifying links. |
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|
Roger Goodwin
Nuke Pro Posts:95
|
01/06/2010 9:02 AM |
|
Hi Joe, I agree, I need to use relative links. The problem is that dnn is generating absolute ones. Example: I have a text/html module with the text "read more..." I create a link using the create link > browse > page > select page to link to > ok.
the html generated with friendly urls turned on is different to that when these are turned off.
Code when on:
http://stmon.digitaltradingco.co.uk...sTest.aspx">test link 2
code when friendly urls is off:
read more
This is my problem. I hope this makes more sense!#
Thanks |
|
|
|
|
Joseph Craig DNN MVP Posts:11667
|
01/06/2010 9:21 AM |
|
I just tried this on my test site.
With friendly URLs turned on, the link generated is < a href="/Help/tabid/344/Default.aspx" >link< /a >
With friendly URLs turned on, the link generated is < a href="/Default.aspx?tabid=344" >link2< /a >
Both are relative links and both work. Look at the links in the editor's source mode to see what is happening.
|
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|
Roger Goodwin
Nuke Pro Posts:95
|
01/06/2010 11:23 AM |
|
This is the code generated when I do the same.
http://stmon.digitaltradingco.co.uk...sTest.aspx">test link 2 I previouse versions and I have just tested this I have no issues, i get the same result as you. I have just tested this in another site built on dnn 514 and I get the same result! When you did yours was it on dn 5.1.4? I have just noticed that if you have the check box "track number of times..." selected it gives the correct url if this is not selected then it gives the full url. Is this the same for you? |
|
|
|
|
Joseph Craig DNN MVP Posts:11667
|
01/06/2010 12:01 PM |
|
Mine was a 5.2.0 site.
The first two links in your message are relative, as they use dnncreative as the base url. So is the third, with some addition gunk.
I had the check box unchecked.
Can you confirm that if you view the text in the editor's source or basic HTML modes that you see a correct relative URL?
|
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|
Roger Goodwin
Nuke Pro Posts:95
|
01/06/2010 12:17 PM |
|
I have attached a screen shot of my html module source code. This is exactly what I get as ssoon as I add a link! |
|
|
|
|
Joseph Craig DNN MVP Posts:11667
|
01/06/2010 1:08 PM |
|
That's interesting. Perhaps it is a bug. It's certainly not behaving that way for me in 5.2.
And, you can always edit out the domain part of the URL to get to a relative link.
|
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|
Direct Access
Nuker Posts:14
|
07/20/2010 7:39 AM |
|
I can't see it realy being related to the 514. I'm on 5.2 and experience te same problems.
We build our DNN portals on a local testing server using domains like http://test.domain.com to have our customers pre create their sites content.
After that I made a database backup and restored that with our live server and copied over the complete DNN installation, something we could nicely do as it were the first portals.
On the production server the test domains be came normal http://www.domain.com domains and the old aliasses were dropped. I then discovered that all links within the HTML modules still use the old test domains.
I don't really understand this behavior as it apparently does not allow me to let a customer build there new site on domain x and then switch it over to domain y.
Maybe I'm doing something wrong but both our testing server as well as our production server don't create relative links using the editor. |
|
|
|
|
Joseph Craig DNN MVP Posts:11667
|
07/20/2010 7:39 PM |
|
Without actually seeing a before and after example, it's going to be hard do diagnose this. But, if you are building in hard-coded links, they won't change.
Can you provide and example or two of what the links look like -- in the module content -- before you move a site?
|
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|
Direct Access
Nuker Posts:14
|
07/21/2010 2:05 AM |
|
Makes sense... Here are a couple of screens illustrating the issue.
As you can see the initial link is set to http://test.carmenautomotive.nl while the new link is set towards http://www.carmenautomotive.nl. Of course one could change these links, but that would be by hand and you can't expect end users to do that.
Another problem with this is that when your portal has multiple aliasses, like carmenautomotive and carmen-automoive in this case, the links are still set to the domain on which they are created. So a user entering your site through carmen-automotive will switch to carmenautomotive whenever he or she clicks a link. Not a problem unil it's set to a blank target and popup filters kick in.
Hopefully I am mistaking and need to change a setting for my DNN installations, as I see this behavior as a big issue.
Thanks for the help again! Hope to hear from you guys.
Running on the community edition here by the way.
Regards, Maurits |
|
|
|
|
Joseph Craig DNN MVP Posts:11667
|
07/21/2010 6:45 AM |
|
This is why it is better to use the "Page on my site" or "File on my site" options.
You can also specify links without the leading domain name. That is, use /Home.aspx rather than mysite.com/Home.aspx. The framework will fill in the correct domain name.
There are occasions where there will be problems. Image src= links are the usual culprit. Fortunately, there are modules such as Engage's free F3 module which can perform global search/replace operations on an entire installation.
|
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|
Direct Access
Nuker Posts:14
|
07/21/2010 8:11 AM |
|
Heey Joseph,
Now I'm confused... Your answer implies that I should use the "Page on my site" or "File on my site" option right? But as you can see in my screens this is what I already do.
To clearify, The first screen is the link as is is when I open the existing HTML module and click the editors link icon. The second is when I then click the "browse server" button. There I chose the "Page on my site" option and select the appropriate page. The third screen is the result of this.
You refer to specifying pages without the leading domain, which i understand, but is doing so by hand the only way? That would unfortunately make the system very unfriedly to normal content editors. |
|
|
|
|
Joseph Craig DNN MVP Posts:11667
|
07/21/2010 8:23 AM |
|
Sorry, I didn't intend to confuse you.
If you are using the Page of File on my site feature, then the domain name is not hard-coded into the module content, but will be added by the framework. So, if you change the domain name, the link will change appropriately.
|
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|
Direct Access
Nuker Posts:14
|
07/21/2010 8:26 AM |
|
That's not a problem, but I see why it confused me now as the description you give does not seem te apply here.
I have tested this and found that links do get hardcoded within our portals. This is why I got confused by your answer.
Apparently there is some bug here or do I need to adjust some settings in order for this to work? |
|
|
|
|
Direct Access
Nuker Posts:14
|
07/21/2010 8:34 AM |
|
This is what I got after creating the links according to your explaination.
I've added a screen of the host for reference as well. |
|
|
|
|
Joseph Craig DNN MVP Posts:11667
|
07/21/2010 8:35 AM |
|
Whoops, sorry ...
In the link tool, set the protocol dropdown to "other" and remove the domain part of the url. For example, if you want to create a link to the privacy page, you would specify Privacy.aspx as the URL, rather than mysite.com/Privacy.aspx. DotNetNuke will take care of the rest.
If you look at the html that is saved, you will see href=Privacy.aspx in the link.
If you see the actual domain name in the link, that will not change when you change the domain name.
|
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|
Direct Access
Nuker Posts:14
|
07/21/2010 8:44 AM |
|
I understand and it is getting clear to me that DNN lacks a little here, as I expected it to create relative links fully automatically. But as I read the posts it apparently does not.
Thank you very much for your input Joseph! I'll take this up with the content editors and make sure they have the proper instructions. |
|
|
|
|
Joseph Craig DNN MVP Posts:11667
|
07/21/2010 6:33 PM |
|
I just did some looking around and this, apparently is an issue that has been logged. In prior versions of DotNetNuke (somebody with access to a 4.x site might want to confirm) the relative link was saved if you deselected the "Track View" option.
Look for this, hopefully, to be restored ...
|
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|
Direct Access
Nuker Posts:14
|
07/22/2010 1:35 AM |
|
Now we're talking! The solution, or work around, you gave indeed creates the links relative as I illustrated with te screens below.
If you'd ask me this behavior should be standard for each link created with the 'Page on my site' option, but at least this way it will become a bit easier for the content editors instead of having to change the URL's themselves.
Thank you for the message Joseph. |
|
|
|
|