WordPress.org

Ready to get started?Download WordPress

Forums

Amazon Product in a Post Plugin
Warning: Invalid argument supplied for foreach() (8 posts)

  1. Dimitri.mamulashvili
    Member
    Posted 10 months ago #

    hello, i am getting this error on random posts.
    Warning: Invalid argument supplied for foreach() in /home/content/31/11682631/html/wp-content/plugins/amazon-product-in-a-post-plugin/inc/amazon-product-in-a-post-shortcodes.php on line 224
    can you help me?

    http://wordpress.org/plugins/amazon-product-in-a-post-plugin/

  2. WebEndev
    Member
    Posted 10 months ago #

    I am also getting this error.
    Using WP 3.6.1 and version 3.5.2 of the plugin.
    Using the Genesis framework, version 2.0.1, and it's an HTML5 theme.

    Getting the error on both localhost (XAMPP), and KnownHost VPS.

  3. WebEndev
    Member
    Posted 10 months ago #

    Follow Up:

    The problem was the AWS key and secret key I was given to use by the client were incorrect. Once I got the correct keys, it works perfectly.

    Very nice plugin. Love the amazon-elements shortcode. It adds a great deal of flexibility on what can be retrieved by the API.

    The only wish list for me is adding a search tool by keyword(s), and another by ASIN. Keyword search could bring up a list of products, and then the product could be viewed on Amazon, or selected to insert into the post/page.
    Just an idea... :)

    Thank you for your work on this plugin!

  4. candied
    Member
    Posted 7 months ago #

    I am also having this problem, I guess this is very common, If you try searching on google (excluding ""): "Warning: Invalid argument supplied foreach() in /inc/amazon-product-in-a-post-shortcodes.php on line 224" a lot of sites will show up. I have tried switching to curl and momentarily fixed the problem but it randomly reappears for a time then disappears again. Help anyone? :)

  5. candied
    Member
    Posted 7 months ago #

    More detailed info:
    - I am only using the new-price element.
    - This only happens when the price is not showing.
    - Only displays this error on the mainloop since it is included on the excerpt.
    - On the product page no price and no error are displayed.
    - breaks the site's navigation when it happens parse error is displayed.

  6. mikeholmes1
    Member
    Posted 4 months ago #

    On mine it looks like this has something to do with request throttling from Amazon's API. If I right click on the error and inspect element it shows this hidden message:

    <!-- APPIP ERROR:nodata[<!-- HIDDEN APIP ERROR: RequestThrottled: Request from A3E915KZASEHUZ is throttled.-->

    I'm not a programmer. Could someone point me in the right direction on resources to maybe call the info once per day and then store the results without using Amazon's API for every request?

  7. Doremdou
    Member
    Posted 4 months ago #

    Hello, nice plugin :)
    But I've got the same problem here and same error:

    Warning: Invalid argument supplied for foreach()

    it happens when using the two types of shortcodes in your notice
    thanks for your help

  8. mattmatt88
    Member
    Posted 3 months ago #

    Got the same error, bot only with 10-20% of the products.
    All of the product are from the same category (in my case kindle books), but 10-20% doesn't display, they only show this error:

    ]-->
    Warning: Invalid argument supplied for foreach() in /kunden/381825_1100/webseiten/kindofbook/wp-content/plugins/amazon-product-in-a-post-plugin/inc/amazon-product-in-a-post-shortcodes.php on line 224

    Here's an example product that doesn't work for me:
    http://www.amazon.com/The-Magic-Kingdom-Landover-Volume-ebook/dp/B002LA0A66%3FSubscriptionId%3D1GVBN9WWNVXC5DBPE502%26tag%3Dkiq-pw-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB002LA0A66

    Hope you can help quick!

    Thank you

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.