Url must start with ~/ or http:// or https:// and it ....

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
1/1/2010 3:14:39 AM
Nux
Gravatar
Total Posts 183

Url must start with ~/ or http:// or https:// and it ....

Hey,

first of all: a happy 2010 :)

Secondly: since I have updated my sites (to 2.3.3.2), I get this error when saving the home page of the sites:
Url must start with ~/ or http:// or https:// and it should have no white spaces in it. On all my sites, I used "~/" as the url for the home page and that worked well till now. Now, when I save my page, I got this error, while it says in the error that what I'm doing is correct.

Bug?

Thanks
Stef

1/2/2010 5:04:58 AM
Gravatar
Total Posts 18439

Re: Url must start with ~/ or http:// or https:// and it ....

Hi Stef,

I'm not seeing this issue. If you upgraded to 2.3.3.2 immediately after it was released you might try downloading and deploying it again. There were a few minor patches applied after the initial release.

Alternatively, I'm thinking of putting out an interim build for those who would like to test the new file manager improvements (you can also try them on demo.mojoportal.com). If you would be interested in trying the new build let me know.

Best,

Joe

1/2/2010 7:27:16 AM
Nux
Gravatar
Total Posts 183

Re: Url must start with ~/ or http:// or https:// and it ....

Hey Joe,

the problem is that all my home pages are setup with an url like  "~/". So now, since my updates, I can not save the home pages anymore or I have to choose another url. And I have the latests source, since I have downloaded the files again couple of days after the first release of that version.
The question is: why do we get this error, since ~/ is possible corresponding the error description.

About the file manager: I don't use it in my site. I have looked at it, but I found it "dated" with those ugly images. But I have checked the new version of the demo site, and man, that is much better than the old one. I guess this is now a link on the master to test it? But in the future it will be a module? 

Stef

1/2/2010 8:51:50 AM
Gravatar
Total Posts 18439

Re: Url must start with ~/ or http:// or https:// and it ....

Hi Stef,

I cannot produce the issue you describe about saving the home page. So far no-one else has reported this issue, so I still say if you downloaded version 2.3.3.2 before 2009-12-23 (which is the last time it was patched) then I would either download and deploy it again or as I said I can produce you a newer build that includes the new file manager.

The new file manager is not going to become a module, it is a real file manager not related to the Shared Files feature. File manager is available from Administration > File Manager but this was not available for other users who have permissions to upload files. Previously non admins could only upload files from the image browser in the wysiwyg editor. Now if the user is in a role that can both upload and a role that can delete files then they will see the link for the file manager so they can manage files without having to go into the editor. They are still limited to specific folders according to roles and configuration just like in the editor image browser.

Note that the old File Manager is not going away either, you can toggle between the old and new one using the Alternate File Manager link. While the new one is prettier, the old one has a few advantages of its own, and the old one was prettied up some in version 2.3.3.2 if you added the css to your style.config as mentioned in the release announcement. The advantages that the old file manager retains over the new one include bulk uploading and the fact that it can work with javascript disabled where the new one cannot.

What I want to do next is add a little hideable panel for the main admin links since they are starting to clutter up the page.

I also "may" try to pretty up the Shared Files feature to use the same UI at some point.

Best,

Joe

1/2/2010 8:58:16 AM
Gravatar
Total Posts 18439

Re: Url must start with ~/ or http:// or https:// and it ....

Try adding this to your user.config

<add key="UseClosestAsciiCharsForUrls" value="false" />

and see if it solves the issue about saving pages.

Best,

Joe

1/2/2010 10:48:15 AM
Nux
Gravatar
Total Posts 183

Re: Url must start with ~/ or http:// or https:// and it ....

Joe,

I added the key, but without any luck.
But I'm a bit confused about the fact that you say that cannot produce the issue.
I went to the demo site, created a page "Stefs new page" and added the page with the normal url.
After that, I went back to the page settings and changed the url to "~/" (strange thing is that the ~ is must higher than expected) and I also get the error. Check this image to see what I mean.

Stef
ps: the files I have used are from 2009-12-25.

1/2/2010 10:58:09 AM
Gravatar
Total Posts 18439

Re: Url must start with ~/ or http:// or https:// and it ....

Oh,I did not understand what you were saying, I assumed you meant your urls start with ~/ as they should. I did not know you meant that was the entire url. I have never even tested that scenario.

Usually on the home page I just name it ~/home or ~/home.aspx and then override the cannonical url with the site root like http://siteroot.com/

Best,

Joe

1/2/2010 11:06:38 AM
Gravatar
Total Posts 171
I am a Russian programmer

Re: Url must start with ~/ or http:// or https:// and it ....

Joe, It was a bug you've fixed

Remember:

pageSettings.Url = "~/" + friendlyUrlString;
change to

if (friendlyUrlString.Length != 0)

{
pageSettings.Url = "~/" + friendlyUrlString;

}
 

in 2.3.3.4 All right

Best regards, Alexander

1/2/2010 12:11:53 PM
Gravatar
Total Posts 18439

Re: Url must start with ~/ or http:// or https:// and it ....

Yes, I'm looking into this now.

Why was it a bug?

Maybe in fixing that one we caused a new one.

I'm thinking the logic should be:

if ((txtUrl.Text.StartsWith("http"))||(txtUrl.Text == "~/"))
{
pageSettings.Url = txtUrl.Text;
}
else if(friendlyUrlString.Length > 0)
{
pageSettings.Url = "~/" + friendlyUrlString;
}

 

Best,

Joe

1/2/2010 12:16:41 PM
Gravatar
Total Posts 18439

Re: Url must start with ~/ or http:// or https:// and it ....

Actually, Stef is talking about version 2.3.3.2, he is not using svn code so this recent svn change did not cause the issue though it would prevent saving the url as ~/ in my tests.

The actual bug was introduced when I added a regular expression validator for the url.

Stef, if you edit the /Admin/PageSettings.aspx page with a text editor I think you can solve this right away for version 2.3..2

Look for the RegularExpressiosn validator for url and change the epxression to this:

((http\://|https\://|~/){1}(\S+){0,1})

where previously it was requiring some non white space chars after the  ~/

this will fix that.

I am fixing both the regex and the save logic in my copy.

Best,

Joe

1/2/2010 12:54:07 PM
Nux
Gravatar
Total Posts 183

Re: Url must start with ~/ or http:// or https:// and it ....

That is indeed the solution.
I changed it and now it works again.

Thanks

You must sign in to post in the forums. This thread is closed to new posts.