WordPress.org

Ready to get started?Download WordPress

Forums

WP Smush.it
[resolved] Multiple warnings and errors using Smush.it (32 posts)

  1. Gary Darling
    Member
    Posted 1 year ago #

    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/

  2. BlueNoseBear
    Member
    Posted 1 year ago #

    I also get this error when trying to save media settings. When I disable Smush.it, it solves the issue.

  3. @garydarling @bluenosebear I cannot reproduce this issue on my installation... could you please tell me if you have any other plugins enabled? Are you using the latest version of the plugin?

    Please advise,
    Ari.

  4. BlueNoseBear
    Member
    Posted 1 year ago #

    I have several plugins installed, what plugin do you think may be clashing? I am using the latest version.

    What I think may be causing the issues, is filosofo-custom-image-sizes. This is built into my sites theme and i've had a few errors with it in the past. I may be wrong, but have you had issues with this in the past?

  5. @bluenosebear could you please try with the twentytwelve theme activated and let us know if the issue still occurs there?

    Cheers,
    Ari.

  6. BlueNoseBear
    Member
    Posted 1 year ago #

    Yes I still get the same errors with that theme.

  7. Helllllpmeplease
    Member
    Posted 1 year ago #

    I am having a similar issue. When I upload, it doesn't always smush and when I try to smush it, I get the "Could not find" error mentioned above. I tried an experiment and loaded about 10 pictures. It did smush some of them upon upload. When I tried to smush the ones it didn't, that's when it shows the "could not find...." error again. Are some getting loaded to a different directory?

  8. Gary Darling
    Member
    Posted 1 year ago #

    I have many plugins installed, but I disabled them all except for Simple Image Sizes, which has the Regenerate Thumbnails feature.

  9. Gary, just for testing purposes could you please disable the Simple Image Sizes plugin as well? Just try uploading some images with that plugin disabled and see if you still get the errors...

    Cheers,
    Ari.

  10. Gary Darling
    Member
    Posted 1 year ago #

    I tried this on the original, published website where I first encountered the problem. I uploaded a new image, clicked Smush it now, and here is what I get back:

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

    Here are the active plugins ( I deactivated many others to simplify things):

    • Bulletproof Security
    • Shortcodes Ultimate

    I would gladly deactivate them all, but they are needed at the moment.

    The site is hosted at GoDaddy, all versions are the latest.

  11. Hello Gary,
    I don't have an account on GoDaddy to test it on their servers, but I've tested this on another shared host and in addition on a VPS without having any issues...
    Could you please make sure that this folder actually exists on your installation and that it is accesible by your webserver, having the proper folder/file permissions?

    Please advise,
    Ari.

  12. remuninja
    Member
    Posted 1 year ago #

    Hello,

    I downloaded and activated the wp-smush it plugin and almost immediately had the error issues of uploading. I saw a small performance boost when having it on so I figured to keep it but just deactivate when I want to upload images to post. Well I forgot to do that today and one image quickly error'd and couldn't be uploaded. What I didn't realize is that it broke the entire site. Possibly in the .HTTaccess of which I tried to change but nothing. I'm getting a crazy "Internal Server Error" and while sometimes the site goes through, its crawling and partially not working. This is a mess and I tried removing the plugin from the FTP but doesn't help. I don't know how to fix this catastrophe.

  13. remuninja
    Member
    Posted 1 year ago #

    The site has managed to work again, not sure if it was the tinkering. However it left one plugin broken and even if I delete smash.it it doesn't function the way it did before. The plugin is WP-Tile and it was a main section on my site which doesn't seem to work anymore. Would there be any lingering code or changes it can make when deleted to maybe change back?

  14. Hello there @remuninja, if you kept getting error 500 messages even after deleting the plugin, then it was definitely not this plugin to blame.
    You can set WP_DEBUG to true in your wp-config.php so that we may figure out what's wrong.

    Cheers,
    Ari.

  15. WPMUDEV
    WPMU DEV Support Staff
    Plugin Author

    Posted 1 year ago #

    Hey there.

    Did you enable WP_DEBUG?

    If so could you please share the output errors please?

    Thanks.

  16. WPMUDEV
    WPMU DEV Support Staff
    Plugin Author

    Posted 1 year ago #

    Hey there.

    We haven't heard from you in a while, so I just wanted to check in to make sure all was good.

    This thread was marked resolved, but please, if you still need help then just respond and open it back up. We can then take it from there. :)

    Hope you have a fantastic day!

  17. Aaron
    Member
    Posted 1 year ago #

    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.

  18. Christian Kramer
    Member
    Posted 1 year ago #

    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

  19. haeihaeihaei
    Member
    Posted 12 months ago #

    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

  20. WPMUDEV
    WPMU DEV Support Staff
    Plugin Author

    Posted 10 months ago #

    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?

  21. SEOmachine
    Member
    Posted 10 months ago #

    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.

  22. WPMUDEV
    WPMU DEV Support Staff
    Plugin Author

    Posted 10 months ago #

    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). :)

  23. SEOmachine
    Member
    Posted 10 months ago #

    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!

  24. Mike
    WPMU DEV Support Staff
    Posted 10 months ago #

    Hi @SEOmachine

    That's great thanks for the feedback :-)

  25. andymoonshine
    Member
    Posted 10 months ago #

    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

  26. WPMUDEV
    WPMU DEV Support Staff
    Plugin Author

    Posted 10 months ago #

    @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.

  27. andymoonshine
    Member
    Posted 10 months ago #

    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

  28. WPMUDEV
    WPMU DEV Support Staff
    Plugin Author

    Posted 10 months ago #

    @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.

  29. WPMUDEV
    WPMU DEV Support Staff
    Plugin Author

    Posted 10 months ago #

    @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

  30. WPMUDEV
    WPMU DEV Support Staff
    Plugin Author

    Posted 10 months ago #

    @andymoonshine,

    Bad beta. Has some blocked code. New beta link below.
    https://dl.dropboxusercontent.com/u/2616987/WPMUDev/wp-smushit/wp-smushit-1.6.5.3-Beta2.zip

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic