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.
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?

Postby 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.leaflabs.com/pub/leaflabs/maple-docs/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.leaflabs.com/pub/leaflabs/maple-docs/0.0.12/lang/api/hardwaretimer.html

User avatar
RogerClark
Posts: 5465
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?

Postby 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?

Postby Luc_Exe » Mon Nov 21, 2016 10:01 pm

Last edited by Luc_Exe on Tue Nov 22, 2016 1:05 pm, edited 1 time in total.

User avatar
RogerClark
Posts: 5465
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?

Postby 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?

Postby 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: 5465
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?

Postby 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 ;-)


Return to “Ideas & suggestions”

Who is online

Users browsing this forum: No registered users and 1 guest