Keyword

ID Category Prefix Won't Go

  • dylan tucker
  • dylan tucker's Avatar Topic Author
  • Offline
  • New Member
More
9 years 8 months ago #146825 by dylan tucker
ID Category Prefix Won't Go was created by dylan tucker
Hi all -

I can't stop K2 showing the category ID in the url such as : www.mysite.com/blog/2-categoryname/

I'm running 2.6.9 and have changed the parameters as follows:

Enable advanced SEF for K2 URLs: yes
Use the category ID in the URL: no
Use the category title alias: yes

I've checked and no number is in the alias itself, and I've created new categories to check and it does it still.
Have also cleared browser case, disabled joomla cache and disabled system cache plugin.

Any ideas?
Thanks!

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 8 months ago #146833 by Krikor Boghossian
Replied by Krikor Boghossian on topic ID Category Prefix Won't Go
Hello Dylan,

Does this category belong to a menu item?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • dylan tucker
  • dylan tucker's Avatar Topic Author
  • Offline
  • New Member
More
9 years 8 months ago #146841 by dylan tucker
Replied by dylan tucker on topic ID Category Prefix Won't Go
Thanks for the reply; no and I've also tried it with other category names too with the same problem.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 8 months ago #146842 by Krikor Boghossian
Replied by Krikor Boghossian on topic ID Category Prefix Won't Go
Thank you for your feedback Dylan,
We will look into it.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 8 months ago #146845 by Krikor Boghossian
Replied by Krikor Boghossian on topic ID Category Prefix Won't Go
It has been fixed in the DEV version.
You can get it from:

The patch that fixes it is located here: getk2.org/assets/get/
github.com/joomlaworks/k2/commit/4371e2e8571e9c0d94ee23723da5084f6ecf9435

PS. You are highly advised to backup first.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • dylan tucker
  • dylan tucker's Avatar Topic Author
  • Offline
  • New Member
More
9 years 8 months ago #146849 by dylan tucker
Replied by dylan tucker on topic ID Category Prefix Won't Go
Thanks for this, all solved! :)

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 8 months ago #146851 by Krikor Boghossian
Replied by Krikor Boghossian on topic ID Category Prefix Won't Go
You 're welcome Dylan :)

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
9 years 7 months ago #147732 by acidrain_lnx
Replied by acidrain_lnx on topic ID Category Prefix Won't Go
Hello:

I have the same problem, but that file doesn't worked for me.

I'm using 2.6.9 K2 Component and i have the same settings than the first person who opened the topic.

But my URL SEF is always: www.domain.com/blog/CATID-category/my-post

If i set the value "show ID category" to NO/YES, the CATID is always printed on the URL.

I can show/hide the ID article, but ID Category is always before the category name.

I don't know what is happening.

Best regards.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 7 months ago #147735 by Krikor Boghossian
Replied by Krikor Boghossian on topic ID Category Prefix Won't Go
Hello,

It has been fixed in the DEV version.
You can get it from:

The patch that fixes it is located here: getk2.org/assets/get/
github.com/joomlaworks/k2/commit/4371e2e8571e9c0d94ee23723da5084f6ecf9435

PS. You are highly advised to backup first.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
9 years 6 months ago - 9 years 6 months ago #147868 by acidrain_lnx
Replied by acidrain_lnx on topic ID Category Prefix Won't Go
Hello:

Thanks Krikor, but that solution is not valid for my website. I've downloaded that new fixed file router.php and "replace" my actual file and the website is always insert the ID category:

You can see the example in this screenshot (.........../4-gnu-linux/ ... instead ........./gnu-linux/... )

s17.postimg.org/kfk9hoqb3/id_category.png

I'm using 2.6.9 K2 and i'have NO the "show ID category on URL" and "show ID item on URL", but only for ITEM element works.

Thanks and best regards from spain
Last edit: 9 years 6 months ago by acidrain_lnx.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 6 months ago #147873 by Krikor Boghossian
Replied by Krikor Boghossian on topic ID Category Prefix Won't Go
Stupid questions following:
What is the actual alias of the category?
Have you purged your cache?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
9 years 6 months ago - 9 years 6 months ago #147877 by acidrain_lnx
Replied by acidrain_lnx on topic ID Category Prefix Won't Go
Hi again:

No problem about your stupid questions :).

