Links to leafabs site in old comments are broken. Fix by replacing part of the url?

What could be included in further releases, or for the forum.
Post Reply
User avatar
Luc_Exe
Posts: 37
Joined: Fri May 01, 2015 6:08 pm
Location: Viña del Mar, Chile

Links to leafabs site in old comments are broken. Fix by replacing part of the url?

Post by Luc_Exe » Mon Nov 21, 2016 7:33 pm

Not sure if someone has asked before, but with the new leafabs site up, they also changed the location for the docs. Thus, all the links for that site in the comments are now broken, showing an error when you try to access. That's pretty bad because we lost important information provided by the users in the comments.

The problem seems to be in just a part of the url. Tried replacing a few of the broken links with the new url prefix and it seems to work ok, but I can not be sure if its going to work in every leafabs doc link, and less sure if they are going to be for the intended version.

But anyway, it may worth a try. Maybe a massive text replace in all the comments (proceed with caution and make a good backup before hahaha) :lol:

This is a broken url (old prefix in red)
http://www.leaflabs.com/docs/lang/api/hardwaretimer.html

This is a new url (new prefix in red)
http://docs.leaflabs.com/static.leaflab ... ocs/0.0.12/lang/api/attachinterrupt.html

So if we take the new prefix and add the rest of the broken old url, it works ok. Changed only the different part just in case.
http://docs.leaflabs.com/static.leaflab ... timer.html

User avatar
RogerClark
Posts: 6673
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Links to leafabs site in old comments are broken. Fix by replacing part of the url?

Post by RogerClark » Mon Nov 21, 2016 9:04 pm

Can you post links to the pages with URL s that need to be updated

User avatar
Luc_Exe
Posts: 37
Joined: Fri May 01, 2015 6:08 pm
Location: Viña del Mar, Chile

Re: Links to leafabs site in old comments are broken. Fix by replacing part of the url?

Post by Luc_Exe » Mon Nov 21, 2016 10:01 pm

Found those. I didn't search too deep, and covered only links to docs (saw some broken links to the leafabs forum). Also I think I missed 2 quotes in one of the last 3. I will report here if I find more.

# - (number of broken links) - Link to the message

01 - (3) - http://www.stm32duino.com/viewtopic.php?t=696#p7614
02 - (1) - http://www.stm32duino.com/viewtopic.php?t=614#p6306
03 - (1) - http://www.stm32duino.com/viewtopic.php?t=1061#p12871
04 - (1) - http://www.stm32duino.com/viewtopic.php?t=502#p4869
05 - (1) - http://www.stm32duino.com/viewtopic.php?t=634#p6612
06 - (1) - http://www.stm32duino.com/viewtopic.php?t=364#p3398
07 - (2) - http://www.stm32duino.com/viewtopic.php ... t=20#p3487
08 - (1) - viewtopic.php?f=28&t=406#p3732
09 - (1) - viewtopic.php?f=3&t=378#p3391
10 - (2) - viewtopic.php?f=3&t=358&p=3184#p3184
11 - (1) - viewtopic.php?f=3&t=140&p=1243#p1243
12 - (1) - viewtopic.php?f=44&t=130&p=1078#p1078
13 - (1) - viewtopic.php?f=44&t=106#p696
14 - (1) - viewtopic.php?f=27&t=61&p=312#p312
15 - (1) - viewtopic.php?f=32&t=31#p260
16 - (1) - viewtopic.php?f=28&t=37#p143
17 - (1) - viewtopic.php?f=17&t=10#p39

Edit: yesterday's was an ugly list, sorry. Now it's easier to read.
Last edited by Luc_Exe on Tue Nov 22, 2016 1:05 pm, edited 1 time in total.

User avatar
RogerClark
Posts: 6673
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Links to leafabs site in old comments are broken. Fix by replacing part of the url?

Post by RogerClark » Tue Nov 22, 2016 7:13 am

OK

Thanks.

User avatar
Luc_Exe
Posts: 37
Joined: Fri May 01, 2015 6:08 pm
Location: Viña del Mar, Chile

Re: Links to leafabs site in old comments are broken. Fix by replacing part of the url?

Post by Luc_Exe » Tue Nov 22, 2016 1:44 pm

Thanks to you.

I thought there will be tons of broken links and they going to need some kind of mass replace in the BD, but actually the list was not that big.

User avatar
RogerClark
Posts: 6673
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Links to leafabs site in old comments are broken. Fix by replacing part of the url?

Post by RogerClark » Tue Nov 22, 2016 8:08 pm

About the only way to do a global search and replace would either need a special plugin, or for me to take the site offline backup the DB, then run a search and replace and then restore the db and put the site back online.

Its going to be safer to do this manually ;-)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest