Keyword

Advanced Search

Search Results (Searched for: k2 Tag)

  • handora
  • handora's Avatar
22 Apr 2025 11:00
Replied by handora on topic Joomla 3.10.17 LTS destroys k2 pagination

Joomla 3.10.17 LTS destroys k2 pagination

Category: English K2 Community

solution from Joomla 3 LTS support:
components/com_k2/views/itemlist/
view html php  line 590

change from
        if ($document->getType() != 'json') {
            // Pagination
            jimport('');
            $total = (count($items)) ? $itemlistModel->getTotal() : 0;
            $pagination = new JPagination($total, $limitstart, $limit);
      }

to 

        if ($document->getType() != 'json') {
            // Pagination
            jimport('');
            $total = (count($items)) ? $itemlistModel->getTotal() : 0;
            $pagination = new JPagination($total, $limitstart, $limit);
            $pagination->setAdditionalUrlParam('task', $task);

            if ($task === 'tag') {
                $pagination->setAdditionalUrlParam('tag', JRequest::getString('tag'));
            }
      }
Can someone explain how the changes improve the handing of pagination for different takes, like when using tags in Joomla?
  • D
  • D's Avatar
17 Mar 2025 20:05

K2 Item Has Seven URLs And I Don't Know Why

Category: English K2 Community

We have found a bunch of duplicate content on our site.

One of our k2 items has seven unique url's all of which resolve to the same content.

Here's a few of the urls:

   oursite.com/component/k2/turn-a-mercpv-into-two-identical-outputs

   oursite.com/ps-ac-power/turn-a-mercpv-into-two-identical-outputs

   oursite.com/ps-fs/turn-a-mercpv-into-two-identical-outputs

   oursite.com/ps-monitors/turn-a-mercpv-into-two-identical-outputs

The MercPV item shown in the urls above is a K2 Item.

It is assigned to only one K2 Category. It has one K2 Tag called EHelp.

I'm not understanding how all those url's are being generated.

We only one want URL for the K2 item.

I did find that there are Menu Items called:

ps-ac-power
ps-monitors
ps-fs

All of those Menu Items are K2 » Item listings » Tag types.

But each only has one tag assigned to it.

Can anyone offer any insight as to why one K2 Item is generating 7 urls?
 
  • D
  • D's Avatar
17 Mar 2025 19:40

K2 Item Has Seven URLs And I Don't Know Why

Category: English K2 Community

We have found a bunch of duplicate content on our site.

One of our k2 items has seven unique url's all of which resolve to the same content.

Here's a few of the urls:

     oursite.com/component/k2/turn-a-mercpv-into-two-identical-outputs

     oursite.com//ps-ac-power/turn-a-mercpv-into-two-identical-outputs

     oursite.com/ps-fs-/turn-a-mercpv-into-two-identical-outputs

     oursite.com/ps-monitors/turn-a-mercpv-into-two-identical-outputs

The MercPV item is a K2 Item. It assigned to only one K2 Category. It has one K2 Tag called EHelp.

I'm not understanding how all those url's are being generated.

We only one want URL for the K2 item.

Anyone have any ideas?
  • Kike
  • Kike's Avatar
23 Dec 2024 15:29
problem with sql was created by Kike

problem with sql

Category: English K2 Community

Hello folks

We have a serious problem with a joomla site with K", The hosting provider says there is a problem with the DB

The main reason for high resource usage is:

