Cron working but XML file not updating

  • Posts: 44
  • Thank you received: 2
6 years 2 weeks ago #300222

-- url of the page with the problem -- : www.koffiematters.nl
-- HikaShop version -- : 4.0.0
-- Joomla version -- : 3.8.12
-- PHP version -- : 5.6.38

Hi folks,

I hope someone has an idea about this small problem we have. I followed every instruction to the letter and the cron seems to work without any problem. The only thing I can't figure out is that the XML file isn't updated. I checked the permissions of the directory (/export) and the xml file inside it (kmproductlijst.xml

I tried running the cron function from inside Hikashop and on the server itself, but it makes no difference unfortunately.
This is the cron rule:

This message contains confidential information
and running every 15 minutes. The reports I get from the server give a positive result without any errors.

For testing purposes, I changed some things in certain products to test, but it doesn't work. The file is simply not updated at all.

Anyone an idea?

p.s. I can't reach hikashop.com from my home, so maybe my IP is blocked for some reason? Maybe this happened because I use my own account (this one) and the account belonging to koffiematters (hikashop business edition)

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 2 weeks ago #300225

Hi,

I suppose that you're talking about the generation of the XML by the Google Products plugin. Is that right ?
Could you provide a screenshot of its settings ?
Also, can you confirm that if you manually trigger the plugin to get the XML ?
Also, in on cron documentation, we have a section to check that your cron is working:
www.hikashop.com/support/documentation/5...cron-task.html#check
Can you do that ?
Also, you can check the report of the cron to see if the cron is being triggered and if the plugin works properly. A message should be written in it by the plugin when the XML is updated or when it can't update it.
Finally, you'll want to reduce the frequency of the plugin for your tests so that you can trigger the plugin each time the cron runs and not only once a day (as it is set by default).

PS: what is your home IP address ? We do have a firewall which can block IP addresses. Normally it only blocks spam and hack attempts. But it's possible that you might have been wrongly flagged. It has nothing to do with your user account.

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

  • Posts: 44
  • Thank you received: 2
6 years 2 weeks ago #300262

Hi Nicolas,

I ran through everything you mentioned, but everything seems ok. Here are some screenshots:
prntscr.com/lfuzen
prnt.sc/lfv0gv

And here's a screenshot of the mail I received from our server showing the cron ran ok:
prntscr.com/lfv1s1

"Finally, you'll want to reduce the frequency of the plugin for your tests so that you can trigger the plugin each time the cron runs and not only once a day (as it is set by default)." I don't understand what setting you mean by this. I hope this means any sense to you :-D because to me it isn't in any way ;-)

This message contains confidential information

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 2 weeks ago #300266

Hi,

On your second screenshot, you have the setting "frequentie". It's set to 86400 and it means that once the plugin is triggered once, it won't accept another trigger until 86400 seconds (one day) have passed. So for your tests, it would be better to change it to 1. That way, each time the cron will be triggered the plugin will be triggered too and you'll be able to more easily find if it's working or not..

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

  • Posts: 44
  • Thank you received: 2
6 years 1 week ago #300319

Hi Nicolas,

I understand, but that has nothing to do with the problem in my case. After a day the file should be updated.
As you mentioned, I changed the frequency, but no change as I expected. I see the report is being updated every time the cron runs with only OK messages. The content is simply not updated.

BTW: I can reach the site again normally :) Thanks! Was it blocked by the firewall?

Last edit: 6 years 1 week ago by hielkio.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 1 week ago #300329

Hi,

