Very seriously - Error with the same URL pages

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.
2/14/2010 6:05:05 PM
Gravatar
Total Posts 171
I am a Russian programmer

Very seriously - Error with the same URL pages

Hi, Joe

Earlier I wrote that you can make pages with the same URL

All Sunday I was searching for how to do it and found

1. Make new page with

Page name = "New"

Use Url? = false

Url = "~/U.aspx"

2. Make next new page with

Page name = "Next New"

Parent Page = "New"

Use Url? = false

Url = "~/U.aspx"

3. Select Page "New" and in Page Settings set

Use Url? = true

4. Select Page "Next New" and in Page Settings set

Use Url? = true

And after these actions, both pages will have the same URL

And above all Both pages will not be visible on the screen and they will not be visibleAdd/Edit Pages. Only editing the database will be able to correct this situation.

 

The reason for this error in the verification:

PageSettings.aspx.cs

pageSettings.Url != txtUrl.Text

It does not check the value of the field UseUrl

Best regards, Alexander

P.S. I think that the whole logic of the whole expression is bad

((friendlyUrl.FoundFriendlyUrl) && (friendlyUrl.PageGuid != pageSettings.PageGuid))
&&(pageSettings.Url != txtUrl.Text)
&& (!txtUrl.Text.StartsWith("http"))
)
 

2/14/2010 8:19:25 PM
Gravatar
Total Posts 11

Re: Very seriously - Error with the same URL pages

If you create your original page and only want to point a new page to the original you can use the Redirect Manager after the new page has been created. It still remains in the site hierarchy if you want to edit and remove the redirect in the future.

This seem easier than what you are trying to do.

2/14/2010 8:37:06 PM
Gravatar
Total Posts 171
I am a Russian programmer

Re: Very seriously - Error with the same URL pages

I am shudder with horror

Joe, you never update the table mp_FriendlyUrls, only add to it records

The table is filled records with the same values of the field FriendlyUrl

The problem in your code is in lines

FriendlyUrl newFriendlyUrl = new FriendlyUrl();
newFriendlyUrl.SiteId = siteSettings.SiteId;
newFriendlyUrl.SiteGuid = siteSettings.SiteGuid;
newFriendlyUrl.PageGuid = pageSettings.PageGuid;
newFriendlyUrl.Url = friendlyUrlString;
newFriendlyUrl.RealUrl = "~/Default.aspx?pageid=" + pageId.ToString(CultureInfo.InvariantCulture);
newFriendlyUrl.Save();

But you forget that the record can not only add but also updated

This case, you must assign a value to field urlID

2/14/2010 9:17:49 PM
Gravatar
Total Posts 171
I am a Russian programmer

Re: Very seriously - Error with the same URL pages

Joe, now in Russia, 6 am and I spent the whole night looking for bugs in your code. This error in the basic functionality of CMS. Over the past 3 months I have corrected more than 15 errors. When I choose a system of thought that with the basic functionality is all right. Modules of course a little, but I will write new modules. The result is that the basic functionality is buggy, and even in the basic modules (HTML content and Blog) is not enough functionality. For example, such that the editor page or blog can not leave notes on the page for yourself. This does not set out a separate field. Or in your concept of the basic functionality is just input from user and output it to screen? After analyzing all and above all looking websites in the section "mojo Sites" I saw: Most sites on the system has up to 15 pages with the standard design. That is why so many enthusiastic words referred mojoportal. It allows you to quickly create similar sites. And they are not interested in errors in the work Or that would develop their own websites. Sites do not develop. Some references to them do not even work.

Why is this happening? Why 3 years back you took 1 st place in the world and now only the third? Lately I am following the system, it does not develop in the right direction. Why? Once again you want to be the best in the world?

Best regards, Alexander

2/15/2010 7:08:00 AM
Gravatar
Total Posts 18439

Re: Very seriously - Error with the same URL pages

Hi Alexander,

I appreciate you reporting bugs, but I do not appreciate the tone you are taking with me. You use my free product, you report bugs and I fix them quickly. Try that with a commercial product. You of all people should be grateful for the very responsive support I have been giving you. It seems like if you have to invest any of your own time it is always horrible for you.

Do you think commercial products have no bugs?

Do you think other open source projects are bug free?

If you are so horrified with my work I invite you to go report bugs to some other project and see if you like it better.

mojoPortal has never been first in the world, by chance we won a contest by a small British Publishing company a few years ago. Like any company or project you make as much hay about it as you can when you win a contest but it was really not a big deal contest, it is mostly a marketing campaign for the publishing company.

mojoPortal has consistently improved in both feature set and quality in incremental continuous fashion and continues to do so. It also continues to grow in popularity and is far more popular than it was 3 years ago because it delivers a great feature set and out of the box experience.

Lately I am following the system, it does not develop in the right direction

People always think the way it needs to grow is to immediately support all their specific needs. I listen to feedback and it does to a great extent drive direction, but at the end of the day I'm one guy working 7 days a week and barely eeking out a living and what I work on has to be what I think will help me make a living.

I would like it if you keep using my free product and keep reporting bugs as you find them but if you think we have too many bugs and the project is going in the wrong direction perhaps you should try some other options and get a better perspective on the way things really are.

Best Regards,

Joe

2/15/2010 11:39:12 AM
Gravatar
Total Posts 18439

Re: Very seriously - Error with the same URL pages

Hi Alexander,

