Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: Broken Links?  (Read 3641 times)

aBc

  • Staff Member
  • 128 MB
  • ****
  • Posts: 228
  • FdB•FBz•aBc
Broken Links?
« on: April 12, 2024, 12:59:48 PM »

Is there a quick fix  / shortcut whereby individuals might possibly edit and correct broken links, other than reporting and requesting a fix? Or is it a manual, case-by-case occurrence scenario?

Here’s one:
http://macos9lives.com/smforum/index.php/topic,762.msg10461.html#msg10461

Have encountered 4 or more today and don’t relish the idea of collecting and presenting an extensive list, if there’s possibly a simpler way or fix. ;)

Perhaps a stupid question - but I had to ask.
« Last Edit: April 12, 2024, 01:26:41 PM by aBc »
Logged
TRY the Original MacOS9Lives theme “Blu” / via your Profile --> Look and Layout settings.

ssp3

  • 512 MB
  • *****
  • Posts: 926
Re: Broken Links?
« Reply #1 on: April 12, 2024, 01:16:06 PM »

I've raised this question before. Start from here:
http://macos9lives.com/smforum/index.php?topic=7031.msg54282#msg54282
Logged
If you're not part of the solution, you're part of the problem.

aBc

  • Staff Member
  • 128 MB
  • ****
  • Posts: 228
  • FdB•FBz•aBc
Re: Broken Links?
« Reply #2 on: April 12, 2024, 01:28:40 PM »

Thanks. So in essence, according to Knez that answer is no.

The only thing we can do at this point is to edit the posts we stumbled upon (ask a mod using the "report post" function) to change it to the technically original, unaltered link (the second link).

I can look into scripting the thing, but I'm not sure if it's worth the effort.

However, if I manually alter the slash to a "question mark" and the comma to an "equal sign" in the address; the prior linked page then loads.



https://macos9lives.com/smforum/index.php/topic,762.msg10461.html#msg10461

https://macos9lives.com/smforum/index.php?topic=762.msg10461.html#msg10461
« Last Edit: April 12, 2024, 01:55:16 PM by aBc »
Logged
TRY the Original MacOS9Lives theme “Blu” / via your Profile --> Look and Layout settings.

ssp3

  • 512 MB
  • *****
  • Posts: 926
Re: Broken Links?
« Reply #3 on: April 12, 2024, 02:45:55 PM »

Yes, it is that easy.
Later in that thread I suggested using something similar to BBEdit's multi file search and replace.
Although I know nothing about SQL databases, I still don't want to believe that there are no tools that can do something similar.

https://www.sqltutorial.org/sql-string-functions/sql-replace/
Logged
If you're not part of the solution, you're part of the problem.

Knezzen

  • Staff Member
  • 1024 MB
  • ******
  • Posts: 1265
  • Pro Tools Addict!
    • Macintosh Garden
Re: Broken Links?
« Reply #4 on: April 13, 2024, 12:43:58 AM »

I have been trying to narrow it down in a copy of the production database, so it's being worked on. It's my youngest sons birthday today, so I'll have more time to fiddle with it tomorrow.

But yeah, there's a function in simplemachines that "rewrites" the URL to something that was deemed more search engine friendly back in the early 2010's. Time has moved on and such rewrites are not compatible with newer web servers. Looking back at older posts, it was turned off in the very beginning and turned on some time around 2018 or so.

So it's either that we poke at the database, or edit every link in every post as we stumble upon them. Hacking up the web server to support this rewrite rule probably breaks something and running an old version of the web server just for the links is not really on the table.

We're using the "real" and "unmodified" URL's now, so the best solution and future safe solution is to use what we have now and edit the older posts manually or scripted to change them to the correct URL.
Logged
Pro Tools addict and staff member at Mac OS 9 Lives!, System 7 Today and Macintosh Garden.

Jubadub

  • 256 MB
  • *****
  • Posts: 453
  • There is no Mac in OS X
Re: Broken Links?
« Reply #5 on: April 13, 2024, 01:20:31 AM »

Are all posts perhaps stored in a DB table? If so, couldn't all posts get mass-edited with some SQL string functions to detect when an URL begins and ends within a post, then apply the check/replace? (Assuming it supports SQL etc..)

Of course, there's no reason to rush it. :) We will go with whatever works better for you, since all of this takes your time more than anyone else's.
Logged

Knezzen

  • Staff Member
  • 1024 MB
  • ******
  • Posts: 1265
  • Pro Tools Addict!
    • Macintosh Garden
Re: Broken Links?
« Reply #6 on: April 13, 2024, 01:38:17 AM »

Are all posts perhaps stored in a DB table? If so, couldn't all posts get mass-edited with some SQL string functions to detect when an URL begins and ends within a post, then apply the check/replace? (Assuming it supports SQL etc..)

Exactly, but it needs to be specific to overwrite only the correct URL's.
Logged
Pro Tools addict and staff member at Mac OS 9 Lives!, System 7 Today and Macintosh Garden.

Knezzen

  • Staff Member
  • 1024 MB
  • ******
  • Posts: 1265
  • Pro Tools Addict!
    • Macintosh Garden
Re: Broken Links?
« Reply #7 on: April 13, 2024, 08:33:40 AM »

Looking into this some more. There's 1159 posts with the "wrong" type of link URL and 976 posts with the type of link we have now (again).
« Last Edit: April 13, 2024, 09:04:42 AM by Knezzen »
Logged
Pro Tools addict and staff member at Mac OS 9 Lives!, System 7 Today and Macintosh Garden.

Knezzen

  • Staff Member
  • 1024 MB
  • ******
  • Posts: 1265
  • Pro Tools Addict!
    • Macintosh Garden
Re: Broken Links?
« Reply #8 on: April 14, 2024, 02:28:01 AM »

It looks like I solved this with the some configuration wizardry on the server side. Both types of links should be working now, without having to edit anything in the database :)
« Last Edit: April 14, 2024, 06:41:56 AM by Knezzen »
Logged
Pro Tools addict and staff member at Mac OS 9 Lives!, System 7 Today and Macintosh Garden.

Jubadub

  • 256 MB
  • *****
  • Posts: 453
  • There is no Mac in OS X
Re: Broken Links?
« Reply #9 on: April 14, 2024, 05:47:17 AM »

Nice work! :)
Logged
Pages: [1]   Go Up

Recent Topics