You are here:  » Ebay or Amazon debug?


Ebay or Amazon debug?

Submitted by magnaromagna on Thu, 2020-12-31 17:56 in

Hi,
I installed ebay files on core installation on /pt, and filled config. As suggested here: https://www.pricetapestry.com/node/6197#comment-25299
I see the debug properly here:
{link saved}

But on wordpress installation I don't see anything. Should I implement something also on wordpress installation? How to debug wordpress installation?

Thank you in advance

Submitted by support on Fri, 2021-01-01 09:33

Hi,

Looking at the debug link to your /pt/ installation I see that the actual XML eBay search results response is being returned so you may have resolved the issue but let me know if you're still not sure;

Note that the Async API modules you have installed in /pt/html/ are only for the standalone Price Tapestry, I know you have been using the script for some time so may have the legacy inline plugin versions running so if it is those which you are having trouble getting results to display in WordPress let me know and I'll check it out further with you...

Cheers,
David.
--
PriceTapestry.com

Submitted by magnaromagna on Fri, 2021-01-01 10:48

Hi (and happy new year!)

I'm still having issues on wordpress installation, I don't see ebay results

I followed error log, and I sow

{code saved}

now the error is

[01-Jan-2021 10:41:12 UTC] PHP Warning: file_get_contents({code saved}): failed to open stream: HTTP request failed! HTTP/1.0 500 Internal Server Error
in {code saved} on line 101

Thanks for your help again

Submitted by support on Fri, 2021-01-01 12:31

Hi & HNY likewise!

Regarding the error including MagicParser.php, that would indicate that the External / Install Path plugin setting (wp-admin > Settings > PriceTapestry.org) is incorrect or more likely empty - make sure it is as shown in /pt/admin/ > Tools > Support Info, that should be all it is.

Regarding the API response, it's strange that it works as expected under standalone but returning a server error in this instance. The only difference is that the standalone code uses CURL if available so it might be worth trying that so if you edit pto_api_ebay.php and where you have the following code at line 101:

  $xml = file_get_contents($url);

...REPLACE with:

  $ch = curl_init($url);
  curl_setopt($ch,CURLOPT_HEADER,0);
  curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
  $xml = curl_exec ($ch);

Cheers,
David.
--
PriceTapestry.com

Submitted by magnaromagna on Fri, 2021-01-01 15:26

Hi!
Followed your clear instructions (checked path and changed code), but still the same error:

{code saved}

If you like to take a look directly just let me know

Submitted by support on Sat, 2021-01-02 09:06

Hi,

As that's still showing an error related to file_get_contents() which should have been replaced by the CURL code in the modification that sounds like the page may be cached - if you have a caching plugin that might be causing the old error to be displayed - try disabling the plugin or clearing the cache - or try a hard refresh - CTRL+F5 in most browsers - to ensure the page is definitely reloaded...

Cheers,
David.
--
PriceTapestry.com

Submitted by magnaromagna on Sat, 2021-01-02 09:26

Hi,
I don't see anymore errors in debug files of wordpress, good.

But still not seeing any related ebay products even I disabled cachewall plugin (and still not using any wordpress cache plugin). Which steps (missing files or options) should I check?
Thanks again

Submitted by support on Sat, 2021-01-02 09:42

Hi,

That may be the same error then but not being displayed - in the CURL modification where you have:

   $xml = curl_exec ($ch);

...REPLACE with:

   $xml = curl_exec ($ch);
   if ($xml === FALSE) print curl_error($ch);

If that shows the same 500 Internal Server Error, can you check that the standalone version is showing results, in which case we'd need to add debug code to find out why the WordPress version is generating a different URL...

Cheers,
David.
--
PriceTapestry.com