- Database queries that take a long time to execute, for example:
Time: 241223 11:38:01
# User@Host: ic2017[ic2017] @ localhost []
# Thread_id: 1886650 Schema: newinfocamp QC_hit: No
# Query_time: 2.055796 Lock_time: 0.000639 Rows_sent: 14 Rows_examined: 38917
# Rows_affected: 0 Bytes_sent: 123388
SET timestamp=1734950281;
/* Frontend / K2 / Items */ SELECT /*+ MAX_EXECUTION_TIME(60000) */ SQL_CALC_FOUND_ROWS i.*, , , , (idx_category) ON = 1 AND (1,5) AND = 1 AND (1,5) AND ('0000-00-00 00:00:00' OR <= '2024-12-23 10:38:01') AND ('0000-00-00 00:00:00' OR >= '2024-12-23 10:38:01') AND (SELECT itemID FROM nnmzc_k2_tags_xref WHERE tagID=219) GROUP BY , 14;
# Time: 241223 11:39:00
# User@Host: ic2017[ic2017] @ localhost []
# Thread_id: 1886701 Schema: newinfocamp QC_hit: No
# Query_time: 2.576140 Lock_time: 0.000261 Rows_sent: 0 Rows_examined: 44396
# Rows_affected: 0 Bytes_sent: 2851
SET timestamp=1734950340;
/* Frontend / K2 / Items */ SELECT /*+ MAX_EXECUTION_TIME(60000) */ SQL_CALC_FOUND_ROWS i.*, , , , (idx_category) ON = 1 AND (1,5) AND = 1 AND (1,5) AND ('0000-00-00 00:00:00' OR <= '2024-12-23 10:39:00') AND ('0000-00-00 00:00:00' OR >= '2024-12-23 10:39:00') AND ='' ORDER BY , 10;
# Time: 241223 11:47:07
# User@Host: ic2017[ic2017] @ localhost []
# Thread_id: 1886931 Schema: newinfocamp QC_hit: No
# Query_time: 3.249267 Lock_time: 0.000284 Rows_sent: 10 Rows_examined: 40531
# Rows_affected: 0 Bytes_sent: 94596
SET timestamp=1734950827;
/* Frontend / K2 / Items */ SELECT /*+ MAX_EXECUTION_TIME(60000) */ SQL_CALC_FOUND_ROWS i.*, , , , (idx_category) ON = 1 AND (1,5) AND = 1 AND (1,5) AND ('0000-00-00 00:00:00' OR <= '2024-12-23 10:47:07') AND ('0000-00-00 00:00:00' OR >= '2024-12-23 10:47:07') AND ='' ORDER BY , 10;

We've been unable to find the problem, please, any of tou can provide some help???

Thank you and Merry xmas
  • Kostas Stathopoulos
  • Kostas Stathopoulos's Avatar
25 Oct 2024 11:36
Replied by Kostas Stathopoulos on topic Joomla 3.10.17 LTS destroys k2 pagination

Joomla 3.10.17 LTS destroys k2 pagination

Category: English K2 Community

solution from Joomla 3 LTS support:
components/com_k2/views/itemlist/
view html php  line 590

change from
        if ($document->getType() != 'json') {
            // Pagination
            jimport('joomla.html.pagination');
            $total = (count($items)) ? $itemlistModel->getTotal() : 0;
            $pagination = new JPagination($total, $limitstart, $limit);
      }

to 

        if ($document->getType() != 'json') {
            // Pagination
            jimport('joomla.html.pagination');
            $total = (count($items)) ? $itemlistModel->getTotal() : 0;
            $pagination = new JPagination($total, $limitstart, $limit);
            $pagination->setAdditionalUrlParam('task', $task);

            if ($task === 'tag') {
                $pagination->setAdditionalUrlParam('tag', JRequest::getString('tag'));
            }
      }
 
  • Kostas Stathopoulos
  • Kostas Stathopoulos's Avatar
23 Oct 2024 18:18 - 23 Oct 2024 18:18
Replied by Kostas Stathopoulos on topic Joomla 3.10.17 LTS destroys k2 pagination

Joomla 3.10.17 LTS destroys k2 pagination

Category: English K2 Community

After k2 v2.11.20241016 update pagination stop working again...
 view html php in line 594 components/com_k2/views/itemlist/

        if ($document->getType() != 'json') {
            // Pagination
            jimport('joomla.html.pagination');
            $total = (count($items)) ? $itemlistModel->getTotal() : 0;
            $pagination = new JPagination($total, $limitstart, $limit);
        }

With this change:
        if ($document->getType() != 'json') {
            // Pagination
            jimport('joomla.html.pagination');
            $total = (count($items)) ? $itemlistModel->getTotal() : 0;
            $pagination = new JPagination($total, $limitstart, $limit);
            $pagination->setAdditionalUrlParam('task', $task);
        }

Pagination works again BUT pagination on k2 TAG menus NOT working
Wrong url
site.url/tagmenu/itemlist/tag?start=10
Instead of Correct url
site.url/tagmenu?start=10
can someone help?
Joomla 3.10.19 lts