That's right, it has nothing to do with the problem. Except that if you keep it to 86400, then you might be looking at the reports and email notifications without errors just because the plugin didn't process anything as it wasn't yet time for it to process it.
That's why setting it to 1 while you're trying to understand what is the problem is a good idea. I'm not saying it will solve anything, but it's better to understand where the problem comes from.
So, supposing that when you click on the "trigger" link of the plugin you do get the XML sent to you by the plugin, here are all the possible things that could lead to the XML not being generated properly supposing that your cron task is working:
- you're using HikaShop Starter (apparently, that's not the case on koffiematters.nl
- the local path is empty (apparently that's not the case looking at the screenshot of the settings of the plugin)
- the local path is not valid (however, in that case, an error message should be added to the report)
- the plugin is not enabled and thus not triggered by the cron
- the plugin is not set to a "public" access level and thus not triggered by the cron
I don't see anything else which could cause the problem.

PS: The firewall automatically unbans IP addresses after 48 hours maximum. I didn't had the time to check the log of the firewall, but since you got back the access, I suppose it came from that.

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

  • Posts: 44
  • Thank you received: 2
6 years 5 days ago #300640

Hi Nicolas,

I started all over again, but in this case no XML file is created by the system at all.
I checked your points with this results:

  • you're using HikaShop Starter (apparently, that's not the case on koffiematters.nl
  • Indeed, we use Hikashop Business
  • the local path is empty (apparently that's not the case looking at the screenshot of the settings of the plugin)
  • Check
  • the local path is not valid (however, in that case, an error message should be added to the report)
  • Local path is valid
  • the plugin is not enabled and thus not triggered by the cron
  • Plugin is enabled
  • the plugin is not set to a "public" access level and thus not triggered by the cron
  • Plugin is set to public

I tried both options- triggering by our own cron-job and from within Hikashop, but both give no errors but nothing seems to happen.
Also I checked if the local path is writable and it is, updated Joomla and upgraded to php V7.1.

I really hope someone has an idea here, because we really need to get this up-and-running asap.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
6 years 3 days ago #300705

Hello,

Local path is valid

Would it be possible to know more about it ?
How can we be sure that the path is valid and your website have the right to write into ?

When you call the cron task, each called plugin add its own message into.
Because each plugin can have its own "frequency", some are just called once a day, etc.
You have to check some values in the plugins to check the timestamps for the next cron call and also its frequency.
You can also empty the next call field to force the plugin to do its job on the next cron.
Then, by calling the cron manually, you should see some details about the plugin ; and maybe some debug information if they are some issues (more specially if the debug mode is enabled).

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 3
  • Thank you received: 2
5 years 10 months ago #301945

I had the same issue and did some debugging: it appears that '$pluginsClass->loadParams($plugin);' in the onHikashopCronTrigger tries to reload the params from Json, while they are passed as an array ($plugin->params).

To avoid this I changed the first line in the 'loadParams()' function in administrator/components/com_hikashop/classes/plugins.php from

if(empty($result->params))
			return;
to:
if(empty($result->params) || is_array($result->params))
			return;

The file is now generated.

I think this is a bug and might be fixed in the upcoming update?

The following user(s) said Thank You: hielkio

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
5 years 10 months ago #301963

Hi,

I think that this only happens in some cases, like in some versions of PHP or Joomla as I don't have the issue on my end. However, this modification is a good thing anyways and if you say that it helps, then even more so. So yes, we'll definitely include the change in the next version of HikaShop. In fact, I've added it as a hot patch to the 4.0.1 just in case someone wants to update and get the fix without having to do the modification in the code.
Thank you for your feedback !

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

  • Posts: 3
  • Thank you received: 2
5 years 10 months ago #301984

Thank you for the fast update, Nicolas.
Much appreciated!

My config was PHP 7.2.13 with Joomla 3.9.1 by the way.

The following user(s) said Thank You: nicolas

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

  • Posts: 44
  • Thank you received: 2
5 years 10 months ago #302041

Dirk, you're the best! I don't know how to thank you :kiss:
It works like a charm now without changing anything else!
You're my hero for at least the past year!

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

  • Posts: 3
  • Thank you received: 2
5 years 10 months ago #302057

You're very welcome, Hielkio.
Glad to read that this fix works for you as well! :cheer:

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

  • Posts: 127
  • Thank you received: 6
5 years 10 months ago #302898

I too have this problem, possibly since updating to Hikashop 4.01 in December, but I can't be certain.
Though the Cron task runs and the directory is writable my feed file no longer updates. Before the update things seemed fine.

I am using Joomla 3.6.5, PHP 7.2.14, Hikashop Business 4.01

I did make those changes to administrator/components/com_hikashop/classes/plugins.php but the problem remains with no error report, just no update.
Site is www juicybike co uk

This message contains confidential information

What's next to try? I did try to update to 4.02 on my testing site
This message contains confidential information
but that did break my site with an error message "Class 'phpQuery' not found" on some pages - not sure if that's connected.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
5 years 10 months ago #302899

Hi,

I would indeed have recommended to update to the 4.0.2. However, that error with phpQuery doesn't come from HikaShop as HikaShop doesn't use phpQuery. It must come from something else on your website.

If you have the patch and you sitll have a problem with the XML, it means that the issue is elsewhere. We would need more details on how you configured your plugin and a backend access to check your settings etc.
You can use our contact form for that along with a link to this thread: www.hikashop.com/support/contact-us.html

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

  • Posts: 127
  • Thank you received: 6
5 years 9 months ago #302924

Thank you Nicolas - I've sent the access details.
Our live site is running and we can update the feed manually so this problem is not so urgent. The test site (vers 4.02) shows the Class 'phpQuery' not found problem, Live site is still Hikashop vers 4.01.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
5 years 9 months ago #302940

Hi,

I did a test on your website and set the last update setting of the plugin in the past and activated the cron report of the HikaShop configuration.
I did get the report that the file was properly generated:

******************** 2019-01-23 17:09 ********************
HikaShop Triggered at 2019-01-23 17:08
---- Details ----
Google Merchant file written to /home/juicebik/public_html/feeds/data-feed.xml

The following user(s) said Thank You: Bobwales

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

  • Posts: 127
  • Thank you received: 6
5 years 9 months ago #302959

Thank you Nicolas - I have temporarily set the interval to 900 secs and can see the file is updating. I can't think why the "last update" .should have become into the future... BUT, it is working, so I am happy :) Reset interval to 86400

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

Time to create page: 0.139 seconds
Powered by Kunena Forum