Keyword

Spaces and Dashes: k2 Tags and SH404SEF

  • devera
  • devera's Avatar Topic Author
  • Offline
  • New Member
More
14 years 8 months ago #80576 by devera
Hello everyone,
I've seen a couple of discussions on this, but none have been able to shed light onto what possibly might be causing my issue. It's practically the same, but let me specify;
I've just installed k2 and it works beautifully! Since I am running a personal blogging website, I decided that I also wanted to install sh404SEF.

First problem was that I couldn't enable sh404SEF to work. But it was solved by installing JCE editor, overriding usage of the Tiny MCE editor. Hooray!

So now everything was just pretty, until I noticed that tags were a bust–if you clicked at least a two word (or more) tag, it gives me a 404 error because the url reads as "website.com/tags/two%20words" which is a no no with SEF.

I then noticed despite that, everything else had the replacement dashes, i.e categories. Only "tags" lacked this replacement dash (whether it's tags in the cloud tag, or tags in the item/article itself).

I checked my com_k2.php and it has the updated fix (I installed latest versions for both k2 and SEF) and it's all there. I even copied and pasted this .php file into com_sh404SEF/sef_ext/. Still, the tags refuse to rid themselves of the "%20". I know this is fixed because the first website I found with a solution had a tag cloud that had dashes in place of spaces when clicked! So I must be missing something...

The funny thing is that if I do try and click on a two word cloud, it will jump me to the 404 error page and "suggest" other tags. These other tags don't have spaces, but rather + signs! Which work. (see attachment!)

if anyone can point any little trick or an idea to try, I'd love to tackle it. My brain's a little fried.

Thanks.

Michelle.
www.haveyouheardofthisgirl.com
Attachments:

Please Log in or Create an account to join the conversation.

More
14 years 7 months ago #80577 by Henry Firth
Replied by Henry Firth on topic Spaces and Dashes: k2 Tags and SH404SEF
Hi there,

I have exactly the same problem!!!

Latest version of both K2 and SH404SEF, and the suggested fix (replace %20,-,tag) has indeed been already included in the components/k2/sef_ext/com_k2.php file. It would be great if someone could shed some light on this. Why doesn't the replacement of spaces with -'s work for tags!!!

I have one further problem - which is that category will not disappear from my urls. All the settings are removed for it - so it shouldn't display.

I want to see this url... dubstep-remix.com/jeremy-kyle-dubstep-remix.html
But instead I see this.. dubstep-remix.com/dubstep/jeremy-kyle-dubstep-remix.html

(PS the issue is on my dev site, not the above live site)

Please Log in or Create an account to join the conversation.

More
14 years 7 months ago #80578 by Henry Firth
Replied by Henry Firth on topic Spaces and Dashes: k2 Tags and SH404SEF
anyone please?!?! :-)

Please Log in or Create an account to join the conversation.

More
14 years 7 months ago #80579 by scyllar
Replied by scyllar on topic Spaces and Dashes: k2 Tags and SH404SEF
Hi has anyone solved this? very stange thing

Please Log in or Create an account to join the conversation.

More
14 years 7 months ago #80580 by Henry Firth
Replied by Henry Firth on topic Spaces and Dashes: k2 Tags and SH404SEF
Hi all,

David - that fix didn't work for me. The tag code was already in the document and it still didn't work...

My solution? Switch to Artio JoomSEF, and install both the component and the K2 plugin.

It now works perfectly and my URLs are as I wish!

David said:Hello Michelle,
This is tutorial for you: How to solve the K2 Tags and SH404 SEF error for K2 version 2.2

Hope this help.

Regards,
David

Please Log in or Create an account to join the conversation.

  • Clifford Sonnentag
  • Clifford Sonnentag's Avatar
  • Offline
  • Junior Member
More
14 years 7 months ago #80581 by Clifford Sonnentag
Replied by Clifford Sonnentag on topic Spaces and Dashes: k2 Tags and SH404SEF
I might look into this in the next few days, but the problem must be that the tag is not being parsed by the k2_sef plug-in

It looks like it has the options there though.

case 'tag':
$title[] = 'tag';
$title[] = str_replace('%20','-',$tag);
break;

Please Log in or Create an account to join the conversation.

  • Clifford Sonnentag
  • Clifford Sonnentag's Avatar
  • Offline
  • Junior Member
More
14 years 7 months ago #80582 by Clifford Sonnentag
Replied by Clifford Sonnentag on topic Spaces and Dashes: k2 Tags and SH404SEF
Okay looked into it....

There is some sort of issue with different installations as far as I can tell. Maybe php versions or something.

Anyway, some more searching led me to replace:

case 'tag':
$title[] = 'tag';
$title[] = str_replace('%20','-',$tag);
break;
with
case 'tag':
$title[] = 'tag';
$tag=str_replace('%20','-',$tag);
$tag=str_replace('+','-',$tag);
$title[] = $tag;
break;

in the file: siteroot\components\com_k2\sef_ext\com_k2.php


And after I looked into it I found the link above that says "how to solve .... blah" mannn. I felt good before that

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum