Post Links Broken


log in or register to remove this ad

Well, yes, Mention -> User has been mentioned elsewhere.

EDIT: I just did some tests. Apparently, .../posts/nnnnnn works. It creates a redirect URL to .../threads/name.mmmm/#post-nnnnnn. So [post] can be supported without doing a full search/replace of the database. You just need to setup the URL rewrite in the BBCODE configuration.
 

Cleon

Legend
I'm still finding many links that don't work because they have "new.enworld.org" instead of "enworld.org" at the start of their http address.

Any change of fixing this? I don't fancy going through all my lists and indexes and changing them by hand!
 

darjr

I crit!
I’ll take a look tonight. Though it might be a very intense query and if so require the site be down for a bit, if so it’ll not happen until later in the week.
 

Morrus

Well, that was fun
Staff member
Yeah, a global search replaces on a post table this size takes the site out for everybody for a while.
 

In theory you can run the search part to get a count of the number of posts affected to determine how long it would take to run. It could also write the post ids of the affected posts to a separate table so that when you run the query again later, it only have to join with the separate table and not search every post again.

The query could be further optimized to just grab the top 500 posts at a time so it could be run while the site it up over the course of several runs:

begin transaction
insert into temp (postid)
select top 500 postid from list_of_postids_from_prior_search

-- loop through temp updating posts however that would be done

delete from list_of_postids_from_prior_search where postid in (select postid from temp)
commit

When the list_of_.... table is empty, you stop running the query. And the 500 can be run with a conservative value of 1 the first time so you can verify the resulting post isn't mangled.

It would also be nice if all the [SBLOCK=""] could be converted to [SPOILER=""] globally.
 


What have been modified?

Plain version

[Post="7278746"]Perin Wolfrider[/Post]
[thread="601348"]IC[/thread] [Thread="598748"]RG[/Thread]

Real version

[Post="7278746"]Perin Wolfrider[/Post]
[thread="601348"]IC[/thread] [Thread="598748"]RG[/Thread]
 

darjr

I crit!
Code:
http://new.enworld.org
to
Code:
https://www.enworld.org
see the original post.

Looking at the posts in your post now.

Thanks!
 


Remove ads

Top