cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Update ALL links when Page name changes

Update ALL links when Page name changes

(22)
Here's a common scenario:

 

An instructor makes a page, let's say a module overview page, and then links to this page from a custom Home page. While developing the course, the instructor changes the name of the module overview page. This breaks the homepage link because the page URL contains the page name.

 

Please create a system to avoid this common problem.

65 Comments
anthony_sales1
Community Participant

I have to say this is a real bugbear for me - this is a flaw or a bug - not a feature request - it makes absolutely no sense for internal links to internal pages to break when you change the name - given that this does not happen for any other objects in canvas e.g. assignments, quizzes etc - I can think of no scenario in which a user would want links to an internal content page to break when the name is changed. In fact all that is required is a simple script which runs when you change the name of a page - this checks for any internal links to the page and changes the name if found...

The fact they are aware of this and have said they have no intention of fixing it anytime soon speaks volumes about their attitude to user needs. In fact I think this issue is such a flaw, unless it is fixed I really won't be able to support a renewal of our contract when it expires... Smiley Sad

For example - I have just created a new course from our template - updated all of the unit/page names and now there are 511 broken links which I have to go through manually and change...

anthony_sales1
Community Participant

Well their standard defense is that that have to use the page names as URL's for accessibility purposes (they use this excuse often) - which is nonsense for two reasons - firstly none of the other objects in canvas follow this URL naming procedure e.g. quizzes, assignments etc, and secondly even if they insist on using the page name as the URL, there is simply no need for internal links to it to break on a name change - it would be a simple script job... Don't hold your breath they haven't updated the page editor etc for 8-9 years - apparently page content is not a priority, and what they really want to do is sell you another expensive add-on...

lph
Community Champion

This has bitten me several times this past year. Pretty URLs aside, as someone pointed out that assignments can be renamed. I'm almost to the point of putting more content in assignments than pages. This way I can change names.

Here is a neat trick:

On the pages list, click on the kabob (more option, 3 vertical dots) and hover over Share to Commons. A link will show in the bottom left corner of the browser. The last part of the link with be a series of numbers which are equal to the page ID.

Once you have the page ID then you can link. Here is a sample:

/courses/7465/pages/4518‍‍‍

What I've tested:

The page name can be changed and the link still works.

What I haven't tested:

Copying the course page to another course. Since the page ID is changed then I'm not sure if this link is updated. I'll update this post once this has been tested. Feel free to tinker with it yourself. 

Update: The copy process changes the link from the page ID to the name of the page (for the new course). If you use a master shell, and make a copy of this master shell then it looks like you'd not want to make changes in it, and stick to making changes in the master shell.

James
Community Champion

lph,

 

Here is another way to get the page ID that will work even if someone doesn't have access to Commons.

  1. Open the content page that you want to find the ID for in the browser. You do not need to edit it, just open it.
  2. Open the browser's developer tools by pressing the F12 key.
  3. Switch to the Console tab of the developer tools
  4. Paste ENV.WIKI_PAGE.page_id into the console and press enter (you may have to hit enter twice). Note that with recent versions of Chrome, you don't even have to press enter for it to show the result.

If you have a lot of these to do, you can leave the developer tools open as you navigate the pages. You can also hit the up arrow key to bring up the console history and repeat the command.

lph
Community Champion

Excellent idea.

anthony_sales1
Community Participant

Thanks for the tip about the numbers and testing it with a course copy, but if I can’t copy the course it defeats the object of changing the links – the fact that links break is still a massive bugbear… ☹

anthonem
Community Contributor

Thanks Layne! So, there is a page ID, but it doesn't "stick" on course copy. Ugh! So frustrating. 

lph
Community Champion

Hi  @James ‌

Have you considered a tool that would rapidly change all page links from pretty URL to page ID?

There is a course of mine with hundreds of pages and internal links (big mistake!). If the links can be changed from ID to pretty URL during course copy then maybe the opposite is true. This would allow development of pages to be faster. 

As an aside, I suspect Canvas developers have never been bitten by this issue. It’s a huge time waster. If ID can be used for assignments then it can (and should) be done for pages. 

James
Community Champion

lph,

No.

The conversation around this says that when you copy a course, the pageID doesn't stick. That would make it less usable than a pretty URL.

Besides, I've always liked looking at the URL to know what page I was going to rather than just page 8249. It instills more confidence that you're not just headed to some random page.

I am actually opposed to changing the links automatically, but I see where some people would benefit from that option. When I was first starting off, I was bitten by lack of planning on my part and wished for that feature. Now I try to think a little before I create pages so it's not such a big deal. My name changes now happen before I link or because I want to move an old page out of the way to make room for a new page with the same name.

rpayne4
Community Participant

Is there any fix that people have found that can be shared with teaching staff? The ID fix that people have been discussing in this thread is great but hard to teach teaching staff who aren't as tech savy to use.
Another solution to the problem being addressed in this idea could be a site wide switch in the admin controls that just flips page urls from operating on names to page ids?

