Google Products Plugin not generating files on cron

  • Posts: 91
  • Thank you received: 7
  • Hikashop Business
2 weeks 6 days ago #371650

-- HikaShop version -- : 6.4.0
-- Joomla version -- : 5.4.4
-- PHP version -- : 8.2.30
-- Browser(s) name and version -- : Firefox 149.0
-- Error-message(debug-mod must be tuned on) -- : none

Greetiing,

As the title notes. My Google Products Plugin is not updating the associated xml and json files when the cron job is fired.

- The files are generated when I use the manual trigger

- I'm using an outside cron service. The Hikashop configuration cron page is verifying the cron is firing.

- I had this working on another server. I suspect it has never worked on my new server. Figured that out when I went in to enable the new JSON feature.

Attached find screenshots of the Hika cron config page and a couple shots of plugin settings.

I've set the sever folder and files to 755 permissions.

I;ve shut off Admin Tools and got the same results.

I've had Claude review my admin tool generated .htaccess and it found and fixed one problem.

Got any ideas ?

Thanks

: D

Attachments:

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

  • Posts: 85606
  • Thank you received: 14010
  • MODERATOR
2 weeks 5 days ago #371651

Hi,

If you want the plugin to update periodically the XML / JSON, you need to activate the "Enable auto update" setting.

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

  • Posts: 91
  • Thank you received: 7
  • Hikashop Business
2 weeks 5 days ago #371654

tried with autoupdate enabled.

still didn't update files.

: D

The following user(s) said Thank You: The Wheaten Terrier

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

  • Posts: 85606
  • Thank you received: 14010
  • MODERATOR
2 weeks 5 days ago #371655

What frequency did you configure ? What is the value of the last update field ?

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

  • Posts: 91
  • Thank you received: 7
  • Hikashop Business
2 weeks 5 days ago #371658

Thanks nic,

See attached.

Crons are sent from an external service every 15 minutes using the specified url.

Hikashop sees them as noted on the cron page.

Hikashop frequency is set to 10 minutes.

Hikashop reports only register when I’ve triggered manually.

: D

Attachments:

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

  • Posts: 85606
  • Thank you received: 14010
  • MODERATOR
2 weeks 3 days ago #371661

Hi,

I don't see why it wouldn't work.
Could you provide a backend access via our contact form in order to look into the situation ?

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

  • Posts: 91
  • Thank you received: 7
  • Hikashop Business
2 weeks 3 days ago #371665

Sent

Thanks

: D

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

  • Posts: 85606
  • Thank you received: 14010
  • MODERATOR
2 weeks 2 days ago #371666

Hi,

We didn't receive your message.
Did you use the contact form at www.hikashop.com/support/contact-us.html ?
Maybe there was a problem. Can you try again ? Did you get the success message when doing so ?

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

  • Posts: 91
  • Thank you received: 7
  • Hikashop Business
2 weeks 2 days ago #371683

Resent

Email title : Credentials

: D

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

  • Posts: 85606
  • Thank you received: 14010
  • MODERATOR
2 weeks 2 days ago #371689

Hi,

