• Resolved DrWiresofNC

    (@drwiresofnc)


    my fix:
    replace code in common.php around line 950
    from:
    $uploads_dir = is_multisite() ? ‘/files/’ : ‘/wp-content/’;
    to:
    $content_dir = substr(content_url(),strlen(site_url())).’/’;
    $uploads_dir = is_multisite() ? ‘/files/’ : $content_dir;

    WordPress Version:4.7
    Envira Lite Version 1.5.5.1
    Example URL demonstrating the issue: not remotely viewable, on local development site
    Exact steps taken to reproduce the issue (enough for anyone with Envira Lite installed to be able to take those steps and see the issue for themselves) :

    add these lines to wp-config.php;
    define( ‘WP_SITEURL’, ‘http://’ . $_SERVER[‘HTTP_HOST’] . ‘/’ );
    define( ‘WP_CONTENT_FOLDERNAME’, ‘your new content name’ );
    define( ‘WP_CONTENT_DIR’, ABSPATH . WP_CONTENT_FOLDERNAME );
    define( ‘WP_CONTENT_URL’, WP_SITEURL . WP_CONTENT_FOLDERNAME );

    What the error is:
    Envira: Error occured resizing image (these messages are only displayed to logged in WordPress users):
    Error: The dimensions of the original image could not be retrieved for cropping.
    Image: http://ncv2.albert.einstein/ncv/uploads/galleries/Coffee & Conversation/20160624_150213-1.jpeg
    Args: array (
    ‘position’ => ‘c’,
    ‘width’ => 640,
    ‘height’ => 480,
    ‘quality’ => 100,
    ‘retina’ => false,
    )

    What you expect to see: the image

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi @drwiresofnc 🙂

    I will certainly forward this on to our developer for review, thanks for sharing this code with us! 🙂

    Hi @drwiresofnc 🙂

    I’m David Bisset, one of the developers at Envira. Wanted to reach out to you to determine the exact steps to reproduce the error you saw – we did update the site regarding changing the wp-contents folder but couldn’t (as of yet) reproduce the error you reported. If you can bullet point the steps, we can hopefully confirm things.

    Thanks!

    Thread Starter DrWiresofNC

    (@drwiresofnc)

    I’m sorry you found the original post unclear.

    (1) rename the folder wp-content to my_new_content_folder_name
    (2) add this to wp-config:
    define( ‘WP_SITEURL’, ‘http://’ . $_SERVER[‘HTTP_HOST’] . ‘/’ );
    define( ‘WP_CONTENT_FOLDERNAME’, ‘my_new_content_folder_name’ );
    define( ‘WP_CONTENT_DIR’, ABSPATH . WP_CONTENT_FOLDERNAME );
    define( ‘WP_CONTENT_URL’, WP_SITEURL . WP_CONTENT_FOLDERNAME );

    each image in any gallery shows an error similar to:

    Error: The dimensions of the original image could not be retrieved for cropping.
    Image: http://ncv2.albert.einstein/my_new_content_folder_name/uploads/galleries/Coffee & Conversation/20160624_150213-1.jpeg
    Args: array (
    ‘position’ => ‘c’,
    ‘width’ => 640,
    ‘height’ => 480,
    ‘quality’ => 100,
    ‘retina’ => false,
    )

    Hi,

    The post wasn’t unclear, it’s just that we currently can’t reproduce the issue. So can you please open up a support ticket with us here:

    http://enviragallery.com/contact/

    and include the wp-admin access to your site along with FTP information? That way we can take a look with the goal of trying to resolve this more quickly.

    Thank you!

    Thread Starter DrWiresofNC

    (@drwiresofnc)

    David,
    The site is development and local. You cannot access it even if I was willing. The code is obvious. Your coder has hard coded wp-content in this line:

    $uploads_dir = is_multisite() ? ‘/files/’ : ‘/wp-content/’;

    This can never work if the directory name is not wp-content on a single site.
    I believe the original line # to be 945 in /includes/global/common.php

    I am using envira-lite, now 1.5.5.1, on a single site. 1.5.6 exhibits the same issue and also changed the look of the gallery therefore I am still using 1.5.5.1.

    Brian

    Brian,

    A big thank you for bringing this to our attention. We are already in the process of addressing this and should have this included in an update soon. We’ll make sure to include it in the changelogs.

    Just FYI: that line of code isn’t hit on all envira galleries, so I wanted to personally confirm your issue. Thanks for letting me know it wasn’t something i could access.

    David

    Has this been fixed? I’m having the same issue with Envira Gallery Version 1.5.9.9. Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Envira Gallery does not handle content folder change’ is closed to new replies.