• Resolved psilas_admin

    (@psilas_admin)


    Hi, when using shortcode in a widget, [amazon asin=ASINHERE&template=thumbnail&chan=default], i get an internal error when trying to view the page that is using that particular widget with that code. if i remove the code, the page is viewable.

    This started happening Friday. I have been using this shortcode for several months now without an issue until now. I made no changes to my site, installed no other plugins, between the time it worked and stopped working.

    Thanks
    Peter

    http://ww.wp.xz.cn/plugins/amazon-link/

Viewing 15 replies - 1 through 15 (of 24 total)
  • Plugin Author paulstuttard

    (@paulstuttard)

    Hi,

    WordPress has built in automatic updates now, might have triggered something to get updated without you knowing?

    The only other thing that might have changed is what Amazon is returning from the AWS request, what ASIN are you using I’ll try and recreate the problem.

    Paul

    Thread Starter psilas_admin

    (@psilas_admin)

    Hi, thanks for the quick reply. This happens with any ASIN. I want to mention that the plugin is working in terms of the shortcode if directly in a page or post. The internal error while trying to view a page or post is only occurring if the page or post includes a widget that has the shortcode. You could use B00ETRARLC for the ASIN.

    Peter

    Plugin Author paulstuttard

    (@paulstuttard)

    Hi,

    Very odd, do you know what the actual error is?

    You could do a simpler template e.g.:

    %TITLE% - %ARTIST%
    (No links or javascript)

    If that doesn’t work use completely static data e.g:

    [amazon asin=B00ETRARLC&title=title test&artist=artist test&template=simple]

    For the template above (assuming it was called simple).

    Try disabling some other aspects of the plugin if you have them enabled e.g:

    Turn off localisation
    Turn off the cache
    Turn off User Affiliate IDs

    Let me know if any of the above makes a difference.

    The only thing I can think off is that your running out of memory, and for some reason using it in a widget takes more grunt.

    Paul

    Plugin Author paulstuttard

    (@paulstuttard)

    Hi,

    Forgot to ask is it a standard Text Widget that you are putting the shortcode in?

    Paul

    Thread Starter psilas_admin

    (@psilas_admin)

    Hi, yes it is a standard text widget.

    The error is that, when viewing the page that has this widget in a browser, it returns an internal server error. The entire page. As soon as I remove the code from the text widget, the page works in a browser.

    I had a similar issue once and it was caused by a plugin called Stealth Publish – it turned out that it was no longer supported and so the entire page that was associated with the plugin returned an internal server error. But your plugin seems up to date so I never suspected it until hours of troubleshooting narrowed it down.

    I will try those suggestions and get back to you.

    Thanks,
    Peter

    Plugin Author paulstuttard

    (@paulstuttard)

    If you look in your web server error log, shortly after viewing the page, it should give you more details about the actual fault that is being triggered.

    Cheers,

    Paul

    Thread Starter psilas_admin

    (@psilas_admin)

    Ok, thanks. I had set up error log tracking and plan to call my hosting provider in the morning to see what turned up. That is a great idea to do this shortly after, I will make sure to trigger it. Then I will also troubleshoot the other ideas. Thanks for being so helpful and invested in a positive experience for me. It’s a free plugin and I appreciate it.

    Peter Silas

    Thread Starter psilas_admin

    (@psilas_admin)

    Hi,

    Turning off those options did not seem to make a difference.

    The simple template worked, however as soon as I tried to pull an image in (%thumb% or %image%) the error came back. My goal is to display an image for a kindle book in my top widget for advertising purposes.

    Results from my hosting provider: I called and they took a look at the error messages. After looking into this, Godaddy states this plugin isn’t optimized correctly and it is causing issues on the server backend and throwing flags, so it’s blocked for any site (which is strange because it works aside from pulling an image into a plugin). They state this plugin is a widespread issue on their servers.

    Thanks,
    Peter Silas

    Plugin Author paulstuttard

    (@paulstuttard)

    Hi,

    Thanks for chasing that down, ‘Not optimized correctly’ not sure what that means, but doesn’t sound good!

    Don’t suppose you have a contact at Godaddy I could get in touch with to see how I go about sorting this problem?

    I suspect the problem is when it tries to fetch the data from the Amazon Web Service.

    I have an enhancement that I have been working on that might improve matters on that front, would be useful if you could try it out?

    A couple of other things to try:

    If you put the image url in manually into the shortcode e.g. add somehting like: thumb=http://path.to.amazon.image. Do you get the error?

    Does the search utility work on the post/page edit screen as this also does the AWS lookup?

    Cheers for your assistance,

    Paul

    Thread Starter psilas_admin

    (@psilas_admin)

    I don’t have a specific contact at GoDaddy. I just talked to the average level help desk rep (customer assistance) for about 45 min. and got him to talk to his admin level rep. It is pretty much whoever is available, and their contact number is on their website.

    I am happy to help, I have a vested interest in making this plugin work in the way I need. Which shortcode should I put that string into? [amazon asin=B00ETRARLC&title=title test&artist=artist test&template=simple] or [amazon asin=B003UV98BI&template=thumbnail&chan=default]?

    Thanks,
    Peter

    Plugin Author paulstuttard

    (@paulstuttard)

    Hi,

    Let’s keep it simple so we know which bits of the plugin we are triggering:

    Update the simple template to be:

    %TITLE% : %ARTIST% <img src="%THUMB%">

    Try the first shortcode as is to see if it fails then try, adding the ‘thumb’ part:

    [amazon asin=B00ETRARLC&title=title test&artist=artist test&template=simple&thumb=http://ecx.images-amazon.com/images/I/41kzTb9pQ8L._SL160_.jpg]

    See if either work.

    By the way do you have the Amazon Link cache enabled?

    Paul

    Thread Starter psilas_admin

    (@psilas_admin)

    Hi, it fails in both scenarios. I didn’t have/never had it enabled, and assumed not to as you had mentioned to try disabling it.

    Peter

    Plugin Author paulstuttard

    (@paulstuttard)

    Hmmm,

    Something specific to do with the THUMB keyword, try changing the template to:

    %TITLE% : %ARTIST% <img src="%TEXT1%">

    And the shortcode to:

    [amazon asin=B00ETRARLC&title=title test&artist=artist test&template=simple&text1=http://ecx.images-amazon.com/images/I/41kzTb9pQ8L._SL160_.jpg]

    If this works then try some hacking:

    In the plugin file wp-content/plugins/amazon-link/include/amazonSearch.php:

    comment out or just delete the two lines starting at line 79:

    i.e. Change to:

    // add_filter('amazon_link_template_get_image', array($this, 'get_images_filter'), 12, 6);
    // add_filter('amazon_link_template_get_thumb', array($this, 'get_images_filter'), 12, 6);

    See if that makes a difference to your original problem.

    Paul

    Thread Starter psilas_admin

    (@psilas_admin)

    Hi, that allows for the image to display without an error on the page. But it only displays an image, not a link. FYI, commenting out the above didn’t make any difference in terms of what was displayed.

    A second concern is, where do I get the text1 for each asin? (I would have to find and add this, along with the asin, to each shortcode?)

    Thanks for helping with the progress,
    Peter

    Plugin Author paulstuttard

    (@paulstuttard)

    Hi,

    Just to confirm going back to the original template and shortcode (using the THUMB keyword) as detailed in post above . The Amazon Link still does not display, and there is an Internal Server Error, even with those lines commented out?

    I’m not proposing we use the TEXT1 keyword for the final solution, just trying to diagnose which bits of the plugin are failing. So please don’t update any other shortcodes yet!

    Is it possible for you to post a link to the problem page/post on your site?

    Paul

Viewing 15 replies - 1 through 15 (of 24 total)

The topic ‘internal error using shortcode in widget’ is closed to new replies.