I remember you telling us how good Joomla 3 is compared to the bad 4 & 5. We have been forced to pay support for Joomla 3 LTS but after every update we are looking for solutions to get it working. on the contrary, for months now I have never encountered any problem with my other sites in joomla 5
 
  • Fábio Jordan
  • Fábio Jordan's Avatar
12 Sep 2024 21:38
Replied by Fábio Jordan on topic Open k2 item in modal view in Tag listing

Open k2 item in modal view in Tag listing

Category: English K2 Community

I couldn't find an easy way to do it.

This modal is created from a js file: jquery.magnific-popup.min.js

The problem: this js file is loaded from CDN, so you can't change its parameters.

Also, there's no easy way to change the title using jquery or java, since the content of the modal is generated on click (there's a solution, but not easy and it will consume some resources).

So, I guess the only option should be download jquery.magnific-popup.min.js, point it on K2 files (which is hack, and not a good thing, since you gonna have to write it again on every update) and than change this js file as you want.

OR the best way... if you use JCE, you can download JCE Media Box and activate the plugin.

After that, you can change the link for your image as follows:
<a class="wfpopup wf-zoom-image" href="<?php echo $this->item->imageXLarge; ?>" data-mediabox-title="<?php echo $this->item->title; ?>" data-mediabox-caption="<?php echo $this->item->image_caption; ?>"

So instead of using magnific popup, it will load JCE Media Box. The result should be like this:

cafecomfilme.com.br/images/cafe/image-popup.jpg

Hope it works.

Best of luck!
  • Ralf Longwitz
  • Ralf Longwitz's Avatar
19 Jul 2024 15:51

Category list does not appear translated with Falang

Category: English K2 Community

Hi,

in recent versions of K2, the category list does not show items translated anymore. 
Title and intro tags, "Tagged under" and "Read more ..." still appear translated, but not the items in the list, those remain in English.
The items detail pages are correct.

This still worked fine in version 2.10.3, not anymore since at least 2.11.20230505
(Joomla: 3.10.12)

Would you have a fix for this?

Thank you!

Ralf
  • Goble002
  • Goble002's Avatar
06 Jul 2024 11:59
Replied by Goble002 on topic Open k2 item in modal view in Tag listing

Open k2 item in modal view in Tag listing

Category: English K2 Community

Any idea about how to insert the introtext in modal popup view ?

So introtext appears just below imageXLarge.

The code to be inserted :
<?php echo $item->introtext; ?>
  • Goble002
  • Goble002's Avatar
05 Jul 2024 14:53
Replied by Goble002 on topic Open k2 item in modal view in Tag listing

Open k2 item in modal view in Tag listing

Category: English K2 Community

This is perfect, thank you !
  • Fábio Jordan
  • Fábio Jordan's Avatar
04 Jul 2024 08:30
Replied by Fábio Jordan on topic Open k2 item in modal view in Tag listing

Open k2 item in modal view in Tag listing

Category: English K2 Community

Magnific Popup is only called on the item view, so it does not work on tag view by default.