If you open the cron URL with your browser and the Cassiopeia template activated and the cron and plugin configured to trigger every second (so that you're sure the plugin is triggered when you open the cron URL) and with the debug of the joomla configuration activated on your website, you get this error page:
i.imgur.com/0UOdCOe.png
This error indicates that in a product description, you have a loadmodule / loadposition tag for a module which has been deleted or is not accessible.
Also, there is a problem in the loadmodule plugin of Joomla. It should have some kind of soft fail so that if it can't find a module for one reason or another, it just gracefully remove the tag and log the problem instead of crashing.
Because of both of these, it leads to the google products plugin being stopped in the middle and thus it can't finish generating the XML.
What's strange is that the problem doesn't happen when manually generating the XML in the backend with the trigger button. Usually, with similar issues, it does and thus it is easier to find out what the problem is.

I've made some changes in the google products plugin so that if something fails during the product description processing by content plugins, the error is ignored. I've added the changes on your website and now I can run the cron URL without the fatal error.

That also means that somewhere on your frontend, you must have a product with doesn't display properly because its description can't be processed due to that same content tag.

I now see some messages from the plugin :
Google Merchant file written to /home/safety/public_html/productfeed/szsproducts.xml
Cannot connect to partnerupload.google.com:19321. Error 101. Network is unreachable
OpenAI feed written to /home/safety/public_html/productfeed/openai_feed.json
So it seems it can write the files properly now, but the credentials for the FTP access of Google Merchants don't seem to work or your hosting is blocking the connection to Google Merchants as part of his security mechanisms.

The following user(s) said Thank You: daduts, The Wheaten Terrier

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

  • Posts: 91
  • Thank you received: 7
  • Hikashop Business
2 weeks 2 days ago #371690

Hey Nic,

Thanks so much for digging into this one.

You may have noticed we've got a pretty large site with >200 products and who knows how many variants.

The client is regularly adding, deleting and updating products. They're gonna make mistakes. Do you think this new fix will keep the Product Feeds updating even when we've got product errors ?

An idea that would make it very helpful. If it finds a product error...report the offending product in the cron report.

On the FTP side....yes, we have the auto ftp to Google shut down at the moment as the client is custom tailoring that via the Google site.

Was working with this now to take advantage of your new JSON feed.

Thanks again,

Dave

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

  • Posts: 85606
  • Thank you received: 14010
  • MODERATOR
2 weeks 1 day ago #371691

Hi,

Yes, we'll add the reporting in the log in the next version.
And yes, the changes I made will prevent similar errors in the future.

The following user(s) said Thank You: daduts

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

  • Posts: 10
  • Thank you received: 0
  • Hikashop Business
6 days 10 hours ago #371828

Hi,

I too am having the same issue, triggering manually works yet auto fails. You said:

I've made some changes in the google products plugin so that if something fails during the product description processing by content plugins, the error is ignored.

Could you explain the alterations so I can try the fix also please?

All my listings load a module at the bottom, do I need to remove this line for the plugin to work?

Thank you.


Tolerence costs nothing.
Intolerance is intolerable!

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

  • Posts: 85606
  • Thank you received: 14010
  • MODERATOR
6 days 6 hours ago #371831

Hi,

The change to avoid this has been added as a hot fix on our end.
So, if you download the install package of HikaShop on our website and install it on yours, you will get the patch. So no need to change any code.

The following user(s) said Thank You: The Wheaten Terrier

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

  • Posts: 10
  • Thank you received: 0
  • Hikashop Business
5 days 10 hours ago #371846

Hello Nicolas,

Thank you for the fix, I did the update and the Google Merchant Products plugin is triggering and generating the file as expected using the cron task.

However, I am struggling with the settings to allow Google access to the file on my server.

Within the Hikashop plugin after the Enable Auto update (Set to YES), there is a username and password fields. Where do I find the username and password? Do I create them here, do I create them in my C-Panel FTP accounts or somewhere else?

Also, which option do I choose within Merchant centre: SFTP or link to a file? The former (SFTP) does not have a file path and the Link to a file allows for authentification and when I create a username and password in the Hikashop Google Merchant Products plugin, I get the following error:

Authentication failed: Download failed due to authentication error. Please check your username and password feed configuration and try again.

If I manually upload the file, Google is happy and proves the file configuration is correct.

I'm totally confused and look forward to hearing your reply.

Best wishes.


Tolerence costs nothing.
Intolerance is intolerable!

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

  • Posts: 85606
  • Thank you received: 14010
  • MODERATOR
4 days 11 hours ago #371850

Hi,

The FTP credential fields there are to allow your website to directly upload the file to Google Merchant's FTP under your account there. You'll find the FTP credentials in your Google Merchant account:
support.google.com/merchants/answer/13813117?hl=en
Note that SFTP is basically FTP. The "S" just stands for "Secure".

Another way is to provide a path to the plugin so that the file is accessible via your web server.
For example, suppose that your website is in the folder /my/website/root/
Then, you can provide the path /my/website/root/myxmlfile.xml in the plugin.
And then, you can give the link mywebsite.com/myxmlfile.xml in your Google Merchant account, and in that case, it will be Google Merchant retrieving the XML file from your website periodically.

The following user(s) said Thank You: The Wheaten Terrier

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

Time to create page: 0.073 seconds
Powered by Kunena Forum