• Resolved maysammu

    (@maysammu)


    New to the plugin. I have created a post with amazon links, but I do not see the affiliate tag added automatically. The button functionality seems to work however. When I ran the unit tests every test fails with errors similar to below errors. WordPress version is 5.5.1.

    Any help is appreciated.

    Failed AmazonAutoLinks_UnitTest_FrameworkUtility
    500: error .wp-die-message { display: none; } Fatal error: Uncaught Error: Wrong parameters for Exception([string $message [, long $code [, Throwable $previous = NULL]]])in /var/www/wordpress/wp-content/plugins/amazon-auto-links/include/core/component/test/event/ajax/AmazonAutoLinks_Test_Event_Ajax_Tests.php on line 80Call stack:Exception::__construct()wp-content/plugins/amazon-auto-links/include/core/component/test/event/ajax/AmazonAutoLinks_Test_Event_Ajax_Tests.php:80AmazonAutoLinks_Test_Event_Ajax_Tests::_getResponse()wp-content/plugins/amazon-auto-links/include/core/_common/event/ajax/AmazonAutoLinks_AjaxEvent_Base.php:82AmazonAutoLinks_AjaxEvent_Base::_doAction()wp-content/plugins/amazon-auto-links/include/core/_common/event/wpcron/AmazonAutoLinks_Event___Action_Base.php:72AmazonAutoLinks_Event___Action_Base::replyToDoAction()wp-includes/class-wp-hook.php:287WP_Hook::apply_filters()wp-includes/class-wp-hook.php:311WP_Hook::do_action()wp-includes/plugin.php:478do_action()wp-admin/admin-ajax.php:176Query MonitorThere has been a critical error on your website.Learn more about debugging in WordPress.File: var/www/wordpress/wp-content/plugins/amazon-auto-links/include/core/component/test/run/tests/admin_page_framework/AmazonAutoLinks_UnitTest_FrameworkUtility.php

    Failed AmazonAutoLinks_UnitTest_FrameworkUtility_Transient
    500: error .wp-die-message { display: none; } Fatal error: Uncaught Error: Wrong parameters for Exception([string $message [, long $code [, Throwable $previous = NULL]]])in /var/www/wordpress/wp-content/plugins/amazon-auto-links/include/core/component/test/event/ajax/AmazonAutoLinks_Test_Event_Ajax_Tests.php on line 80Call stack:Exception::__construct()wp-content/plugins/amazon-auto-links/include/core/component/test/event/ajax/AmazonAutoLinks_Test_Event_Ajax_Tests.php:80AmazonAutoLinks_Test_Event_Ajax_Tests::_getResponse()wp-content/plugins/amazon-auto-links/include/core/_common/event/ajax/AmazonAutoLinks_AjaxEvent_Base.php:82AmazonAutoLinks_AjaxEvent_Base::_doAction()wp-content/plugins/amazon-auto-links/include/core/_common/event/wpcron/AmazonAutoLinks_Event___Action_Base.php:72AmazonAutoLinks_Event___Action_Base::replyToDoAction()wp-includes/class-wp-hook.php:287WP_Hook::apply_filters()wp-includes/class-wp-hook.php:311WP_Hook::do_action()wp-includes/plugin.php:478do_action()wp-admin/admin-ajax.php:176Query MonitorThere has been a critical error on your website.Learn more about debugging in WordPress.File: var/www/wordpress/wp-content/plugins/amazon-auto-links/include/core/component/test/run/tests/admin_page_framework/AmazonAutoLinks_UnitTest_FrameworkUtility_Transient.php

    The page I need help with: [log in to see the link]

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author miunosoft

    (@miunosoft)

    Hi,

    If you are using a shortcode, you need to added a default Associate tag via Dashboard -> Amazon Auto Links -> Settings -> Default.

    … do_action()wp-admin/admin-ajax.php:176Query MonitorThere has been a critical error on your website.Learn more …

    Looks like a conflict with Query Monitor. Try disabling it temporarily while you test.

    Also, post relevant error log found in debug.log under the wp-content directory if you are enabling the site debug mode.

    Also, I’d like to know your PHP version which can be found via Dashboard -> Tools -> Site Health -> Info -> Server.

    Thread Starter maysammu

    (@maysammu)

    Thank you for the response.
    I can confirm that “Associate ID” in setting->default tab is populated.
    PHP version is: 7.2.20-1+ubuntu16.04.1+deb.sury.org+1 (Supports 64bit values)

    Here is what I see in debug.log:

    [10-Nov-2020 01:53:07 UTC] PHP Fatal error: Uncaught Error: Wrong parameters for Exception([string $message [, long $code [, Throwable $previous = NULL]]]) in /var/www/wordpress/wp-content/plugins/amazon-auto-links/include/core/component/test/event/ajax/AmazonAutoLinks_Test_Event_Ajax_Tests.php:80
    Stack trace:
    #0 /var/www/wordpress/wp-content/plugins/amazon-auto-links/include/core/component/test/event/ajax/AmazonAutoLinks_Test_Event_Ajax_Tests.php(80): Exception->__construct(Array)
    #1 /var/www/wordpress/wp-content/plugins/amazon-auto-links/include/core/_common/event/ajax/AmazonAutoLinks_AjaxEvent_Base.php(82): AmazonAutoLinks_Test_Event_Ajax_Tests->_getResponse(Array)
    #2 /var/www/wordpress/wp-content/plugins/amazon-auto-links/include/core/_common/event/wpcron/AmazonAutoLinks_Event___Action_Base.php(72): AmazonAutoLinks_AjaxEvent_Base->_doAction(”)
    #3 /var/www/wordpress/wp-includes/class-wp-hook.php(287): AmazonAutoLinks_Event___Action_Base->replyToDoAction(”)
    #4 /var/www/wordpress/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(”, Array)
    in /var/www/wordpress/wp-content/plugins/amazon-auto-links/include/core/component/test/event/ajax/AmazonAutoLinks_Test_Event_Ajax_Tests.php on line 80
    [10-Nov-2020 01:53:08 UTC] PHP Notice: Undefined variable: write in /var/www/wordpress/wp-content/db.php on line 588
    [10-Nov-2020 01:53:08 UTC] PHP Notice: Undefined variable: write in /var/www/wordpress/wp-content/db.php on line 625
    [10-Nov-2020 01:53:08 UTC] PHP Fatal error: Uncaught Error: Wrong parameters for Exception([string $message [, long $code [, Throwable $previous = NULL]]]) in /var/www/wordpress/wp-content/plugins/amazon-auto-links/include/core/component/test/event/ajax/AmazonAutoLinks_Test_Event_Ajax_Tests.php:80
    Stack trace:
    #0 /var/www/wordpress/wp-content/plugins/amazon-auto-links/include/core/component/test/event/ajax/AmazonAutoLinks_Test_Event_Ajax_Tests.php(80): Exception->__construct(Array)
    #1 /var/www/wordpress/wp-content/plugins/amazon-auto-links/include/core/_common/event/ajax/AmazonAutoLinks_AjaxEvent_Base.php(82): AmazonAutoLinks_Test_Event_Ajax_Tests->_getResponse(Array)
    #2 /var/www/wordpress/wp-content/plugins/amazon-auto-links/include/core/_common/event/wpcron/AmazonAutoLinks_Event___Action_Base.php(72): AmazonAutoLinks_AjaxEvent_Base->_doAction(”)
    #3 /var/www/wordpress/wp-includes/class-wp-hook.php(287): AmazonAutoLinks_Event___Action_Base->replyToDoAction(”)
    #4 /var/www/wordpress/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(”, Array)
    in /var/www/wordpress/wp-content/plugins/amazon-auto-links/include/core/component/test/event/ajax/AmazonAutoLinks_Test_Event_Ajax_Tests.php on line 80

    Thread Starter maysammu

    (@maysammu)

    also, I did disable query monitor plugin before I ran the test

    Plugin Author miunosoft

    (@miunosoft)

    I see.

    I’ve uploaded the development version 4.4.0b02 which should fix the test error you reported. So please try that. You may get another error however. In that case post the error message.

    As for the associate tag issue addressed initially, I checked your site and the product links and they seem fine to me. If a product URL contains a string tag={your associate tag}, it should be okay. What makes you say “but I do not see the affiliate tag added automatically.”?

    Thread Starter maysammu

    (@maysammu)

    Ok I will install and test, thank you again.

    On the original issue, looks like my editorial team went in and manually updated all the links by going to amazon affiliate page and generating links. So you can see, I put the original link back on the first item on the list “Gotta Go Flamingo”. You can see it points to “https://www.amazon.com/Little-Live-Pets-Famingo-Single/dp/B084NWRCGY/”

    Thread Starter maysammu

    (@maysammu)

    I ran the first test “admin_page_framework” and the following shows under results:

    Failed
    The file does not exist:

    File: var/www/wordpress/wp-content/plugins/amazon-auto-links/include/core/component/test/run/tests/admin_page_framework/AmazonAutoLinks_UnitTest_FrameworkUtility.php

    Line: 62

    Failed
    The file does not exist:

    File: var/www/wordpress/wp-content/plugins/amazon-auto-links/include/core/component/test/run/tests/admin_page_framework/AmazonAutoLinks_UnitTest_FrameworkUtility_Transient.php

    Line: 62

    Failed
    The file does not exist:

    File: var/www/wordpress/wp-content/plugins/amazon-auto-links/include/core/component/test/run/tests/http/bestsellers/Test_AmazonAutoLinks_HTTPClient_BestSellers.php

    Line: 62

    Plugin Author miunosoft

    (@miunosoft)

    I checked your site again and it seems the buttons are produced by Amazon Auto Links but the images, the titles, and their links are not of Amazon Auto Links.

    How are you displaying the buttons?

    • This reply was modified 4 years, 3 months ago by miunosoft.
    Plugin Author miunosoft

    (@miunosoft)

    As for the errors on tests mentioned in your last reply, they say test files are missing. Did you install Amazon Auto Links v4.4.0b02?

    Thread Starter maysammu

    (@maysammu)

    We are using the button shortcut. But for links we just paste the link. I understand copying the links directly should work and the plug-in would append the tags automatically right?
    I downloaded and uploaded the zip file.
    I will check again tomorrow. The unit tests are less critical if the link functionality is working.
    Thank you

    Plugin Author miunosoft

    (@miunosoft)

    I see. The plugin only insert a user-set Amazon Associate tag to Amazon product links to plugin generated outputs such as by unit, the shortcode and widgets.

    In your case, you are manually posting images and titles. In that case, you want to enable the Link Converter option via Dashboard -> Amazon Auto Links -> Settings -> Converter -> Convert Links. Select On for the Enable field and check Post content for the Applies to field.

    Hope this helps.

    By the way, for your information, Amazon Auto Links allows you to generate and insert product outputs by just pasting a product URL in the editor like “https://www.amazon.com/Little-Live-Pets-Famingo-Single/dp/B084NWRCGY/”.

    Thread Starter maysammu

    (@maysammu)

    Thank you very much for jumping on this and helping, I see it working. You rule!

    Plugin Author miunosoft

    (@miunosoft)

    You are welcome!

    Would be appreciated if you could take a few minutes to write a review on the plugin.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Unit Test Errors’ is closed to new replies.