Opened 17 years ago
Closed 17 years ago
#6097 closed defect (bug) (fixed)
Warning</b>: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: No such file or directory in <b>~/wp-includes/js/tinymce/tiny_mce_config.php</b> on line <b>158</b>
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 2.5 | Priority: | normal |
Severity: | normal | Version: | 2.5 |
Component: | Administration | Keywords: | has-patch |
Focuses: | Cc: |
Description
TinyMCE was failing to load on a fresh install, I noticed a JS error in the console, which turned out to be this PHP error.
It causes an error if it cannot create the temp. cache dir, This would happen if the permissions do not allow the folder to be created, Or, if the uploads folder does not allready exist (Which is doesnt on fresh installs it seems).
Atached patch silences error outputs, and attempts to create the upload folder if it does not allready exist.
Attachments (2)
Change History (7)
#2
@
17 years ago
And then wp_mkdir_() can be used to make the js_cache directory beneath wp_upload_dir(). Or, we can just wp_mkdir_p() the cache dir directly within wp-content.
#3
@
17 years ago
I was wondering why it was in the upload dir. and not a cache dir or such, I assumed it was because the more lax permissions that are generally enabled for the upload dir in environments which need it.
wp_upload_dir() returns the current month upload folder if WP is set to organise uploads into year/month folders (Which IMO, a lot of people seem to do).
I've updated this to use wp_mkdir_p() instead. as for wp_upload_dir() maybe can return a extra element 'base' (Or something else) which simply returns the upload folder base.
This should use wp_upload_dir(). That function finds the right upload directory, makes sure it exists, and makes sure it has the correct perms.