Keyword

K2 Tags - Ampersands

  • Tom
  • Tom's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 6 months ago #120825 by Tom
K2 Tags - Ampersands was created by Tom
Hi there,

Stumbled across an annoying little bug.

I have publication issues listed as Tags within K2. The only problem is that the format for these consists of Publication title + issue date.

In some titles we have ampersands and for branding purposes, these must remain (as opposed to replacing with 'and').

The ampersand included causes the tag to break and the articles listed under that tag will not show.

Is there a way anyone knows of to remedy this?

Any assistance greatly appreciated. Th

Joomla 2.5.

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

  • Tom
  • Tom's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 6 months ago #120826 by Tom
Replied by Tom on topic Re: K2 Tags - Ampersands
...just to add - I've tried a couple of generic ampersand 'fix' plugins, to no avail.

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

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 6 months ago #120827 by Yiota
Replied by Yiota on topic Re: K2 Tags - Ampersands
Go to the K2 Parameters -> Advanced tab and through the Tag System Settings -> Additional character replacements add the
&|&
This will prevent the & characters to be stripped through your added tags.

Give it a try and let me know.

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

  • Tom
  • Tom's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 6 months ago #120828 by Tom
Replied by Tom on topic Re: K2 Tags - Ampersands
Hi Yiota,

Many thanks for your response.

That area (for me) was under the SEO heading - there's not a specific 'Tag System Settings' header in the K2 Parameters - perhaps as I'm on an older version.

Either way, I now have -

Š|S, Œ|O, Ž|Z, š|s, œ|oe, ž|z, Ÿ|Y, ¥|Y, µ|u, À|A, �|A, Â|A, Ã|A, Ä|A, Å|A, Æ|A, Ç|C, È|E, É|E, Ê|E, Ë|E, Ì|I, �|I, Î|I, �|I, �|D, Ñ|N, Ò|O, Ó|O, Ô|O, Õ|O, Ö|O, Ø|O, Ù|U, Ú|U, Û|U, Ü|U, �|Y, ß|s, à|a, á|a, â|a, ã|a, ä|a, å|a, æ|a, ç|c, è|e, é|e, ê|e, ë|e, ì|i, í|i, î|i, ï|i, ð|o, ñ|n, ò|o, ó|o, ô|o, õ|o, ö|o, ø|o, ù|u, ú|u, û|u, ü|u, ý|y, ÿ|y, ß|ss &|&

The last one (in bold) which I added seems to have converted the code you provided.

No joy yet...

Thanks so much for your assistance with this.

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

More
11 years 6 months ago - 11 years 6 months ago #120829 by Lefteris
Replied by Lefteris on topic Re: K2 Tags - Ampersands
I believe that this 'Tag System Settings' section is included in the K2 2.6.7 version. Which K2 version do you use?

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

  • Tom
  • Tom's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 6 months ago #120830 by Tom
Replied by Tom on topic Re: K2 Tags - Ampersands
v 2.6.5

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

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 6 months ago #120831 by Yiota
Replied by Yiota on topic Re: K2 Tags - Ampersands
Hm. Could you upgrade to the latest version?

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

  • Tom
  • Tom's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 6 months ago #120832 by Tom
Replied by Tom on topic Re: K2 Tags - Ampersands
Hi Yiota,

If upgrading could be avoided, that would be preferable. I have a lot of customisation going on and the fear is that by upgrading, this will be lost.

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

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 6 months ago #120833 by Yiota
Replied by Yiota on topic Re: K2 Tags - Ampersands
I'm afraid that I cannot think of a solution on this in your current version. Is the customisation in the core files?

I don't know if this will work but you are free to try.
Make a comparison between the k2tag.php files located in administrator/components/com_k2/tables/ of the 2.6.5 and 2.6.7 versions. Check if there are any differences. Maybe if you added the replacement there would work.

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

  • Tom
  • Tom's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 6 months ago #120834 by Tom
Replied by Tom on topic Re: K2 Tags - Ampersands
No luck with that, I'm afraid.

I've tried updating versions, but am running into an error:

Fatal error: Class 'K2Controller' not found in SITENAME/components/com_k2/controllers/itemlist.php on line 15

Sorry to be a pain with this - it's a small, but very annoying thing I need to get sorted!

Thanks again.

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

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 6 months ago #120835 by Yiota
Replied by Yiota on topic Re: K2 Tags - Ampersands
Probably something went wrong with your installation. Please try installing K2 again.

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

  • Tom
  • Tom's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 6 months ago #120836 by Tom
Replied by Tom on topic Re: K2 Tags - Ampersands
Nope - still same problem. Have tried installing directly over (as per site instructions) and also via the extension manage update facility.

If it helps, I'm also running sh404sef - but can't see anything there that's causing it.

Is there a private message facility so I can send you a link?

Essentially the '&' in the Tag title is being replaced with '?' in the Tag listing URL - it gets as far as where the '&' is in the URL, then breaks e.g what should be:

site/en/tag/word1-word2-word-3-june-2013

becomes....

site/en/tag/word1-word2-word3?Word4_Word5_June_2013=

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

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 6 months ago #120837 by Yiota
Replied by Yiota on topic Re: K2 Tags - Ampersands
To the URL it's impossible to keep the & character. So it will be replaced through the SEO handling characters.
Now I want you to tell me your Joomla! version to check about the error you are getting upon installation of K2.

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

  • Tom
  • Tom's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 6 months ago #120838 by Tom
Replied by Tom on topic Re: K2 Tags - Ampersands
Hi Yiota,

I'm on Joomla 2.5.

So as I understand it, there is simply no way to have an ampersand in a Tag as it's listing URL will break?

If so, I guess we will have to bite the bullet and replace with 'and' after all.

Thanks for your help with this. Best, Tom.

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

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 6 months ago #120839 by Yiota
Replied by Yiota on topic Re: K2 Tags - Ampersands
Yes, that is correct. Maybe you can replace the _ you get through the tag's URL to the word in the SEO replacement characters.

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


Powered by Kunena Forum