- Posts: 24
COMMUNITY FORUM
Tags SEF problem for word groups.
- Alien
- Topic Author
- Offline
- Junior Member
Less
More
15 years 1 month ago #73581
by Alien
Tags SEF problem for word groups. was created by Alien
If you use more than one word as tag you will get 404 server error in SEF urls. This occurs because joomla cen respond to urls containing spaces but sh404 SEF can not.I have concluded this problem and this is the solution;
1. Locate on "components\com_sh404sef\sef_ext\"
2. Look for the file "com_k2.php"
3. If file is not in this location go to "components\com_k2\sef_ext\" and copy the file to the location mentioned step1.
4. Open the file "com_k2.php"
5. Goto line 130 where these codes are writen;
case 'tag':
$title[] = 'tag';
$title[] = $tag;
break;
6. Replace the code with this one;
case 'tag':
$title[] = 'tag';
$title[] = str_replace('%20','-',$tag);
break;
7. Save and purge the old sef url in sh404sef
8. Refresh the page where your tag links are in.
This code modification replaces the spaces in tags, with a word groups, with character "-". By this way sef urls do not contain spaces.
1. Locate on "components\com_sh404sef\sef_ext\"
2. Look for the file "com_k2.php"
3. If file is not in this location go to "components\com_k2\sef_ext\" and copy the file to the location mentioned step1.
4. Open the file "com_k2.php"
5. Goto line 130 where these codes are writen;
case 'tag':
$title[] = 'tag';
$title[] = $tag;
break;
6. Replace the code with this one;
case 'tag':
$title[] = 'tag';
$title[] = str_replace('%20','-',$tag);
break;
7. Save and purge the old sef url in sh404sef
8. Refresh the page where your tag links are in.
This code modification replaces the spaces in tags, with a word groups, with character "-". By this way sef urls do not contain spaces.
Please Log in or Create an account to join the conversation.
- Lefteris
- Offline
- Moderator
Less
More
- Posts: 8743
15 years 1 month ago #73582
by Lefteris
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Lefteris on topic Tags SEF problem for word groups.
Hi. The sh404SEF plugin for K2 is under development. Thanks for your commitment.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Mustafa M. Abdel Rahman
- Offline
- New Member
Less
More
- Posts: 2
15 years 1 month ago #73583
by Mustafa M. Abdel Rahman
Replied by Mustafa M. Abdel Rahman on topic Tags SEF problem for word groups.
That's good to hear, my page rank is falling due to none SEF urls of K2 that sh404SEF is displaying in legacy mode because the missing plugin.
Please Log in or Create an account to join the conversation.
- Mary Beth House
- Offline
- New Member
Less
More
- Posts: 8
15 years 1 month ago #73584
by Mary Beth House
Replied by Mary Beth House on topic Tags SEF problem for word groups.
I made the edit you posted here... purged the old sef in sh404sef, purged the 404 logs...everything. And I was not able to get rid of the space.
Help please?
I also set the "override sef_ext" under sh404sef/By component to "do not override sef_ext" to see if perhaps the fact that it was overridden was a factor. That didn't help either.
Help please?
I also set the "override sef_ext" under sh404sef/By component to "do not override sef_ext" to see if perhaps the fact that it was overridden was a factor. That didn't help either.
Please Log in or Create an account to join the conversation.
- Alien
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 24
15 years 1 month ago #73585
by Alien
Replied by Alien on topic Tags SEF problem for word groups.
Ok then try the following;
Replace the original code;
case 'tag':
$title[] = 'tag';
$title[] = $tag;
break;
with this one;
case 'tag':
$tag=str_replace('%20','-',$tag);
$tag=str_replace('+','-',$tag);
$title[] = $tag;
break;
and also I noticed something new yesterday. You can turn on/off encoded url via the configuration of sh404Sef. Have not tried if it works but it should.
Mary Beth House said:I made the edit you posted here... purged the old sef in sh404sef, purged the 404 logs...everything. And I was not able to get rid of the space. Help please?
I also set the "override sef_ext" under sh404sef/By component to "do not override sef_ext" to see if perhaps the fact that it was overridden was a factor. That didn't help either.
Replace the original code;
case 'tag':
$title[] = 'tag';
$title[] = $tag;
break;
with this one;
case 'tag':
$tag=str_replace('%20','-',$tag);
$tag=str_replace('+','-',$tag);
$title[] = $tag;
break;
and also I noticed something new yesterday. You can turn on/off encoded url via the configuration of sh404Sef. Have not tried if it works but it should.
Mary Beth House said:I made the edit you posted here... purged the old sef in sh404sef, purged the 404 logs...everything. And I was not able to get rid of the space. Help please?
I also set the "override sef_ext" under sh404sef/By component to "do not override sef_ext" to see if perhaps the fact that it was overridden was a factor. That didn't help either.
Please Log in or Create an account to join the conversation.
- Ala Makota
- Offline
- New Member
Less
More
- Posts: 6
14 years 9 months ago #73586
by Ala Makota
Replied by Ala Makota on topic Tags SEF problem for word groups.
Hi all,
I have modified file in "components\com_k2\sef_ext\com_k2.php" as it was mentioned before, changing:
case 'tag':
$title[] = 'tag';
$title[] = $tag;
break;
into
case 'tag':
$title[] = 'tag';
$title[] = str_replace('%20','-',$tag);
break;
and
case 'tag':
$tag=str_replace('%20','-',$tag);
$tag=str_replace('+','-',$tag);
$title[] = $tag;
break;
as well, but it doesn't work. I don't use sh404sef but normal SEF from joomla core.
Can you please help me with this issue?
scott said:Hi, I tried moving the file, making the changes but it seems sh404sef is not picking up the K2 file that was placed in "components\com_sh404sef\sef_ext\", so I just edited the original file at "components\com_k2\sef_ext\" with the above changes and it works, thanks
I have modified file in "components\com_k2\sef_ext\com_k2.php" as it was mentioned before, changing:
case 'tag':
$title[] = 'tag';
$title[] = $tag;
break;
into
case 'tag':
$title[] = 'tag';
$title[] = str_replace('%20','-',$tag);
break;
and
case 'tag':
$tag=str_replace('%20','-',$tag);
$tag=str_replace('+','-',$tag);
$title[] = $tag;
break;
as well, but it doesn't work. I don't use sh404sef but normal SEF from joomla core.
Can you please help me with this issue?
scott said:Hi, I tried moving the file, making the changes but it seems sh404sef is not picking up the K2 file that was placed in "components\com_sh404sef\sef_ext\", so I just edited the original file at "components\com_k2\sef_ext\" with the above changes and it works, thanks
Please Log in or Create an account to join the conversation.
- Ala Makota
- Offline
- New Member
Less
More
- Posts: 6
14 years 9 months ago #73587
by Ala Makota
Replied by Ala Makota on topic Tags SEF problem for word groups.
Any suggestions?
Please Log in or Create an account to join the conversation.
- Clifford Sonnentag
- Offline
- Junior Member
Less
More
- Posts: 37
14 years 7 months ago #73588
by Clifford Sonnentag
Replied by Clifford Sonnentag on topic Tags SEF problem for word groups.
case 'tag':
$title[] = 'tag';
$tag=str_replace('%20','-',$tag);
$tag=str_replace('+','-',$tag);
$title[] = $tag;
break;
worked great for me.
$title[] = 'tag';
$tag=str_replace('%20','-',$tag);
$tag=str_replace('+','-',$tag);
$title[] = $tag;
break;
worked great for me.
Please Log in or Create an account to join the conversation.