Header error while export orders

  • Posts: 6
  • Thank you received: 0
12 years 1 month ago #68841

I followed the instructions in this thread so that Google Analytics eCommerce would show our orders paid with PayPal and PayPal Pro.

www.hikashop.com/en/forum/3-bug-report/4...nalytics-plugin.html

After adding the code, all of the sales began showing up in our GA account, and all seemed fine.

Then when we went to export the csv of the sales in the HikaShop interface, we get these errors:

Warning: Cannot modify header information - headers already sent by (output started at /MY/SERVER/INFO/plugins/system/hikashopanalytics/hikashopanalytics.php:21) in /MY/SERVER/INFO/administrator/components/com_hikashop/views/order/tmpl/export.php on line 77

Like what the guy in this thread got when trying to do the same thing, except the file in our errors is hikashopanalytics.php

www.hikashop.com/ja/forum/2-general-talk...e-export-orders.html

We tried removing the new code from hikashopanalytics.php, but we still get the error.

Thank you for any suggestions.

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

  • Posts: 82818
  • Thank you received: 13362
  • MODERATOR
12 years 1 month ago #68954

I'm unclear as to why you get that warning.
The user said that it was a misconfiguration in the htaccess of his website.
Did you change something in the htaccess of your website ?
That would explain why you get the same issue.
And in that case, I guess that you would have to fix your htaccess.

Otherwise, all I can recommend is to temporarily unpublish that plugin when you do the export.

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

  • Posts: 6
  • Thank you received: 0
12 years 1 month ago #69047

Well no changes were made to the htaccess file but unpublishing the plugin did work.
Thanks for the help!

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

  • Posts: 6
  • Thank you received: 0
12 years 1 month ago #69354

Ok, I have just discovered another header error issue.

Now, if someone tries to download a pdf from the front end of the site, while the analytics plugin is enabled, the header errors occur again.

So in short, we didn't change anything in the htaccess file. All we changed before this issue started was the code in the Google Analytics plugin file. If we disable that plugin, everything is fine except we don't get the Analytics stats (which won't do). When the plugin is enabled, we get that error with the headers text anytime someone tries to download an Excel or PDF from the site (which also won't do).

Any suggestions?

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

  • Posts: 82818
  • Thank you received: 13362
  • MODERATOR
12 years 1 month ago #69537

So you're saying that you changed the code of the google analytics plugin and that you now have issues when you have it published ?
Then look no further. The problem comes from your modifications. What did you changed in the GA plugin file ?

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

  • Posts: 6
  • Thank you received: 0
12 years 1 month ago #69541

All that was changed from the GA plugin file was the code suggested here, www.hikashop.com/en/forum/3-bug-report/4...nalytics-plugin.html .

The modifications are exactly what was suggested to add in the other thread, and those modifications allow us to see all of our orders in the Google Analytics stats, so it does work. But in the process of fixing the bug, it breaks something else. If we turn it off, we are able to export the cvs file from the Hikashop interface and download pdfs from the front end, but we don't get the stats. If we turn it on, we get the stats, but our downloads are broken. We want/need BOTH of these things to work.

We are aware that the modifications are causing the problem, but we need to keep the functionality the modification fixed, and not have that functionality cause errors in another. Is there a way to have both functionalities (the Google Analytics stats and be able to export/download files) working at the same time?

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

  • Posts: 82818
  • Thank you received: 13362
  • MODERATOR
12 years 1 month ago #69548

The code modification suggested in that thread won't produce that error.
And in any case, that modification is already included in recent versions of HikaShop so you should not need it unless you're using an old version of HikaShop.
However, if you did that modification in the latest version of HikaShop, that's normal that you get that error since there is basically twice the same function in the same class.
I would suggest to double check the modification you did in that plugin.

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

Time to create page: 0.046 seconds
Powered by Kunena Forum