[wp-trac] [WordPress Trac] #24026: No /themes/ folder causes strange behaviour (was: No /themes/ folder couses strange behaviour)
WordPress Trac
noreply at wordpress.org
Wed Apr 10 11:04:34 UTC 2013
#24026: No /themes/ folder causes strange behaviour
--------------------------+------------------------------
Reporter: slaFFik | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version: 3.1
Severity: normal | Resolution:
Keywords: |
--------------------------+------------------------------
Changes (by SergeyBiryukov):
* version: 3.5.1 => 3.1
Comment:
Got "Cheatin' uh?" message from `wp-admin/themes.php`: [[BR]]
http://core.trac.wordpress.org/browser/tags/3.5.1/wp-admin/themes.php#L20
BuddyPress Default theme is correctly registered with `/plugins/buddypress
/bp-themes` as theme root, however `wp_get_theme( 'bp-default' )` later
looks for `WP_CONTENT_DIR . '/themes'` instead.
Caused by the early return in `get_theme_roots()` and
`get_raw_theme_root()`: [[BR]]
http://core.trac.wordpress.org/browser/tags/3.5.1/wp-
includes/theme.php#L285 [[BR]]
http://core.trac.wordpress.org/browser/tags/3.5.1/wp-
includes/theme.php#L510
{{{
if ( count($wp_theme_directories) <= 1 )
return '/themes';
}}}
Commenting out these lines in both functions allowed me to activate
BuddyPress Default theme.
Introduced in [15641], corrected in [16424]. It assumes that if there's
only one theme directory, it's `wp-content/themes`. According to the
ticket description, this assumption isn't always correct, although it's
probably an edge case.
Reproduced in 3.1 as well. There was no "Cheatin' uh?" message (it was
introduced later in [21010]), however `validate_current_theme()` still
failed, and the theme could not be activated: [[BR]]
http://core.trac.wordpress.org/browser/tags/3.1/wp-admin/themes.php#L60
--
Ticket URL: <http://core.trac.wordpress.org/ticket/24026#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list