1.- Here you have a select about my name & alias categories for K2 component. As you can see, all of them has only letters.
mysql> select id,name,alias from lln4b_k2_categories;
+----+-----------------------+-----------------------+
| id | name                  | alias                 |
+----+-----------------------+-----------------------+
|  1 | Blogs                 | blogs                 |
|  2 | Blog/Web              | blog-web              |
|  3 | Edición de video      | edicion-de-video      |
|  4 | GNU/Linux             | gnu-linux             |
|  5 | GoPRO                 | gopro                 |
|  6 | Edición de fotografía | edicion-de-fotografia |
|  7 | Mi Blog               | mi-blog               |
|  8 | Blog Quotes           | blog-quotes           |
|  9 | Blog Media            | blog-media            |
| 10 | Blog Photo            | blog-photo            |
| 11 | Blog Gallery          | blog-gallery          |
| 12 | Demo home slide       | demo-home-slide       |
| 13 | Blog masonry          | blog-default          |
| 14 | Composition sites     | composition-sites     |
| 15 | Prints retro          | prints-retro          |
| 16 | Web design            | web-design            |
| 17 | Photo and vector      | photo-and-vector      |
| 18 | Retro infographic     | retro-infographic     |
| 19 | Image Only            | image-only            |
| 20 | RPF                   | rpf                   |
| 21 | Index5                | index5                |
| 22 | Feature               | feature               |
| 23 | News                  | news                  |
| 24 | Technology            | technology            |
| 25 | Photo news            | photo-news            |
| 26 | World news            | world-news            |
| 27 | Random News           | random-news           |
| 28 | Latest News           | latest-news           |
| 29 | Entertainment         | entertainment         |
| 30 | Video                 | video                 |
| 31 | Photo                 | photo                 |
| 32 | Games                 | games                 |
| 33 | Hacking               | hacking               |
| 34 | Internet              | internet              |
| 35 | Monitorización        | monitorizacion        |
| 36 | Packet Tracer         | packet-tracer         |
| 37 | Pequeños trucos       | pequenos-trucos       |
| 38 | RaspberryPi           | raspberrypi           |
| 39 | Redes                 | redes                 |
| 40 | Shells                | shells                |
| 41 | Snowboard             | snowboard             |
| 42 | Viajes                | viajes                |
| 43 | Webs                  | webs                  |
| 44 | Windows               | windows               |
| 45 | Reflexiones           | reflexiones           |
| 46 | PORTFOLIO             | portfolio             |
| 47 | Diseño Web            | diseno-web            |
| 48 | Otras cosas           | otras-cosas           |
| 49 | Edición de videos     | edicion-de-videos     |
| 50 | Fotografías           | fotografias           |
| 51 | Animales              | animales              |
| 52 | Conceptuales          | conceptuales          |
| 53 | Deportes              | deportes              |
| 54 | Editadas              | editadas              |
| 55 | Monumentos            | monumentos            |
+----+-----------------------+-----------------------+
55 rows in set (0.00 sec)

About my cache, I deleted it a lot of times. I don't use 3er party cache components, only Joomla and K2.

I'm not a developer, only a Sysadmin and i have been checking the code inside router.php and I found the line to build that part of URL ( category+id)
// Replace the item with the category slug
				if ($params->get('k2SefLabelItem') == '1')
				{
					$segments[0] = getCategorySlug((int)$ItemId); <-- THIS IS THE LINE IN MY CASE
				}
				else
				{
					$segments[0] = $params->get('k2SefLabelItemCustomPrefix');
				}

For example, if I change that line to this:

$segments[0] = "TESTING";

My URLS change to www.domain.com/blog/TESTING/item-title-alias

I'm trying to get only the "category alias name" and asign that value to "$segments[0]". I think this would be a workaround in my case.

For example: $segments[0] = getCategorySlug((ItemTitleAlias)$ItemId); (or similar, I don't know the code and variables for K2)

Thank you for your help.
Last edit: 9 years 6 months ago by acidrain_lnx.

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

More
9 years 6 months ago #148014 by acidrain_lnx
Replied by acidrain_lnx on topic ID Category Prefix Won't Go
Hello:

I fixed my probelm with this little php fix code:
// Replace the item with the category slug
				if ($params->get('k2SefLabelItem') == '1')
				{
					$segments[0] = getCategorySlug((int)$ItemId);
					$part = explode("-", $segments[0]); // MY HACK WORKAROUND
					$segments[0] = ($part[1]); // MY HACK WORKAROUND													
				}
				else
				{
					$segments[0] = $params->get('k2SefLabelItemCustomPrefix');
				}

Two lines has been added.

best regards

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 6 months ago #148142 by Krikor Boghossian
Replied by Krikor Boghossian on topic ID Category Prefix Won't Go
Thank you so much for your feedback :)

We will test it on our side as well.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum