#16117 closed defect (bug) (fixed)
Deleting theme in multisite throws errors
Reported by: | talus | Owned by: | |
---|---|---|---|
Milestone: | 3.1 | Priority: | normal |
Severity: | major | Version: | 3.1 |
Component: | Multisite | Keywords: | has-patch |
Focuses: | multisite | Cc: |
Description
Deleting a theme in multisite (3.1-RC2-17229) threw the following error:
(Attempting to delete constructor theme below)
Warning: fopen(/home/~~username~~/public_html/~~sitename~~.com/wp-content/themes/constructor/style.css) [function.fopen]: failed to open stream: No such file or directory in /home/~~username~~/public_html/~~sitename~~.com/wp-includes/functions.php on line 4273 Warning: fread(): supplied argument is not a valid stream resource in /home/~~username~~/public_html/~~sitename~~.com/wp-includes/functions.php on line 4276 Warning: fclose(): supplied argument is not a valid stream resource in /home/~~username~~/public_html/~~sitename~~.com/wp-includes/functions.php on line 4279
Then asks to confirm delete of Theme (blank space) by Anonymous.
Attachments (6)
Change History (30)
#2
@
14 years ago
This is really edge -- if the theme doesn't have a style.css then it won't be listed.
#7
@
14 years ago
Please note: I did not delete any files manually. In fact, to repro the test, I installed Constructor from the theme install, then deleted it immediately. Constructor is a "Featured" theme from WordPress.org, and this error occurred with every theme I tried.
#8
follow-up:
↓ 13
@
14 years ago
You can't delete a theme if you don't have style.css because it wont show up in list.
@ryan
3.2? releasing 3.1 with errors is bad.
#10
@
14 years ago
If we're going to avoid remove_query_arg(), can we use add_query_arg() instead? Looks better.
For what it's worth though, I think remove_query_arg() is proper here.
#12
@
14 years ago
It does not apply to other redirects because query arg action in $referer is only set in the delete-selected verify form. Yes, it can move to $temp_args.
#13
in reply to:
↑ 8
@
14 years ago
Replying to greuben:
You can't delete a theme if you don't have style.css because it wont show up in list.
I know. We have a broken themes list elsewhere, perhaps that should be included here.
@ryan
3.2? releasing 3.1 with errors is bad.
There are always errors. :-)
The latest patch seems good though.
#14
@
14 years ago
Are any of you testing with FTP? I can't get any themes to delete, with or without these patches. Tons of notices are thrown on the Connection Information screen. It looks like all of the things admin.php sets up are not being set up.
#16
@
14 years ago
The redirect url in delete_theme() needs to be updated for network admin. Either pass a redirect url or add an is_network_admin() check inside the function.
#17
@
14 years ago
Attached patch by ryan works for the theme deletion over ftp issue. Need another patch for the notices.
#22
@
14 years ago
The notices when showing the Connection Information form during a delete via FTP are also present in 3.0. I think we can ignore those for 3.1. If someone wants to try to track the root cause down, however, that would be great.
I'm only able to reproduce this if I delete
style.css
manually before clicking the Delete link. Added check for file existence (just in case).