[Resolved] Media Library not loading

Home Forums Support [Resolved] Media Library not loading

Home Forums Support Media Library not loading

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #183926
    Paul

    Hi Tom,

    After updating WP core to 4.4.2 and manually updating the GP Premium plugin to the latest version and entering my license key, all of a sudden my Media Library will not load. All I get is the spinner, but no images or other media items will load.

    I noticed you posted this as an issue at https://github.com/gambitph/WP-OTF-Regenerate-Thumbnails/issues/11 — I don’t know if this is related to GeneratePress or GP Premium, but do you have any ideas as to why the Media Library wouldn’t be loading?

    The reason I discovered this issue is because after the manual update of GP Premium, my custom-positioned header logo disappeared from all my pages. I checked Customizer > Site Identity > Logo and noticed to logo image was set. When I went to set my Logo, the Media Library wouldn’t load.

    #183935
    Tom
    Lead Developer
    Lead Developer

    Hi Paul,

    Good research, the automatic image resizer doesn’t play nicely on a small percentage of hosts.

    You can disable it with this snippet: https://gist.github.com/generatepress/fcbb9065a958e6e0f9ef

    Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/

    Let me know if you need more info ๐Ÿ™‚

    #183952
    Paul

    Hi Tom,

    Thanks for pointing me to define( 'GP_IMAGE_RESIZER', true ); , but where do I put the code?

    In the meantime, I should let you know what was preventing the grid view of the Media Library… two bits of code that I had added to my child theme’s functions.php file earlier in the day:

    
    <!-- Strips More tag when Excerpt is used on post -->
    <?php
    add_filter('generate_more_tag','generate_disable_more_tag');
    function generate_disable_more_tag()
    {
          return false;
    }
    ?>
    <!-- End More tag -->
    <!-- Add Previous Next buttons to bottom of Pages -->
    <?php add_action( 'generate_after_content','generate_add_page_next_prev' );
    function generate_add_page_next_prev()
    {
    
          if ( ! is_page() )
                return;
    ?>
    <div class="prev-next">
    <?php 
    previous_post_link( '<div class="nav-previous prev-next-button"><span class="prev" title="' . __('Previous','generate') . '">
    
    %link</span></div>', 'Previous' );
    
    next_post_link( '<div class="nav-next prev-next-button"><span class="next" title="' . __('Next','generate') . '">
    
    %link</span></div>', 'Next' );
    ?>
    </div>
    <?php
    } ?>
    <!-- End Previous Next buttons -->
    

    Once I removed them, I was able to once again properly access the Media Library. However, I still do want to 1) strip the ‘More’ tag from posts when Excerpts are used and 2) add Previous and Next links at the bottom on PAGES.

    Once I hear back from you as to where I need to add that bit of code you mentioned in your previous comment, I will add it and then add the code above back to functions.php to see if that helps.

    If you see anything wrong with the way I’m handling the More tag and the Previous/Next on Pages, or with the PHP in general please let me know. You can find my entire functions.php file here: http://pastebin.com/UE50THds

    #183971
    Tom
    Lead Developer
    Lead Developer

    You can add that line into the same functions.php file at the bottom.

    Try removing all of the HTML comments from the file (<!-- whatever -- >).

    #184123
    Paul

    Thanks Tom, worked perfectly!

    #184125
    Tom
    Lead Developer
    Lead Developer

    You’re welcome ๐Ÿ™‚

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.