- Posts: 52
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- Links inside of articles are broken after import to K2
Links inside of articles are broken after import to K2
- Geoffrey Mack
- Topic Author
- Offline
- Senior Member
Less
More
13 years 2 months ago #98719
by Geoffrey Mack
Links inside of articles are broken after import to K2 was created by Geoffrey Mack
My client has hundreds of articles, each with hand-coded "Related Articles" links embedded in them. After importing to K2 all of these links are now broken. Is this a common problem? What is the easiest way to fix them?
She's got two other sites and I'd like to avoid this problem on those sites.
She's got two other sites and I'd like to avoid this problem on those sites.
Please Log in or Create an account to join the conversation.
- Geoffrey Mack
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 52
13 years 2 months ago #98720
by Geoffrey Mack
Replied by Geoffrey Mack on topic Links inside of articles are broken after import to K2
No help or suggestions here? This is killing me! Broken links everywhere and this is just the way it is? I don't believe it!
Here's an example. On one of her pages she has some "related links" where she's manually entered some links to related articles. One of the related links points to here:
spine/4020-texas-surgery-center-in-cedar-park-adds-outpatient-spine
but, of course, that link doesn't work anymore. I imported the article referenced above, and now it is a K2 item located here:
index.php?option=com_k2&view=item&id=4020&Itemid=141
How do I fix those old broken URLs and make them point to K2 items? Note, this will have to be an automated process because we are talking hundreds of articles, each with multiple "related links".
Here's an example. On one of her pages she has some "related links" where she's manually entered some links to related articles. One of the related links points to here:
spine/4020-texas-surgery-center-in-cedar-park-adds-outpatient-spine
but, of course, that link doesn't work anymore. I imported the article referenced above, and now it is a K2 item located here:
index.php?option=com_k2&view=item&id=4020&Itemid=141
How do I fix those old broken URLs and make them point to K2 items? Note, this will have to be an automated process because we are talking hundreds of articles, each with multiple "related links".
Please Log in or Create an account to join the conversation.
- william white
- Offline
- Platinum Member
Less
More
- Posts: 3722
13 years 2 months ago #98721
by william white
Replied by william white on topic Links inside of articles are broken after import to K2
to the best i know, if you have a link in a joomla article that points to another joomla article and then import it into the k2 tables the links inside the content of the article will not chanage an continue to point to the joomla articles they originally pointed to. When you import text thats what you get text.
The menus on the site should stay the same and point to articles until you start recreating them using k2 menu items .
It appears that you had sef turned on when creating the original links. If the links said com_content&view..&id*** and gave you the id numbers and (a big and) the k2 items had the same internal id numbers, a replacement plugin might work...but it might not also...interesting to say the least and flustrationg for you im sure. pm me with access to the site or for my email and i will have a look
The menus on the site should stay the same and point to articles until you start recreating them using k2 menu items .
It appears that you had sef turned on when creating the original links. If the links said com_content&view..&id*** and gave you the id numbers and (a big and) the k2 items had the same internal id numbers, a replacement plugin might work...but it might not also...interesting to say the least and flustrationg for you im sure. pm me with access to the site or for my email and i will have a look
Please Log in or Create an account to join the conversation.
- Geoffrey Mack
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 52
13 years 1 month ago #98722
by Geoffrey Mack
Replied by Geoffrey Mack on topic Links inside of articles are broken after import to K2
So, I think the solution may be near. K2's path to the item is identical to the old one, except for the addition of the /item/ in the path. If I can find some way to magically identify URLs without /item/ and simply add it to the path, then those old urls will work.
Problem is that I don't know how to do that. Can you think of a clean way to make that happen?
Problem is that I don't know how to do that. Can you think of a clean way to make that happen?
Please Log in or Create an account to join the conversation.
- Geoffrey Mack
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 52
13 years 1 month ago #98723
by Geoffrey Mack
Replied by Geoffrey Mack on topic Links inside of articles are broken after import to K2
Old link that broke when I imported everything into K2:
spine/4020-texas-surgery-center-in-cedar-park-adds-outpatient-spine
New link that I need to redirect to:
spine/item/4020-texas-surgery-center-in-cedar-park-adds-outpatient-spine
Somehow I need to a) identify when somebody is visiting an old article URL without */item/* and then b) write that into the path. Problem is I don't know how to do step "a". I assume there is some reasonable simple htaccess fix, but I am not savvy enough to figure it out.
Any help?
spine/4020-texas-surgery-center-in-cedar-park-adds-outpatient-spine
New link that I need to redirect to:
spine/item/4020-texas-surgery-center-in-cedar-park-adds-outpatient-spine
Somehow I need to a) identify when somebody is visiting an old article URL without */item/* and then b) write that into the path. Problem is I don't know how to do step "a". I assume there is some reasonable simple htaccess fix, but I am not savvy enough to figure it out.
Any help?
Please Log in or Create an account to join the conversation.
- william white
- Offline
- Platinum Member
Less
More
- Posts: 3722
13 years 1 month ago #98724
by william white
Replied by william white on topic Links inside of articles are broken after import to K2
Check "
"not-so-simple rewriting ... flat links and more"
inthis post...its a start -
"not-so-simple rewriting ... flat links and more"
inthis post...its a start -
Please Log in or Create an account to join the conversation.
- Forum
- K2 Community Forum
- English K2 Community
- Links inside of articles are broken after import to K2