Update failed due to "File name too long" problem
Please consider to use shorter file name for tmp file.
Update Theme Downloading upgrade package from the Envato API…
Warning: touch(): Unable to create file /tmp/wp-buildpress-v3.0.2-2015-05-21-13-46.zipAWSAccessKeyIdMY_KEYMY_KEYMY_KEYMY_KEYMY_KEYMY_KEYMY_KEYExpires1432653415SignatureSIGNATURESIGNATURESIGNATURE%3Dresponse-content-dispositionattachment%3B-filename%3Dthemeforest-9323981-buildpress-construction-business-wp-theme-wordpress_theme.tmp because File name too long in /www/apache/domains/www.google.com/htdocs/new/wp-admin/includes/file.php on line 164
Warning: unlink(/tmp/wp-buildpress-v3.0.2-2015-05-21-13-46.zipAWSAccessKeyId_KEYMY_KEYMY_KEYMY_KEYMY_KEYMY_KEYMY_KEYExpires1432653415SignatureSIGNATURESIGNATURESIGNATURE%3Dresponse-content-dispositionattachment%3B-filename%3Dthemeforest-9323981-buildpress-construction-business-wp-theme-wordpress_theme.tmp): File name too long in /www/apache/domains/www.google.com/htdocs/new/wp-admin/includes/file.php on line 464 Download failed. Could not open handle for fopen() to /tmp/wp-buildpress-v3.0.2-2015-05-21-13-46.zipAWSAccessKeyId_KEYMY_KEYMY_KEYMY_KEYMY_KEYMY_KEYMY_KEYExpires1432653415SignatureSIGNATURESIGNATURESIGNATURE%3Dresponse-content-dispositionattachment%3B-filename%3Dthemeforest-9323981-buildpress-construction-business-wp-theme-wordpress_theme.tmp
Same problem here! Is this a bug? Can you please tell us how to fix this?
Wordpress 4.2.2
I have the same bug... Can someone help with this?
Hi,
this is a WordPress core bug with this function wp_tempnam, because the filename of the theme file are longer than 255 characters and so the servers can't save the file with such long filename...
I'm planning on opening a WP trac ticket and adding a patch, but just didn't get around to do so.
This is not likely to get changed in Core. Those limits are imposed for a reason and getting them changed is a lengthy process that could take years. Why are authors using such ridiculously long file names? In all reality the file would need to be renamed before being passed to wp_tempnam. However, I can't spare any time to fix this issue when I'm building a new plugin to replace this one. It's just slowing down the release of that plugin. Sorry guys, you'll just have to wait until the new plugin is released. Until then I suggest you deactivate this plugin and update the theme manually.
Of course I'm not recommending changing the limits... I'll propose to catch such long filenames and rename them to the timestamp (the default in the wp_tempnam function if the filename does not exist).
Also, the theme authors are not at fault for long theme names. For example here is the zip file name of a theme on themeforest wp-buildpress-v3.0.2-2015-05-21-13-46.zip, which is totally ok, but to download the zip file from themeforest you have to add some parameters to the URL (envato API authentication) and so the URL is very long and the way the wp_tempnam works is to include the parameters as well (the whole URL after the last forward slash / resulting in this filename: wp-buildpress-v3.0.2-2015-05-21-13-46.zipAWSAccessKeyIdMY_KEYMY_KEYMY_KEYMY_KEYMY_KEYMY_KEYMY_KEYExpires1432653415SignatureSIGNATURESIGNATURESIGNATURE%3Dresponse-content-dispositionattachment%3B-filename%3Dthemeforest-9323981-buildpress-construction-business-wp-theme-wordpress_theme.tmp ).
That's the problem and I know you can't do anything about it inside the plugin, so this ticket can be closed.
Take care!
Understood. We'll be eagerly awaiting the new plugin . Great work.