I have fixed the problem where a page could be created with a duplicate url. The bug was that we were only creating the friendly url if use url was checked, when we should create it any time an url is provided because you could change that setting back to true at any time. So because we did not create the frioendly url, the url would not work even if it was not duplicated and this caused the possibility of pages with the same url because we only check if we are duplicating friendly urls, we don't check against the mp_pages table. By making sure we always create a friendly url if an url is provided means we will not allow pages to have duplicate urls.

Futhermore, I have changed to hide this Use Url setting by default, if you want to show it, then you can add this to your user.config:

<add key="ShowUseUrlSettingInPageSettings" value="true" />

I left this setting in back in 2005 when I first implemented friendly urls and wasn't sure how well it would work. For less user support issues I decide now to hide it by default since people generally should use SEO friendly urls.

Yes, it is true that we don't update friendly urls, we create them or delete them but we do not change existing ones. In fact it is possible to map multiple friendly urls to the same page from Url Manager if desired.

You say you have duplicate friendly urls in your mp_FriendlyUrls table, are you sure about that? Do they have the same site id? It is possible to use the same friendly urls in each site. We check for duplicates only against the current site.

If you are seeing duplicate friendly urls with the same site id then it would help if you can find steps to produce that problem.

So the main issue you reported is now fixed in svn trunk within 24 hours of your bug report that provided steps to produce the problem. In my opinion this is another example of the excellent support I have provided you for my free product. If you feel somehow this process is not working well enough for you I think you need to adjust your expectations.

Best Regards,

Joe

2/15/2010 11:54:54 AM
Gravatar
Total Posts 171
I am a Russian programmer

Re: Very seriously - Error with the same URL pages

Hi, Joe

You say you have duplicate friendly urls in your mp_FriendlyUrls table, are you sure about that? Do they have the same site id? It is possible to use the same friendly urls in each site. We check for duplicates only against the current site.

 

Yes, with the same site id

If you are seeing duplicate friendly urls with the same site id then it would help if you can find steps to produce that problem.

1. Create new page with

Use Url? = true

Url = "~/U1.aspx"
2. Edit Page Settings for this page. Set

Url = "~/U2.aspx"

3.Edit Page Settings for this page. Set

Url = "~/U3.aspx"

and than see mp_FriendlyUrls and you see 3 records:

FriendlyUrl = 'U1.aspx'  RealUrl = '~/Default.aspx?pageid=24'
FriendlyUrl = 'U2.aspx' RealUrl = '~/Default.aspx?pageid=24'
FriendlyUrl = 'U3.aspx' RealUrl = '~/Default.aspx?pageid=24'

I just did this on my test database

Best regards, Alexander

P.S. I'll answer later about the development of the mojoportal. Now I have been programming....
 

2/15/2010 12:24:39 PM
Gravatar
Total Posts 18439

Re: Very seriously - Error with the same URL pages

Those are not duplicates, they are different friendly urls that map to the same real url, that is allowed. I think the problem is not so much with users changing the urls manually, there was a bug that is already fixed a couple days ago, I realized from this thread that the same thing was happening on Page Settings. If users tab out of page name it was suggesting a new url even if the page name did not change and it was causing these extra friendly urls to be created without user intention. That bug is already fixed in svn. If the user intends to change the url it is allowed but there was a bug that was changing them without the user intending it.  Sorry if this bug caused troubles for you but it is fixed now. I think this bug affected people more if they tend to use only the keyboard and not the mouse because those using the mouse would only click in the page name if they intend to change it but keyboard users will just tab through all the fields and when they tab out of page name it was causing this issue.

I also added today so that if you change the url manually on PageSettings.aspx as in your steps it will delete the previous url. But it is still possible if you want to have multiple friendly urls point to the same page they can be created from url manager.

Best,

Joe

2/15/2010 1:05:23 PM
Gravatar
Total Posts 2239

Re: Very seriously - Error with the same URL pages

I hate to butt in here but I believe changing the logic on PageSettings.aspx to delete a URL when the friendly URL is changed is not a good idea. I say this because as Joe has stated many times, "Good URLs do not change" and the current functionality helps in those terms. Usually, when I change a friendly URL it is because of a typo or misspelling. I usually do not notice the typo until after the page has been in existence for a while so some people may have bookmarks to the page or search engines could have already crawled the site. With the current functionality, if I change the URL the old URL still points to the page which is ideal. If I need to create another page with the original URL, I can easily go delete it in the URL Manager.

If you delete URLs when they are changed via the PageSettings.aspx page I think you are taking a nice "side-effect", dare I say feature, out of mojoPortal. I think it will be more common for people to change a URL because of a typo than because they want to use the URL elsewhere.

Just my thoughts...
-Joe D.

2/15/2010 1:16:13 PM
Gravatar
Total Posts 18439

Re: Very seriously - Error with the same URL pages

Hey Joe,

Because urls should not change but sometime people change them, when an url on a page is changed a 301 permanent redirect is created from the old url anyway, so the fact that previously the old url still existed in mp_FriendlyUrls did not make a difference since the 302 redirect was redirecting from it anyway. So there is not much behavior change.

If you change an url and then want to change it back, you would need to go to the 301 redirect manager and delete the redirect and then you can re-create the original url. 

Best,

Joe

2/15/2010 2:06:02 PM
Gravatar
Total Posts 171
I am a Russian programmer

Re: Very seriously - Error with the same URL pages

Hi, Joe

I also added today so that if you change the url manually on PageSettings.aspx as in your steps it will delete the previous url. But it is still possible if you want to have multiple friendly urls point to the same page they can be created from url manager.

This is the right decision!

Best regards, Alexander

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