Changing topic title



  • I would like to change a topic's title after that topic has been created. I am concerned that the url to the topic will change and I already distributed the link. Can dev team confirm if URL will change upon editing topics title?


  • Staff Admin

    Yes editing the topic title updates the slug and therefore the url.



  • Thanks for the confirmation. Did you guys consider preserving the url after topic was created? This is a widespread issue on many of the largest forums. Happens often in the context of archiving older posts - archiving changes topic urls. But those urls are widely disseminated across web already. This results in gazillions of broken links. Bad user experience, plus Google penalizes sites for broken links.



  • I was going to recommend 301ing the old URL to the new one when it's changed. But this does lead to the potential issue of if it's changed more than once, you'd have multiple 301 redirects (this is an issue because Bing won't follow anymore than 2 redirects. Google is slightly more lenient, but not by much.) A possible idea that would need discussion would be that the system just looks at the TID, rather than straight 404ing due to an incorrect topic title.

    Example:

    Google has https://community.nodebb.org/topic/2647/changing-title-of-topic indexed.
    URL was changed to https://community.nodebb.org/topic/2647/changing-topic-title
    NodeBB detects the 404. So checks for a 200 OK on https://community.nodebb.org/topic/2647/ (a valid link that adds the correct topic title to the URL automatically).

    Not even sure if that's possible, but it was one of those late night thought processes that could be tweaked to come up with an amicable solution. While I was testing this, I found a minor bug, so will throw that on github.


  • Staff Admin

    A few weeks ago we weren't checking the slug for correctness. So https://community.nodebb.org/topic/2647/anythinghere was working. But if you had images in the topic in the form of ![](/no/url) this was causing an api call to the topic and loading the entire topic to solve that we started checking the slug.

    If we can find a solution to that image problem we can go back to ignoring the slug.



  • @baris said:

    A few weeks ago we weren't checking the slug for correctness. So https://community.nodebb.org/topic/2647/anythinghere was working. But if you had images in the topic in the form of ![](/no/url) this was causing an api call to the topic and loading the entire topic to solve that we started checking the slug.

    If we can find a solution to that image problem we can go back to ignoring the slug.

    Ah right, that makes sense.


Log in to reply
 

Suggested Topics

  • 2
  • 1
  • 3
  • 9
  • 29
| |