• Resolved Gary Darling

    (@garydarling)


    Just installed this on a fresh WP install, when I try to smush a single image from the Media Library I get the following error:

    Could not find /home/content/44/9381844/html/wp-content/uploads/

    That path should be just wp-content/uploads/

    Then, when I go to Settings> Media and try to Regenerate Thumbnails (I use the Simple Image Sizes plugin), it freezes at the time calculation. Click Save Changes in the middle of that frozen state, even though I shouldn’t be able to, and I get the following Warnings:

    Warning: trim() expects parameter 1 to be string, array given in /home/content/44/9381844/html/wp-admin/options.php on line 147
    
    Warning: trim() expects parameter 1 to be string, array given in /home/content/44/9381844/html/wp-admin/options.php on line 147
    
    Warning: Cannot modify header information - headers already sent by (output started at /home/content/44/9381844/html/wp-admin/options.php:147) in /home/content/44/9381844/html/wp-includes/pluggable.php on line 876

    After I disable Smush.it the latter process works just fine.

    http://wordpress.org/extend/plugins/wp-smushit/

Viewing 15 replies - 16 through 30 (of 31 total)
  • Plugin Author Aaron Edwards

    (@uglyrobot)

    Ok guys, as we can’t seem to reproduce this error I need your help debugging. Can you add this to line 451 of the main plugin file right before the foreach():
    var_dump($base_dir, $meta['sizes']);die();
    And tell me what it outputs when you smush that image that gives you errors.

    From tracking the code it appears that you may have meta stored in your db for image sizes that does not actually have filenames attached to it.

    Christian

    (@christiankramer)

    I have got the same error.

    The Smush.it column in Media Library shows the absolute path to the image and it looks like this: /home/www/wordpress/wp-content/blogs.dir/15/files/http://domain.com/files/2013/07/Pilgerbilder FL-1373450289.jpg

    You see, there is the domain in it: http://domain.com/
    And the “files” folder is duplicated.
    So I searched in the WPMU settings for http://domain.com/files/ and found it in the Fileupload Url. (I am using WPMU 3.5.2)
    I deleted it, because this could be the reason of this pasting into the path. But no effect.
    The path is still the same.

    Where could be the error?

    Thanks in advance,
    Christian

    I am having the same issue, tried to upload a new file and then smush it. Could not fin wp-content/uploads. Running 3.5.1

    All, just took over support of the plugin code from the previous developer. Looking into the many reported issues.

    Two big issues are the warnings on the Settings > Media form save. And the issue of not being able to find the image. This is usually due to either the WP installation being non-standard as in moving the WP_CONTENT_DIR or some other issue related to 3.5.x where the expected uploads path is not where the plugin thinks it should be. I know in 3.5 the Multisite paths changes from blogs.dir to something else. I think the plugin does not know this.

    Regardless, I’m not sure on the previous developer’s thinking that only files within the uploads path are allowed. Frankly any attachment image in the system should be processable.

    Looking for beta testers for the next version. Any takers?

    Looking for beta testers for the next version. Any takers?

    This error is starting to get annoying, and I like being helpful. You can count with me.

    Hey SEOmachine.

    We should be releasing later today, but if you want an early copy to beta test with please use our contact form:

    http://premium.wpmudev.org/contact

    Just quote this thread, we’ll then email a copy.

    Otherwise, as mentioned, we’ll be releasing hopefully later today (unless we do find more issues that need fixing first). πŸ™‚

    Thanks. I used the contact form, just in case. πŸ˜‰

    edit: just noticed the version has gone live, and this issue has been fixed. Good job guys!

    Mike

    (@michael-copestake)

    Hi @seomachine

    That’s great thanks for the feedback πŸ™‚

    andytela

    (@andymoonshine)

    Hi

    Im using 1.6.5.2 but I still get this error “must be within the website directory “
    My wordpress install is in /wp whereas my uploads are in /content/uploads

    /var/www/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04.png must be within the website directory (/var/www/wp/)

    Cheers
    Andy

    @andymoonshine,

    Go to Settings > Media then in the Smush.it section set the checkbox to enable debug output. Then try running the bulk smash.it. This will show some debug information. Please post some of that information that back to here. Thanks. Will help us see how your site it setup.

    Basically, the plugin attempts to determine and make sure the image you are trying to Smush is within your site’s directory tree. I suspect since your WP is within one folder and you have moved the content to a to a different folder we need to allow for that. Can you also confirm how you have this setup. Are you setting the WP_CONTENT_DIR like is suggested here http://codex.wordpress.org/Editing_wp-config.php#Moving_wp-content_folder.

    andytela

    (@andymoonshine)

    Hi
    Thanks for the quick response.
    Yeh the directory is set up like this

    define( 'WP_CONTENT_DIR', dirname( __FILE__ ) . '/content' );
    define( 'WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/content' );

    Heres the debug
    Although it already says “already smushed” even though first time it didn’t do anything It flew through 77 images in less than a second

    Processing screen-shot-2013-09-04-at-14-26-04…
    DEBUG: attachment_file_path=[/var/www/maudsley/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04.png]
    DEBUG: attachment_file_url=[http://maudsley.moonshinemedia.co.uk/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04.png]
    DEBUG: file_path [/var/www/maudsley/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04.png] ABSPATH [/var/www/maudsley/wp/]
    DEBUG: attachment_file_path_size=[/var/www/maudsley/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-150x150.png]
    DEBUG: attachment_file_url_size=[http://maudsley.moonshinemedia.co.uk/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-150x150.png]
    DEBUG: file_path [/var/www/maudsley/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-150x150.png] ABSPATH [/var/www/maudsley/wp/]
    DEBUG: attachment_file_path_size=[/var/www/maudsley/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-300x90.png]
    DEBUG: attachment_file_url_size=[http://maudsley.moonshinemedia.co.uk/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-300x90.png]
    DEBUG: file_path [/var/www/maudsley/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-300x90.png] ABSPATH [/var/www/maudsley/wp/]
    DEBUG: attachment_file_path_size=[/var/www/maudsley/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-880x260.png]
    DEBUG: attachment_file_url_size=[http://maudsley.moonshinemedia.co.uk/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-880x260.png]
    DEBUG: file_path [/var/www/maudsley/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-880x260.png] ABSPATH [/var/www/maudsley/wp/]
    DEBUG: attachment_file_path_size=[/var/www/maudsley/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-768x355.png]
    DEBUG: attachment_file_url_size=[http://maudsley.moonshinemedia.co.uk/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-768x355.png]
    DEBUG: file_path [/var/www/maudsley/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-768x355.png] ABSPATH [/var/www/maudsley/wp/]
    DEBUG: attachment_file_path_size=[/var/www/maudsley/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-70x70.png]
    DEBUG: attachment_file_url_size=[http://maudsley.moonshinemedia.co.uk/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-70x70.png]
    DEBUG: file_path [/var/www/maudsley/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-70x70.png] ABSPATH [/var/www/maudsley/wp/]
    DEBUG: attachment_file_path_size=[/var/www/maudsley/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-380x355.png]
    DEBUG: attachment_file_url_size=[http://maudsley.moonshinemedia.co.uk/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-380x355.png]
    DEBUG: file_path [/var/www/maudsley/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-380x355.png] ABSPATH [/var/www/maudsley/wp/]
    DEBUG: attachment_file_path_size=[/var/www/maudsley/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-68x51.png]
    DEBUG: attachment_file_url_size=[http://maudsley.moonshinemedia.co.uk/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-68x51.png]
    DEBUG: file_path [/var/www/maudsley/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-68x51.png] ABSPATH [/var/www/maudsley/wp/]
    DEBUG: attachment_file_path_size=[/var/www/maudsley/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-220x110.png]
    DEBUG: attachment_file_url_size=[http://maudsley.moonshinemedia.co.uk/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-220x110.png]
    DEBUG: file_path [/var/www/maudsley/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-220x110.png] ABSPATH [/var/www/maudsley/wp/]
    DEBUG: attachment_file_path_size=[/var/www/maudsley/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-460x275.png]
    DEBUG: attachment_file_url_size=[http://maudsley.moonshinemedia.co.uk/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-460x275.png]
    DEBUG: file_path [/var/www/maudsley/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-460x275.png] ABSPATH [/var/www/maudsley/wp/]
    β€” [original] 1177 x 355: /var/www/maudsley/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04.png must be within the website directory (/var/www/maudsley/wp/) already smushed
    β€” [thumbnail] 150 x 150: /var/www/maudsley/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-150x150.png must be within the website directory (/var/www/maudsley/wp/) already smushed
    β€” [medium] 300 x 90: /var/www/maudsley/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-300x90.png must be within the website directory (/var/www/maudsley/wp/) already smushed
    β€” [page-carousel] 880 x 260: /var/www/maudsley/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-880x260.png must be within the website directory (/var/www/maudsley/wp/) already smushed
    β€” [mobile-page-carousel] 768 x 355: /var/www/maudsley/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-768x355.png must be within the website directory (/var/www/maudsley/wp/) already smushed
    β€” [timeline-thumbs] 70 x 70: /var/www/maudsley/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-70x70.png must be within the website directory (/var/www/maudsley/wp/) already smushed
    β€” [people-main] 380 x 355: /var/www/maudsley/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-380x355.png must be within the website directory (/var/www/maudsley/wp/) already smushed
    β€” [people-thumb] 68 x 51: /var/www/maudsley/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-68x51.png must be within the website directory (/var/www/maudsley/wp/) already smushed
    β€” [project-thumbnail-small] 220 x 110: /var/www/maudsley/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-220x110.png must be within the website directory (/var/www/maudsley/wp/) already smushed
    β€” [project-thumbnail-large] 460 x 275: /var/www/maudsley/content/uploads/2013/09/Screen-Shot-2013-09-04-at-14.26.04-460x275.png must be within the website directory (/var/www/maudsley/wp/) already smushed

    Cheers
    Andy

    @andymoonshine,

    Perfect. Let me work on using those defined and post a beta for you to test out. Be back in a few hours. Thanks.

    @andymoonshine,

    Can I ask you to try this beta? I’ve basically removed the local file check the previous developer added. There is no need to check the local file since the Yahoo! API only takes the URL of the file.

    https://dl.dropboxusercontent.com/u/2616987/WPMUDev/wp-smushit/wp-smushit-1.6.5.3-Beta1.zip

    andytela

    (@andymoonshine)

    Hi

    That works perfectly
    Thank you for such a quick response, excellent support! πŸ™‚

    Cheers
    Andy

Viewing 15 replies - 16 through 30 (of 31 total)
  • The topic ‘Multiple warnings and errors using Smush.it’ is closed to new replies.