Support » Plugin: Media Library Assistant » Assistant Screen Pagination Error

  • Resolved rogerlos

    (@rogerlos)


    The pagination on the Assistant page (i.e., the result of calling MLA_List_Table->display_tablenav() ), does not support sites where WordPress is installed in a sub-directory (for example, within a directory named ‘core’ off of the site root). I believe the Assistant pagination may also fail on multisite installs because of this, but have not tested.

    At line 1363 of class-mla-main.php the location of wp-admin is hard-coded:

    
    $_SERVER['REQUEST_URI'] = '/wp-admin/upload.php?page=mla-menu';
    

    I replaced the line above with the following code:

    
    $blog_id = is_multisite() ? get_current_blog_id() : null;
    $admin = parse_url( get_admin_url( $blog_id, 'upload.php' ) );
    $_SERVER['REQUEST_URI'] = $admin['path'] . '?page=mla-menu';
    

    This properly returns /core/wp-admin/upload.php?page=mla-menu for our hypothetical sub-directory install. (Have not tested the replacement code on a multisite install.)

Viewing 4 replies - 1 through 4 (of 4 total)
  • I only noticed the pagination, but of course any other function on the Assistant screen which relies on that value will not work.

    Thanks for your continued efforts with the plugin.

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your report and especially for taking the time to find the cause and suggest a fix. You have identified a defect I introduced in MLA v2.72.

    I have uploaded a new MLA Development Version dated 20180426 that corrects the problem. It works for my multisite test installation and should work for your subdirectory installation.

    To get the Development Version you can follow the instructions in this earlier topic:

    PHP Warning on media upload with Polylang

    It would be great if you can install the Development Version and let me know how it works for you. Thanks for alerting me to this MLA defect!

    Nice and succinct and works on my sub-directory install.

    Plugin Author David Lingren

    (@dglingren)

    I have released MLA version 2.73, which contains the fix for this topic.

    I am marking the topic resolved, but please update it if you have any problems with the new version.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Assistant Screen Pagination Error’ is closed to new replies.