Jan Hemmingsen
Forum Replies Created
-
Forgot to say that WP Debug already is off, which doesn’t prevent the Invalid Argument statement.
/**
* For developers: WordPress debugging mode.
*
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments.
*/
define(‘WP_DEBUG’, false);Any news on when an update will be out?
Unfortunately it also prevents regenerating thumbnails :-/
Regenerate Thumbnails
All done! 0 image(s) were successfully resized in 5 seconds and there were 1 failure(s). To try regenerating the failed images again, click here. To go back to the previous page, click here.Please be patient while the thumbnails are regenerated. This can take a while if your server is slow (inexpensive hosting) or if you have many images. Do not navigate away from this page until this script is done or the thumbnails will not be resized. You will be notified via this page when the regenerating is completed.
100%
Debugging InformationTotal Images: 1
Images Resized: 0
Resize Failures: 1function (){if(c){var a=c.length;n(arguments),j?l=c.length:e&&e!==!0&&(k=a,o(e[0],e[1]))}return this}
Thanks for your great work!
Cheers
Jan
Whether or not I am on a network share I do not know. I would not think so as all files are under one home directory, but who knows 🙂
Nevertheless since it works with new uploads and also works with most of the existing I am closing this topic as what it set out to do seems to have been accomplished.
If I should have something else to report or contribute I will do so…
Well, if the files is supposed to be in the upload folder then it is valid.
I would have assumed it in the plugin folder in which case it would not be valid 🙂
That I get an error stating that it could not be found indicates to me that it looks for it or creates it in the wrong directory.
I tried finding one while the process was running but couldn’t so perhaps it is simply not created…
The files names are rather long, but not the longest so it really cannot be that. WordPress automatically strips out international characters as well as other stuff like * for example so the filenames consists of only letters and – indicating spaces between words.
One of the files was named: Daniel-Pink-on-the-surprising-science-of-motivation.png for example.
I am not sure exactly how this is related, but it seems to include the wrong path somewhere.
Once when bulk optimizing I got this:
Warning: file(XYZ*/ewww.tmp) [function.file]: failed to open stream: No such file or directory in PATH_OK/wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php on line 179
Bulk EWWW Image Optimize
Bulk Optimization has taken 0.0 seconds.
Warning: Invalid argument supplied for foreach() in PATH_OK/wp-content/plugins/ewww-image-optimizer/bulk.php on line 41Warning: unlink(XYZ*/ewww.tmp) [function.unlink]: No such file or directory in PATH_OK/wp-content/plugins/ewww-image-optimizer/bulk.php on line 66
Finished* XYZ again being the full path to the image i.e. the defined upload directory.
Seems to me that it refers to the tmp file in the wrong directory perhaps?
Hi Shane,
as far as the error message goes everything works fine. No error message and as it seems no problem optimizing individual images.
When trying to bulk optimize I got this error a couple of times when it was done:
Processing 24/24: imagename.png
Full size – Could not find XYZ*
Elapsed: 74 seconds*XYZ being the full path to the image.
The images are there and the path is also correct. It also works fine when I optimize those same images individually.
When I try to bulk optimizes it hangs more times as soon as I try doing it with more than 10 images.
Sure, I am on shared hosting, but perhaps it could be set so it does it slower, thus using fewer ressources and being able to finish the operation instead of timing out?
Another thing that I wonder is why it often times can optimize the images that WP created while being unable to optimize the original?
Thanks,
Jan
I see the option to check the “Mark this topic as resolved” box and I will when I have tested the update.
Doing it now seems premature even if I have every confidence in you 🙂
If I were to guess I would assume that the author of the plugin you build on didn’t want to take the risk of optimizing other images than those in the media library. Not that I see how that could happen as it does its thing within the media library, but who knows.
Removing the restriction should be okay I guess. Alternatively it could be rebuilt so that it looks for the upload directory and accepts that regardless where it is. That should take care of it even if someone got the idea of moving the entire wp-contents folder I think. I am not sure why one would do that, but I guess it relates to security concerns.
Perhaps this helps as well: http://codex.ww.wp.xz.cn/Function_Reference/wp_upload_dir
In the admin I changed the path under General Setting – Media to the path on der server where the other domain is as well as the url where the domain is.
Instead of the default path of “wp-content/uploads” I now have the full path from home to the directory where the uploads now reside. The url is the same, but as seen in the browser obviously.
I did NOT move the wp-content directory itself. Just the uploads directory. The page you link to is about the former, whereas I followed the instructions here: http://codex.ww.wp.xz.cn/Settings_Media_Screen and here: http://codex.ww.wp.xz.cn/Changing_The_Site_URL. The second one (at the bottom of the page) is just about changing the paths to content already uploaded so that may not be entirely relevant, but still it completes the picture so to speak.
That was really all there was to it. The point being that I did not want images to be served from http://www.domain.com/wp-content/uploads but from images.domain2.com/dir
Firstly they are then served without cookies and secondly do I plan letting a cdn pull and serve them. Doing it this way I can serve most of the content from a number of sites using one cdn account.
I hope I explained that well enough 🙂
Hi Shane,
yes they are still in the media library and all future uploads also land there. I just changed the path so that are pulled from another domain.
I did check the plugin and found the restriction, but since I am no expert I would rather that you look at it before I mess something up.
An update would obviously be the best solution as I then wouldn’t have to worry about future updates 🙂
If you will I will gladly test it and report back to you.
Thanks,
Jan