To make it work, add this on your tag.php override (at the top of the file, right after the "defined('_JEXEC') or die('Restricted access');" line:
$document = JFactory::getDocument(); $document->addStyleSheet('https://cdn.jsdelivr.net/npm/[email protected]/dist/magnific-popup.min.css'); $document->addStyleDeclaration(' /* K2 - Magnific Popup Overrides */ .mfp-iframe-holder {padding:10px;} .mfp-iframe-holder .mfp-content {max-width:100%;width:100%;height:100%;} .mfp-iframe-scaler iframe {background:#fff;padding:10px;box-sizing:border-box;box-shadow:none;} '); $document->addScript('https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.magnific-popup.min.js');

The rest of your code is fine.

Best luck!
  • Goble002
  • Goble002's Avatar
01 Jul 2024 20:25

Open k2 item in modal view in Tag listing

Category: English K2 Community

Hello,

if anyone could help here withe these codes :

This is what I get in item view. When you click on the image you have a modal popup with the XL image:
                <a data-k2-modal="image" href="<?php echo $this->item->imageXLarge; ?>" title="<?php echo JText::_('K2_CLICK_TO_PREVIEW_IMAGE'); ?>">                     <img src="<?php echo $this->item->image; ?>" alt="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>" style="width:<?php echo $this->item->imageWidth; ?>px; height:auto;" />                 </a>

I'm trying to get an item open in modal popup view when I click on the image of the item listed in tag listing. It should be opened with some basic info:
Image Title (itemTitle)
XL Image 
Description (itemFullText)

This is what i have done so far in tag.php
                        <a data-k2-modal="image" href="<?php echo $item->imageXLarge; ?>" title="<?php echo JText::_('K2_CLICK_TO_PREVIEW_IMAGE'); ?>">                             <img src="<?php echo $item->imageGeneric; ?>" alt="<?php echo K2HelperUtilities::cleanHtml($item->title); ?>" style="width:<?php echo $item->params->get('itemImageGeneric'); ?>px; height:auto;" />                         </a>

However the image will not open in modal view. Anyone can help ?
  • Oleksandr Ostrovskyi
  • Oleksandr Ostrovskyi's Avatar
03 Apr 2024 17:37
Replied by Oleksandr Ostrovskyi on topic K2 SEO Tags

K2 SEO Tags

Category: English K2 Community

Thank you. I did that, but there are no redirects from the old tag links
  • JoomlaWorks
  • JoomlaWorks's Avatar
03 Apr 2024 01:13
Replied by JoomlaWorks on topic K2 SEO Tags

K2 SEO Tags

Category: English K2 Community

Try it first, ask later.
  • Oleksandr Ostrovskyi
  • Oleksandr Ostrovskyi's Avatar
03 Apr 2024 01:10
Replied by Oleksandr Ostrovskyi on topic K2 SEO Tags

K2 SEO Tags

Category: English K2 Community

And how will this solve the problem of duplicates? In materials, tags still have different addresses depending on the material category.
  • JoomlaWorks
  • JoomlaWorks's Avatar
02 Apr 2024 21:15
Replied by JoomlaWorks on topic MAX_EXECUTION_TIME change in version v2.11.20240212

MAX_EXECUTION_TIME change in version v2.11.20240212

Category: English K2 Community

This is a MySQL/MariaDB hint.

It's useful because it instructs MySQL or MariaDB to place a limit on long SQL queries, typical in lists of items like categories, tags, search results etc.

Such lists (= the itemlist view in K2) can be abused by crawlers, bad actors etc., so it's a nice way to protect the health of your database. How do we know? Well, only because the highest traffic sites in the world are built with K2 and NOT Joomla's com_content.

And this is reason #385739485 why K2 kicks ass compared to poor old Joomla, whose trajectory is that of a falling satellite (hint: will it crash or burn first?).

We got big plans for 2024 for K2 but my mouth is sealed ;)
  • JoomlaWorks
  • JoomlaWorks's Avatar
29 Mar 2024 22:38 - 29 Mar 2024 22:40
Replied by JoomlaWorks on topic K2 SEO Tags

K2 SEO Tags

Category: English K2 Community

Create a hidden menu item somewhere. It doesn't have to be visible in any of your site menus.

In that menu item, make sure it points to all K2 categories (just don't select any categories). Use a good alias for the menu item, e.g. "show".

Now all your tags will be in the form of domain.tld/show/tag/whatever.

The limitation is in Joomla's routing, which forces us to do this "hack" of shorts...

This is different to the form your URLs have when using the Advanced SEF router in K2.
  • Oleksandr Ostrovskyi
  • Oleksandr Ostrovskyi's Avatar
25 Mar 2024 19:54
Replied by Oleksandr Ostrovskyi on topic K2 SEO Tags

K2 SEO Tags

Category: English K2 Community

I have the tag prefix set, but it still produces a lot of duplicates
  • Goble002
  • Goble002's Avatar
20 Mar 2024 11:47
Replied by Goble002 on topic K2 SEO Tags

K2 SEO Tags

Category: English K2 Community

Either you create a menu item for each tag or either you can set a prefix in K2 > Settings > SEO > Custom SEF URLs > Prefix for tag URLs
  • Oleksandr Ostrovskyi
  • Oleksandr Ostrovskyi's Avatar
19 Mar 2024 16:44
Replied by Oleksandr Ostrovskyi on topic K2 SEO Tags

K2 SEO Tags

Category: English K2 Community

How to do it? because I found an item where you can add one tag to the menu, not all
Displaying 1 - 20 out of 6582 results.

Powered by Kunena Forum