Keyword

Duplicate k2 items in K2 tag listings!

  • ATHANASIOS ILIOPOULOS
  • ATHANASIOS ILIOPOULOS's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 10 months ago #144506 by ATHANASIOS ILIOPOULOS
Duplicate k2 items in K2 tag listings! was created by ATHANASIOS ILIOPOULOS
Hello to the Forum!

Got a strange behavior in one of my TAG listing custom templates (attached) ...

Check here:

www.greekvillas4rent.com/elite-collection-en

on the bottom of the first page, there is the item: Villa Elea III

on the second page:

www.greekvillas4rent.com/elite-collection-en?start=12

it appears again!

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

  • ATHANASIOS ILIOPOULOS
  • ATHANASIOS ILIOPOULOS's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 10 months ago #144507 by ATHANASIOS ILIOPOULOS
Replied by ATHANASIOS ILIOPOULOS on topic Duplicate k2 items in K2 tag listings!
I am attaching the code of tag.php (custom template) since i can not attach a file:

<?php

/**
 * @package		K2
 * @author		GavickPro http://gavick.com
 */

// no direct access
defined('_JEXEC') or die;

//build rich titles
$document = &JFactory::getDocument();
$app = JFactory::getApplication();

$title_str= JText::_('ELLITE_PAGE_PREFIX_TITLE') ." | " . JText::_('VILLA_PAGE_SUFFIX_TITLE');
$document->setTitle($title_str);


?>

<div style="font-size:90%; margin-top:5px;">
<?php 
	//echo JText::_('ELLITE_INTRO');	
	//load intro text for elitecollection
	$articleId = 35;
	$db = JFactory::getDbo();
	$query = $db->getQuery(true);
	$query->select($db->quoteName(array('introtext')));
	$query->from($db->quoteName('#__content'));
	$query->where($db->quoteName('id') . ' = '. $db->quote($articleId));
	$db->setQuery($query);
	$fullArticle = $db->loadResult();	
	echo trim($fullArticle);	
?>
</div>

<section id="k2Container" class="genericView<?php if($this->params->get('pageclass_sfx')) echo ' '.$this->params->get('pageclass_sfx'); ?> ellite">
		<?php if($this->params->get('show_page_title')): ?>
		<header>
				<h1><?php echo $this->escape($this->params->get('page_title')); ?></h1>
		</header>
        
		<?php endif; ?>
		<?php if(count($this->items)): ?>
		<section class="itemList">
				<?php foreach($this->items as $item): ?>
				<article class="itemView">
					<?php if($item->params->get('tagItemImage',1) && !empty($item->imageGeneric)): ?>                  
                    <div class="itemImageBlock"> <a class="itemImage" href="<?php echo $item->link; ?>" title="<?php if(!empty($item->image_caption)) echo $item->image_caption; else echo $item->title; ?>"> <img src="<?php echo $item->imageGeneric; ?>" alt="<?php if(!empty($item->image_caption)) echo $item->image_caption; else echo $item->title; ?>" style="width:100%; ?>px; height:auto;" /> </a> </div>
                    
					<?php endif; ?>
					
					<aside>
						<?php if($item->params->get('tagItemDateCreated',1)): ?>
						<time datetime="<?php echo JHtml::_('date', $item->created, JText::_(DATE_W3C)); ?>">
							echo "<br />";
							?>
                            
						</time>
						<?php endif; ?>
						
						<?php if($item->params->get('tagItemCategory')): ?>
						<ul>
								<!-- print some extra fields -->
                                <?php if($item->params->get('tagItemExtraFields',0) && count($item->extra_fields)): ?>
                                
                                <?php
?>
                                
								<li class="location">
		<?php 
		   	
            echo  $item->extraFields->location->value . "<br />" . $item->extraFields->area->value; 
		?>
                                </li>
								<?php endif; ?>
                                
                                <li class="bedrooms">
          <?php 
		  	echo $item->extraFields->sleeps->value . " sleeps";
			echo "<br />" . $item->extraFields->bedrooms->value . " bedrooms"; 
			echo "<br />" . $item->extraFields->outside_water_facilities->value;
		?>                      
                                </li>
                                
						</ul>
						<?php endif; ?>
					</aside>
					<div class="k2box">
						<header>
								<?php if($item->params->get('tagItemTitle',1)): ?>
								<h2 class="ellite">
										<?php if ($item->params->get('tagItemTitleLinked',1)): ?>
										<a href="<?php echo $item->link; ?>"> <?php echo $item->title; ?> </a>
										<?php else: ?>
										<?php echo $item->title; ?>
										<?php endif; ?>
								</h2>
								<?php endif; ?>
						</header>
						
						<div class="itemBody">
								<?php if($item->params->get('tagItemIntroText',1)): ?>
								<div class="itemIntroText ellite"> 
								
								<?php 
								$string="";
								$length = 400; //modify for desired width
								$string = preg_replace('/\s+?(\S+)?$/', '', substr($item->introtext, 0, $length));
								
								
								echo $string; 
								
								?> 
                                
                                </div>
								
								<?php endif; ?>
								
								<?php if ($item->params->get('tagItemReadMore')): ?>
								<a class="itemReadMore button" href="<?php echo $item->link; ?>"> <?php echo JText::_('K2_READ_MORE'); ?> </a>
								<?php endif; ?>
						</div>
					</div>
				</article>
				<?php endforeach; ?>
		</section>
		<?php if($this->params->get('tagFeedIcon',1)): ?>
		<a class="k2FeedIcon" href="<?php echo $this->feed; ?>"><?php echo JText::_('K2_SUBSCRIBE_TO_THIS_RSS_FEED'); ?></a>
		<?php endif; ?>
		<?php if($this->pagination->getPagesLinks()): ?>
		<?php echo str_replace('</ul>', '<li class="counter">'.$this->pagination->getPagesCounter().'</li></ul>', $this->pagination->getPagesLinks()); ?>
		<?php endif; ?>
		<?php endif; ?>
</section>

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 10 months ago #144511 by Krikor Boghossian
Replied by Krikor Boghossian on topic Duplicate k2 items in K2 tag listings!
What are your tag ordering settings?
Also which other K2 related extensions are you using?

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

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

  • ATHANASIOS ILIOPOULOS
  • ATHANASIOS ILIOPOULOS's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 10 months ago #144519 by ATHANASIOS ILIOPOULOS
Replied by ATHANASIOS ILIOPOULOS on topic Duplicate k2 items in K2 tag listings!
Hello!

a) tag ordering settings: INHERIT FROM CATEGORY OPTIONS
Have selected a single (root, one level) category with parameters:
Catalogue mode: Yes
Item ordering: most recent first (date created)

b) other k2 related extensions:
"MODULE: K2 Filter & Search module",
"PLUGIN - Komento Comments - integrated with k2",
"MODULE: K2 ExtraOrder",
"MODULE: K2 Categories Treeview - Pro",
"MODULE: BT Content Slider",
"PLUGIN - Inceptive Image Gallery for K2",
"PLUGIN - K2 - Additional Categories for K2",
"PLUGIN - jNews K2 Plugin"

but none of them is used on this TAG listing page!

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 10 months ago #144521 by Krikor Boghossian
Replied by Krikor Boghossian on topic Duplicate k2 items in K2 tag listings!
You need to update to K2 2.6.9
Then you need to disable these extensions one by one to see which is causing this issue.

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