Re-naming a page and back again breaks 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.
7/8/2011 4:30:03 AM
Gravatar
Total Posts 537
feet planted firmly on the ground

Re-naming a page and back again breaks it

Hi Joe

If I re-name a page (and allow its URL to be updated accordingly) and save, all good. If I change my mind and rename it back again (and the URL) to what they were originally, than I can no longer navigate to the page. Clicking on the menu item (which has correct href) gives:

Server Error

404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

I'm using extensionless URLs.

I'm thinking something must be a bit wrong in the database but nervous of breaking more if I dive into the tables! How do I get the page back to its original name and URL?

yours

Crispin

mojoPortal Version 2.3.6.7 MSSQL  (built yesterday by lardyboy who talked to you about registration bug)
Operating System Microsoft Windows NT 6.0.6002 Service Pack 2
ASP.NET Info v4.0.30319 Running in Full Trust

7/8/2011 7:24:27 AM
Gravatar
Total Posts 537
feet planted firmly on the ground

Re: Re-naming a page and back again breaks it

A little more information on this... I created a new page with the original name - it seemed to work fine but was at the end of my menu.

Then I deleted the bad page, and moved my new one in the menu to where the original had been. Then it stopped working again.

Although the href for the menu link is "my-diary" (correct), which I navigate to this it actually navigates to "diary" (which is the name I renamed the page to temporarily) and so gives a 404.

Does this help narrows down where the problem is? and how I can fix it?

cheers

Crispin

7/8/2011 1:49:28 PM
Gravatar
Total Posts 18439

Re: Re-naming a page and back again breaks it

Hi,

I've answered similar questions quite a bit lately so I decided to create this article to explain what is going on in detail.

Renaming Pages and Changing Urls

Hope that helps,

Joe

7/8/2011 2:14:29 PM
Gravatar
Total Posts 537
feet planted firmly on the ground

Re: Re-naming a page and back again breaks it

Hi Joe - that makes perfect sense and yes I fixed the problem by removing the unwanted 301 redirects.

Thanks very much for your help

Crispin

7/10/2011 2:42:06 PM
Gravatar
Total Posts 537
feet planted firmly on the ground

Re: Re-naming a page and back again breaks it

A subsequent thought (given how this one clearly catches a lot of people out)... it might be useful to prompt the whether to create a 301 re-direct when re-naming a page?

e.g. "Do you want mojoPortal to create a 301 re-direct from the old page name to the new one? (if the old page has been indexed by search engines this is a good idea)"  YES/NO.

In a lot of situations I wouldn't want to, because this page re-naming only happens during early site creation, when there is no risk of having indexed the old pages. Being able to re-name the page without creating the redirects would avoid ending up in the confusing situation where it looks like it's broken.

yours

Crispin

7/12/2011 8:09:12 AM
Gravatar
Total Posts 18439

Re: Re-naming a page and back again breaks it

I think prompting people about things they probably don't understand is a recipe for bad user experience. My goal was to help people do the right thing even though they may not understand what the right thing is. The article is so that the more technical people can understand what is going on and make informed decisions of their own. I agree that renaming pages is much more common on newer pages that is why we do have it enabled by default.

I do have an item in my project tracker that I think would be a good solution when I can get to it. The idea would be that if you disable the url suggestion for existing pages that are renamed, then in that case we could add a little link that says "Suggest New Url?" so that it would not change the url by default but you could click the link to make it suggest a new url.

I don't know when I will get to it, its kind of a gold plating item compared to other things that need to be done, but it is in the project tracker and eventually I will get to it.

Best,

Joe

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