• Resolved nort99

    (@nort99)


    Hi,

    After upgrading to WP 4.9.2 we’re getting an ajax error when we click “Update” within MLA bulk edit. This error only happens on our 1and1 servers and not on my local windows development machine.

    I’ve included the request/response data below. This prevents the bulk updating from completing. Any help much appreciated.

    Thanks

    Mark

    (Note. URLs inaccessible from outside our office)

    Request headers:

    Accept:application/json, text/javascript, */*; q=0.01
    Accept-Encoding:gzip, deflate
    Accept-Language:en-GB,en;q=0.9
    Cache-Control:no-cache
    Connection:keep-alive
    Content-Length:434
    Content-Type:application/x-www-form-urlencoded; charset=UTF-8
    Cookie:wordpress_314fadd3e10cd764d3f4d660f951ed89=admin%7C1516532342%7ChoK9RmBxarT5W8fMFIFv4eWDfBHhZapaKwsjDuMDLsx%7C2683b9f1be0fd2d15081449c6318bc9ec98b93a808d986a17c8d533759df517a; __cfduid=df6ec4e500da8d8e1ec96172cd08119271516206631; __utmz=61591102.1516206633.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utmz=22942136.1516227053.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=61591102.1473607748.1516206633.1516206633.1516227056.2; coco-social-bar=x; PHPSESSID=kkcboqnkelu5d1hv57e08r4up1; __utma=22942136.658759493.1516227053.1516227053.1516359503.2; __utmc=22942136; __utmb=22942136.1.10.1516359503; wordpress_test_cookie=WP+Cookie+check; wordpress_logged_in_314fadd3e10cd764d3f4d660f951ed89=admin%7C1516532342%7ChoK9RmBxarT5W8fMFIFv4eWDfBHhZapaKwsjDuMDLsx%7C1b07250fff0b279e6c2d48228727c13c0e651d56ea5d53b781fdaf62c5c44dd0; wp-settings-1=libraryContent%3Dbrowse%26imgsize%3Dfull%26wplink%3D0%26editor%3Dhtml%26hidetb%3D1%26mfold%3Do%26posts_list_mode%3Dlist; wp-settings-time-1=1516359545
    Host:review.cocoweddingvenues.co.uk
    Origin:https://review.cocoweddingvenues.co.uk
    Pragma:no-cache
    Referer:https://review.cocoweddingvenues.co.uk/wp-admin/upload.php?page=mla-menu
    User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36
    X-Requested-With:XMLHttpRequest

    Request data:

    action=mla-inline-edit-scripts&mla_admin_nonce=2e8005c548&bulk_action=bulk_edit&cb_offset=0&cb_count=1&cb_attachment%5B%5D=69309&tax_input%5Battachment_category%5D%5B%5D=0&tax_action%5Battachment_category%5D=add&tax_input%5Battachment_tag%5D=&tax_action%5Battachment_tag%5D=add&post_title=&post_excerpt=&post_content=Test&image_alt=&post_parent=&post_author=-1&comment_status=-1&ping_status=-1&page=mla-menu&screen=media_page_mla-menu

    Response:
    0

    Response Status:
    400 Bad Request

    • This topic was modified 7 years, 1 month ago by nort99.

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for your report, and thanks for including the request details; very helpful.

    I ran a quick test on my local development server and on one of my remote servers. Of course, the bulk update worked fine for me. I compared my network log with the details you posted and I can see no difference in the request headers or body. You request looks valid and should have worked.

    It would be helpful if you could activate some MLA debugging logic and re-run your test. If that’s possible:

    1. Navigate to the Settings/Media Library Assistant Debug tab.
    2. Scroll down to the “MLA Reporting” text box and enter “3”. This will turn on MLA debug logging for AJAX requests such as Bulk Edit.
    3. Click the Save Changes button to record your new setting.
    4. Optionally, scroll to the bottom of the screen and click “Reset” to clear the error log. You may not want to do this depending on how you manage your error log.

    Once that’s done you can run one or more Bulk Edit tests. Then, go back to the Debug screen and:

    1. Enter “0” in the MLA Reporting text box to turn debug logic off.
    2. Scroll to the bottom and click “Download” to get the log content in a text file.

    You should see messages in the log like these:

    [22-Jan-2018 19:47:05 UTC] 591 MLACore::mla_plugins_loaded_action() MLA 2.70 (20180115) mla_debug_level 0x3
    
    [22-Jan-2018 19:47:05 UTC] 58 MLA_Ajax::mla_admin_init_action( false ) $_REQUEST = array (
    

    You can post the messages in this topic. You can also email me the information if that’s better for you. If you give me your contact information and I will send you an email address you can use to send the information to me. You can use the Contact Us page at our web site:

    Fair Trade Judaica/Contact Us

    I look forward to seeing the information or hearing from you. Thanks for your help and your interest in the plugin.

    Thread Starter nort99

    (@nort99)

    Thanks for your help David. We got there in the end!

    The error was not related to MLA but in fact was related to W3 Total Cache. The list of active plugins from the wp_options table had been cached in the object cache when MLA was deactivated. The cache was not correctly updated when the plugin was reactivated. As a result, when the ajax call was received by the server, the MLA plugin wasn’t loaded and caused the ajax error.

    The solution was to disable the object cache, enable the plugin, then re-enable the object cache. Ultimately I think there is an issue with the way the cache stores the wp_options, but that’s for another day!

    Plugin Author David Lingren

    (@dglingren)

    Thanks for working with me offline to resolve this issue. I am marking it resolved, but please post an update if you have anything additional to report regarding it or I can be of some other assistance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Ajax error after upgrade to WP 4.9.2’ is closed to new replies.