HikaShop Cron

  • Posts: 14
  • Thank you received: 0
  • Hikashop Business
4 weeks 1 day ago #336736

-- url of the page with the problem -- : brachfeld.de
-- Browser(s) name and version -- : Chrome
-- Error-message(debug-mod must be tuned on) -- : HikaShop Cron ausgelöst am 2021-11-03 15:17
Could not retrieve the CSV file brachfeld.de/Kiran/hika_gesamt.csv

We use Hikashop Products Cron Update Plugin.

Yesteraday we upload new SSl Certificates and now we get this error:
Could not retrieve the CSV file brachfeld.de/Kiran/hika_gesamt.csv

In plugin is adress:
Kiran/hika_gesamt.csv

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

  • Posts: 74250
  • Thank you received: 11418
  • MODERATOR
4 weeks 1 day ago #336743

Hi,

This seems to indicate that it can't validate the new certificate for some reason (for example, the openssl PHP module is not enabled in the php.ini : faq.miniorange.com/knowledgebase/enable-php-openssl-extension/ ).
Modifying the code of the plugin might help to circumvent this as per www.codegrepper.com/code-examples/php/ph...ts+disable+ssl+check
You can try changing the line:

$contentFile = file_get_contents($path);
to:
$arrContextOptions=array(
    "ssl"=>array(
        "verify_peer"=>false,
        "verify_peer_name"=>false,
    ),
);
$contentFile = file_get_contents($path, false, $arrContextOptions);
in the file plugins/hikashop/datafeed/datafeed.php



PS: please do not post your message both by email and in the forum.

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

  • Posts: 14
  • Thank you received: 0
  • Hikashop Business
4 weeks 11 hours ago #336781

Thanks Nicolas.
But it doesn't help.

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

  • Posts: 74250
  • Thank you received: 11418
  • MODERATOR
4 weeks 3 hours ago #336803

Hi,

Then replace the code:

$path = JURI::base() . $path;
			$path = str_replace('administrator', '', $path);
by:
$path = JPATH_ROOT.DS.$path;
That will force the plugin to read the file from the hard drive of the server instead of going through apache and thus it won't have to mess with the SSL certificate.

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

  • Posts: 14
  • Thank you received: 0
  • Hikashop Business
3 weeks 3 days ago #336900

It doesn't help. I don't think, it is ssl problem.
If I try in cron in "Create/edit your Cron task" to activate cron I get the message "hikashop connection denied".
Rgds Robert

Attachments:

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

  • Posts: 74250
  • Thank you received: 11418
  • MODERATOR
3 weeks 2 days ago #336905

Hi,

That should not matter.
The error "Could not retrieve the CSV file brachfeld.de/Kiran/hika_gesamt.csv" indicates that the cron is running, but just that the CSV file cannot be loaded by the plugin trying to import it.
The last code modification I gave completely bypass apache and SSL needs. So I don't see how you could have the exact same error message.
Could you please double check ?

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

  • Posts: 14
  • Thank you received: 0
  • Hikashop Business
3 weeks 2 days ago #336927

Now I get this emal:

HikaShop Cron ausgelöst am 2021-11-09 23:52
Could not find the file /var/www/vhosts/brachfeld.de/httpdocs/Kiran/hika_gesamt.csv

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

  • Posts: 74250
  • Thank you received: 11418
  • MODERATOR
3 weeks 1 day ago #336933

Hi,

As expected, it's not the same error.
So it says it can't find the file. Can you confirm via FTP that the file is there ? It probably isn't.

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

  • Posts: 14
  • Thank you received: 0
  • Hikashop Business
3 weeks 1 day ago #336965

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

  • Posts: 74250
  • Thank you received: 11418
  • MODERATOR
3 weeks 22 hours ago #336968

Hi,

Can you provide a screenshot of your FTP client when you're looking at the folder where that file is located ?

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

  • Posts: 14
  • Thank you received: 0
  • Hikashop Business
2 weeks 6 days ago #337009

It doesn't send this Email any more.

But the plugin doesn't update the products.

The file exist in:
brachfeld.de/Kiran/hika_gesamt.csv

Attachments:

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

  • Posts: 74250
  • Thank you received: 11418
  • MODERATOR
2 weeks 6 days ago #337013

Hi,

I don't see why it wouldn't work.
Could you please provide a backend access and a FTP access via our contact form along with a link to this thread so that we can directly check at the situation ?
www.hikashop.com/support/contact-us.html

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

  • Posts: 14
  • Thank you received: 0
  • Hikashop Business
2 weeks 3 days ago #337079

Hi,

many thanks for your support, it was something wrong with CSV-file.

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

  • Posts: 14
  • Thank you received: 0
  • Hikashop Business
2 weeks 1 day ago #337190

By the way I found in the database in table hikashop_product 61.755 products, which is correct.
But in hikashop_price 9.388.208, which is to much.
Can I delete all and upload the new products as csv?
Mass actions or delete in sql?

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

  • Posts: 74250
  • Thank you received: 11418
  • MODERATOR
2 weeks 14 hours ago #337207

Hi,

I would recommend to run that MySQL query in your PHPMyAdmin:

DELETE FROM #__hikashop_price WHERE price_product_id NOT IN (SELECT product_id FROM #__hikashop_product);
(you need to replace #__ by your table prefix)
That will delete all the price entries not linked to one of your products.

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

  • Posts: 14
  • Thank you received: 0
  • Hikashop Business
5 days 12 hours ago #337454

Thanks Nicolas.
Is't possible to run this code automaticaly every day or week?
We have Linux on our server.

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

  • Posts: 74250
  • Thank you received: 11418
  • MODERATOR
3 days 13 hours ago #337475

Hi,

It's possible by setting up your crontab properly.
Here is a tutorial on this:
dsharpdotnet.wordpress.com/2013/07/04/ho...dical-mysql-queries/

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

Time to create page: 0.083 seconds
Powered by Kunena Forum