Missing in product listing

  • Posts: 137
  • Thank you received: 2
13 years 2 months ago #24697

Hi!

Since the last update to HikaShop 1.5.3 there is no <title> tag when accessing the product listing page. (Joomla 1.7). On the product pages it works as it should

Best regards

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 2 months ago #24699

Hi,

I can see the title tag on products listings with the latest version regardless of the version of joomla (I tried them all just to make sure). I can also see the title tag on our demo website on listings.

So everything is OK on our end.

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

  • Posts: 137
  • Thank you received: 2
13 years 2 months ago #24847

OK, but where and how is this title generated? So I could solve the problem.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 2 months ago #24848

It's added with the function setTitle in the file components/com_hikashop/views/product/view.html.php in the listing function.
As I said, it works properly so maybe you have something else on your website which removes the title after it's been added ?

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

  • Posts: 137
  • Thank you received: 2
13 years 2 months ago #24949

Could this problem be linked up to the fact, that in the menu manager the menu item to the product listing page is of type: HikaShop » com_hikashop_product_VIEW_DEFAULT_TITLE?

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

  • Posts: 137
  • Thank you received: 2
13 years 2 months ago #24950

I also just found a PHP Notice in our error log which could be the problem:

PHP Notice:  Trying to get property of non-object in /.../www/components/com_hikashop/views/product/view.html.php on line 354, referer: http://....com/

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 2 months ago #24951

No, no, I was more thinking about a system plugin which would remove the title at the end of the page processing.

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

  • Posts: 137
  • Thank you received: 2
13 years 2 months ago #24982

But why should this system plugin only remove the title on the product listing page?

Line 354 of the view.html.php sets the title

$document->setTitle( strip_tags($element->category_name) );

I would also like to remove the error, there is obviously a bug in the view.html.php on line 354

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 2 months ago #24986

Hi,

Here is the code in the current version:

			$page_title = $this->params->get('page_title');
			$document	=& JFactory::getDocument();
			if((empty($page_title) && !empty($element->category_name)) || !$this->params->get('use_module_name')){
				@$this->params->set('page_title',$element->category_name);
				$document->setTitle( strip_tags($element->category_name) );
			}else{
				$document->setTitle( $page_title );
			}



Here is the code that will be in next version of HikaShop:
			$document	=& JFactory::getDocument();
			$title = $this->params->get('page_title');
			if(empty($title)){
				$title = $this->params->get('title');
			}
			$use_module = $this->params->get('use_module_name');
			if(empty($use_module) && !empty($element->category_name)){
				$title = $element->category_name;
			}
			$document->setTitle(strip_tags($title));
			$this->params->set('page_title',$title);
I'm not sure if it will be ok to just replace it but you should try.

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

  • Posts: 137
  • Thank you received: 2
13 years 2 months ago #25318

Apart from missing braces in both code parts, it works now and the error message is gone! Thanks

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

Time to create page: 0.062 seconds
Powered by Kunena Forum