Opened 17 years ago
Closed 17 years ago
#10953 closed defect (bug) (fixed)
Cannot select Page template after r12025
| Reported by: | demetris | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.9 |
| Component: | Template | Version: | 2.9 |
| Severity: | critical | Keywords: | has-patch tested |
| Cc: | Focuses: |
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
@
17 years ago
- Component Themes → Administration
- Keywords needs-patch added
- Severity normal → critical
Confirmed on r12031.
#3
@
17 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..
@
17 years ago
$template contains the full path of the template. Don't prepend WP_CONTENT_DIR to the template path.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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