• Hi.

    I’m working on a wordpress theme, and trying to apply themes to Pages.

    I have created a News page. When I try to set a template for it by going to the Page settings, and selecting a template, and then pressing ‘publish’, the admin interface dissapears, and I get a series of php warnings in the browser window.

    Nothing else displays except the warnings.

    In order to restore the admin interface I hit the back button, and reload. When I do this, get the admin interface, and the php warning appear in the column under ‘Attributes’.

    Warning: file(/var/www/hosts/wp/wp-content/themes/mytheme/.#header.php) [function.file]: failed to open stream: No such file or directory in /var/www/hosts/wp/wp-admin/includes/theme.php on line 142
    
    Warning: implode() [function.implode]: Invalid arguments passed in /var/www/hosts/wp/wp-admin/includes/theme.php on line 142
    
    Warning: Cannot modify header information - headers already sent by (output started at /var/www/hosts/wp/wp-admin/includes/theme.php:142) in /var/www/hosts/wp/wp-includes/pluggable.php on line 868

    I do not have any files called .#header. Nor do I request such a file anywhere.

    What is happening here ?
    What are the warnings telling me? How do I recover ?

    I’m guessing that I’ve messed up somewhere in the theme creation process. But I can’t tell where.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter bobdobbs

    (@bobdobbs)

    More information:

    This only seems to happen when editing the options for one particular page.

    For the moment I’ve gotten around the issue by deleting the page, emptying the trash, and then recreating it from scratch.

    However, this is not entirely a satisfactory solution. I wouldn’t have to do this for a page that I’d put much more work into.

    Anybody got any idea how this happened, or how to avoid this problem in the future ?

    Thread Starter bobdobbs

    (@bobdobbs)

    The warnings have re-appeared on my newly created page.
    It’s slightly different now:

    Warning: file(/var/www/hosts/wp/wp-content/themes/julie/.#posts.php) [function.file]: failed to open stream: No such file or directory in /var/www/hosts/wp/wp-admin/includes/theme.php on line 142
    
    Warning: implode() [function.implode]: Invalid arguments passed in /var/www/hosts/wp/wp-admin/includes/theme.php on line 142

    What is causing this error ?

    Could this be a problem with the theme I’m using ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Indecipherable php warnings when changing page templates’ is closed to new replies.