kinformation / grav-plugin-amazon-products

The Amazon Products Plugin is for Grav CMS. Displays Amazon products by ASIN/ISBN-10 on your pages.
MIT License
8 stars 3 forks source link

Keine Produkte, nur Code #2

Closed Oscar175 closed 6 years ago

Oscar175 commented 6 years ago

Es werden keine Produkte geladen, sondern nur der Code ausgegeben: [amazon asin=059035342X][/amazon]

kinformation commented 6 years ago

Hi, Thank you for using the plugin!

Well, as a possibility

If it is OK, please tell me the locale setting.

Oscar175 commented 6 years ago

Thanks for your answer.

What ist the Shortcode Core Plugin? Is it integrated in Grav?

kinformation commented 6 years ago

This is the Shortcode Core Plugin. https://github.com/getgrav/grav-plugin-shortcode-core

If you installed the Amazon Products plugin with bin/gpm install amazon-products, the Shortcode Core plugin will also be installed. If you are manually installing from the Github source you also need to install the Shortcode Core plugin manually.

Oscar175 commented 6 years ago

I installed the shortcode core plugin, now.

Are the standard settings the right one? The site from my article is only white, since I activated the shortcode plugin.

kinformation commented 6 years ago

The shortcode plugin can be set by default.

If nothing is displayed in the article, the possibility is below.

You can check the API request on the following page.

Product Advertising API Scratchpad

If you succeeded in API request and you are getting images and XML, please let me know the request URL displayed on the test page. The secret information should not be included in the URL. We will check the possibility of a loggic parsing error.

kinformation commented 6 years ago

image

Oscar175 commented 6 years ago

Unsigned URL http://webservices.amazon.de/onca/xml?Service=AWSECommerceService&Operation=ItemLookup&SubscriptionId=AKIAI6JIO2EHD7KIDYFA&AssociateTag=katzenbrunnen04-21&ItemId=B001O1D8CQ&IdType=ASIN&ResponseGroup=Images,ItemAttributes,Offers

Signed URL http://webservices.amazon.de/onca/xml?AWSAccessKeyId=AKIAI6JIO2EHD7KIDYFA&AssociateTag=katzenbrunnen04-21&IdType=ASIN&ItemId=B001O1D8CQ&Operation=ItemLookup&ResponseGroup=Images%2CItemAttributes%2COffers&Service=AWSECommerceService&Timestamp=2017-12-04T10%3A47%3A43.000Z&Signature=Y9RrqNMby2J0%2BLnle9u41Z8PwZT6roP3B4f7UO25rZo%3D

kinformation commented 6 years ago

Thank you. Well, if product information has been acquired, it seems that neither your ID nor ASIN seems to be problematic. . .

By the way, when I used this plug-in by acquiring the Associate ID of amazon.de with my account, I can display the advertisement.

snapcrab_noname_2017-12-4_22-30-28_no-00

· · · I will think about a little more.:sweat:

Oscar175 commented 6 years ago

I cleared all cash files, but the site is white.

I use Grave with default plugins and theme. Extra plugins are your amazon products and shortcode core. All versions are up to date.

amazon

kinformation commented 6 years ago

I tried again by rebuilding my GRAV system, but there is no problem with advertisement display.

OS / Browser

Maybe your browser is not correctly interpreting the CSS or JavaScript used in the plugin?

kinformation commented 6 years ago

Theme Antimatter

Plugins

Oscar175 commented 6 years ago

I downloaded all new versions and tried it on a new test site.

Plugins:

Theme Antimatter v2.1.2

I use Windows 10 with Chrome and Edge. Both have the same problem.

kinformation commented 6 years ago

I saw the demo site, but nothing is displayed. I can not think of a cause. . .

However, it is no longer a matter of the Grav system that nothing is displayed on the body on the "testartikel" page. At least navbar is supposed to be displayed.

If you throw the issue to Github of the official team of "Grav"(https://github.com/getgrav/grav/issues), you may find something nice solution.

Oscar175 commented 6 years ago

Are you using fopen to get the data from amazon?

kinformation commented 6 years ago

Accessing amazon api using php's function file_get_contents() to get XML data.

https://github.com/kinformation/grav-plugin-amazon-products/blob/master/shortcodes/AmazonProductsShortcode.php#L145

Oscar175 commented 6 years ago

Problem solved. With default suhosin settings I get the error.

Error Message: Dec 8 21:42:18 srv01 suhosin[XXXX]: ALERT - Include filename ('plugin://amazon-products/amazon_request.php') is a URL that is not allowed (attacker 'aaa.bbb.ccc.ddd', file '-MYPATH-/user/plugins/amazon-products/shortcodes/AmazonProductsShortcode.php', line 137)

Solution: suhosin.executor.include.whitelist = phar, plugin

kinformation commented 6 years ago

I'm glad you solved :smile: