Opened 14 years ago
Closed 14 years ago
#10953 closed defect (bug) (fixed)
Cannot select Page template after r12025
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 2.9 | Priority: | normal |
Severity: | critical | Version: | 2.9 |
Component: | Template | Keywords: | has-patch tested |
Focuses: | Cc: |
Description
Starting with r12025, I cannot select template for a Page. In the Attributes metabox, instead of the menu to select a template, I get a log list of warnings like the following:
Warning: file(/PATH/TO/wp-content/themes/sandbox/sitemap.php) [function.file]: failed to open stream: No such file or directory in /PATH/TO/wp-admin/includes/theme.php on line 134 Warning: implode() [function.implode]: Bad arguments. in /PATH/TO/wp-admin/includes/theme.php on line 134
Up to r12024 template selection is OK.
Confirmed on two different server setups.
Attachments (1)
Change History (8)
#2
@
14 years ago
- Component changed from Themes to Administration
- Keywords needs-patch added
- Severity changed from normal to critical
Confirmed on r12031.
#3
@
14 years ago
This comes down to Template Files now holding a absolute path to the template files.. Not the relative directory as previously expected.
The simple solution is to remove the usage of WP_CONTENT_DIR in wp-admin\includes\theme.php on line 134, The other option, is for returning relative files again, which'll require passing some relative-paths around a fair bit..
@
14 years ago
$template contains the full path of the template. Don't prepend WP_CONTENT_DIR to the template path.
For me, edit-pages doesn't load at all.
Some of the warnings -
PHP Warning: file(E:\webpage\svn\trunk/wp-contentE:\webpage\svn\trunk/wp-content/themes/default/404.php): failed to open stream: Invalid argument in E:\webpage\svn\trunk\wp-admin\includes\theme.php on line 134 PHP Warning: implode(): Invalid arguments passed in E:\webpage\svn\trunk\wp-admin\includes\theme.php on line 134 PHP Warning: file(E:\webpage\svn\trunk/wp-contentE:\webpage\svn\trunk/wp-content/themes/default/archive.php): failed to open stream: Invalid argument in E:\webpage\svn\trunk\wp-admin\includes\theme.php on line 134
....
PHP Warning: implode(): Invalid arguments passed in E:\webpage\svn\trunk\wp-admin\includes\theme.php on line 134 PHP Warning: file(E:\webpage\svn\trunk/wp-contentE:\webpage\svn\trunk/wp-content/themes/default/single.php): failed to open stream: Invalid argument in E:\webpage\svn\trunk\wp-admin\includes\theme.php on line 134 PHP Warning: implode(): Invalid arguments passed in E:\webpage\svn\trunk\wp-admin\includes\theme.php on line 134