strange line in file error_log

  • Posts: 281
  • Thank you received: 3
7 years 1 month ago #264744

-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.6.5

Hello
I was checking the file log of joomla: error_log and I saw that almost every day there is a line as this one:
[11-Mar-2017 15:08:13 Europe/Rome] PHP Warning: Creating default object from empty value in /home/mtyvffgb/public_html/components/com_hikashop/views/category/view.feed.php on line 120

What means that?? it is normal??

Thanks
Frank

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

  • Posts: 81476
  • Thank you received: 13059
  • MODERATOR
7 years 1 month ago #264748

Hi,

You can ignore it. It's just a check which has to be added to remove the warning. That was actually done in more recent versions of HikaShop so when you'll update, you won't have that warning in your logs anymore.

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

  • Posts: 210
  • Thank you received: 4
6 years 3 months ago #285887

Hi,
Undefined offset 0 in /components/com_hikashop/views/category/view.feed.php on line 124

how to fix ?

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

  • Posts: 81476
  • Thank you received: 13059
  • MODERATOR
6 years 3 months ago #285893

Hi,

Change the line:

if(!is_object($products[$k]->images[0])){
to:
if(empty($products[$k]->images[0]) || !is_object($products[$k]->images[0])){
in that file.

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

  • Posts: 210
  • Thank you received: 4
6 years 2 months ago #286071

thank you i will

also one error in this file

PHP Notice: Undefined property: stdClass::$prices in /components/com_hikashop/views/category/view.feed.php on line 188
Trying to get property of non-object in /components/com_hikashop/views/category/view.feed.php on line 188

how to fix ?

and would you explain me please what is the function of view.feed.php ?

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

  • Posts: 81476
  • Thank you received: 13059
  • MODERATOR
6 years 2 months ago #286088

Hi,

Change the line:

if($product->prices['0']->price_value_with_tax != 0 ){
to:
if(!empty($product->prices) && $product->prices['0']->price_value_with_tax != 0 ){
and that will fix this one.

That file is there to generate the RSS feed for your products. That way, your customers can subscribe to the different categories to get notified in their RSS reader when you add new products.

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

  • Posts: 210
  • Thank you received: 4
6 years 2 months ago #286163

Thank you i will use it.

Will you include this fixes in future issues on hikashop bussines ?

Where to get RSS feed weblink of category ? I dont see any such links on categories views.

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

  • Posts: 81476
  • Thank you received: 13059
  • MODERATOR
6 years 2 months ago #286166

Hi,

Yes, they will be included in the next version.

HikaShop only adds the RSS feed link in the meta tags of the page and handle the display of the RSS data when the link is used.

If you want to display the link to the feed, you can use an module or a menu item:
www.joomlashine.com/blog/how-to-create-r...d-in-joomla-3-x.html
However, most RSS readers don't need it and there are extensions for browsers if you want it in your browser.
webmasters.stackexchange.com/questions/2...scovery-still-viable

For example, for the page:
demo.hikashop.com/index.php/en/hikashop/...ing/display-in-table
you have the feed URL:
demo.hikashop.com/index.php/en/hikashop/...format=feed&type=rss
And with the correct extension for chrome, it will find it for you:
monosnap.com/file/1WM4twS7yRJPoAVdMRpkHqy0H3MTV4

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

Time to create page: 0.075 seconds
Powered by Kunena Forum