James
Community Champion

 @rpayne4  

The Page ID thing is not great as it doesn't work when you copy a course. Please don't use it until Canvas makes the page ID change to the new ID.

The best practices solution is to plan things out better ahead of time and not link to documents until you have finalized your naming scheme. For people like me who develop on the fly, that doesn't usually fit with my style. I may be in the minority in other ways because I do not automatically want all of my links to be adjusted when I rename a page.

The content pages were originally called wiki pages. In MediaWiki, the software behind Wikopedia, there is the ability to add a redirect to a page so that if you renamed it, it could send people to the new location. If you didn't want it to automatically forward, you didn't have to. That was one feature of the wiki that was missed when Canvas developed their version.

rpayne4
Community Participant

 @James ‌

Ah the MediaWiki history explains why this behaviour exists! Can't wait for the ids to be official, it can't come sooner!

Yeah definitely not trying to get others to use the current method but the amount of users I'm having to help with the broken links at the moment is rough. Anyone know anything about when we could see PageIDs implemented properly? I know this idea has been open for almost half a decade now with no action, is there another idea page for implementing ID urls?

James
Community Champion

I think you misunderstood what I wrote, or at least what I intended to say.

Page IDs exist because everything in Canvas has an ID. This has nothing to do with wikis.

Almost everything except for content pages is referred to by the ID. However, people like pretty URLs and don't want to refer to page 124529, they would rather see it say how-to-embed-an-image. 

My reference to MediaWiki was that Canvas started off with the name "wiki" for their content pages, but they didn't follow the example of the (arguably?) most popular wiki. They listened to faculty and decided what faculty were asking for. They have the ability for faculty or students to edit. There's a revision history so you can return it to where it was. But the faculty probably didn't mention the ability to redirect pages ... it's not a main feature inside a course. Much of what Canvas did write initially was about content creation, not about changing it once it was written.

That really messed me up my first semester using Canvas (Fall 2012). Since then, I try to come up with a consistent naming scheme that I stick to and the problem is minimal for me. If I do change a name, I can use the link validation feature to find the places that need changed. That link validator wasn't always there.

The request to use a page ID instead of a friendly-url is a hack. Most people don't want numbered pages; the reason people are asking about the page ID is because they can't get what they really want, which is the ability to rename all of the links when you change a page name. 

Your "Can't wait" statement is likely to be a very long time. I have no knowledge or expectation that Canvas will start changing IDs when courses are copied, although that could be a feature request in and of itself. Canvas supports the URL for content pages and so they see no need to support linking by page IDs and changing the page when that happens.

Much of what Canvas works from is the documented behaviors. If A happens, then B will happen. It doesn't document any behavior when A doesn't happen. Likewise, C might cause B, but if it isn't documented, then Canvas doesn't feel compelled to keep that behavior if something else comes along.

Using Page IDs is one of those things that "works but is unsupported" and that means that it could change at anytime and Canvas won't apologize for breaking it because you were using an undocumented feature. Many people in the Community who implemented added functionality have been hit by the "undocumented and unsupported" being deprecated.

traciebosket
Community Contributor

This would save me hours of work, literally.

Please do this one!!!  

melody_pathkill
Community Member

Pages having unique IDs is a MUST. Friendly-URLs is a bonus.

That said, it is possible to find a balance between IDs and friendly-URLs where the friendly part of the URL is added on but not link-breaking.  At this point, links breaking from title changes is more of a bug than a feature. I'm hoping the new rich content editor will bring opportunity to finally implement this highly requested function.

Thanks everyone for your page ID advice. I will pass the information on. 

sendres
Community Participant

It's unacceptable that system-generated links change when you rename a page. It's therefore a bug. Fixing this should be "bug fix priority" not "feature request" priority.

anthony_sales1
Community Participant

Lol, don’t hold your breath! I have been arguing this for about two years – At first they said it was on purpose for accessibility reasons – that VI users liked the name of the page in the URL! But having worked with VI users for 15 years this is complete nonsense – and none of the other objects in Canvas follow this protocol. I have challenged them to come up with just one scenario in which someone would want internal links to content pages to break when they changed the name tumbleweed. Even if there was some bizarre reason for doing this giving us a choice when changing a name would be nice – e.g. a dialogue box pops up and says would you like to retain internal links to this page?

daniel_wells
Community Member

I think that with how many are moving online right now with covid-19 who have very little experience with online instruction, this is a critical aspect that needs to be fixed. What needs to happen is that when a page is created, the web address name is a number or something arbitrary to the name of the page. This address would be constant and the name for the page should be in no way connected to the web address. Probably a lot more in depth than that, but upfront it seems possible.

aimee_garten1
Community Member

This situation continues to haunt me and my faculty. Honestly, it's driving me a bit insane. With so many additional users in Canvas right now (during distance learning due to pandemic), a user experience feature like this is needed. PLEASE. Sorry for shouting.

peter_lombardo
Community Member

This is a great point and is definitely an area of frustration when adjusting titles and other naming conventions.