Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialUlises Calvo
2,233 PointsBlank Page error when changing password from a local install
I just changed my WP user password from the Admin area of my local installation (using MAMP here).
So right after I saved, everything went blank.
When I try to go to http://localhost/My-Theme/wp-admin/ I get nothing but a white page (the little MAMP favicon still on the tabs corner of the browser)
However when I go to http://localhost/My-Theme/ I can see my theme running.
Any ideas?? This is really frustrating, thank you in advance.
2 Answers
missgeekbunny
37,033 PointsI think the first error is more relevant to the issue, the pluggable coming up on that line is essentially WordPress and a plugin functionality butting heads. What's on line 9 of partials.php?
Some of the errors you posted are about formatting files for mac which is why they were denied, fastcgi starting and not finding doc-assets in htdocs. The not finding doc-assets might be related but it also might just be something that it can move on from.
Ulises Calvo
2,233 PointsThank you Malevolentbunny,
It's really weird, since you mentioned the problem was in the first error, I went ahead and removed the include 'partials.php'; from my functions.php file.
And now that fixed the issue.
What's in line 9 of the partials.php is this CSS line: color: #<?php echo esc_attr( $text_color ); ?>;
I created this file to have a separate file for this inline CSS related to the Customizer and not having a bunch of styles in my theme-customizer.php file.
I read it was a good practice to do so.
But the weird thing is all was working fine until I decided to change my password from the User Admin and I logged out.
This is the code there is in the partials.php
<?php
function namaste_style_header() {
$text_color = get_header_textcolor();
?>
<style type ="text/css">
.company-name-box-header-title h2,
.company-name-box-header-title h1 {
color: #<?php echo esc_attr( $text_color ); ?>;
}
.company-name-box-header-title {
border-color: #<?php echo esc_attr( $text_color ); ?>;
}
.company-name-box-header-title h2::after,
.company-name-box-header-title h2::before {
border-top: 1px solid #<?php echo esc_attr( $text_color ); ?> ;
}
<?php
if ( get_header_image() != '' ) :
?>
.jumbotron {
position: relative;
height: 640px;
background-image: url(<?php header_image(); ?>);
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
line-height: 200%;
color: #fff;
padding-top: 0;
margin-bottom: 0;
background-position: center top; }
<?php endif; ?>
<?php if(display_header_text() != true): ?>
.site-title, .site-description {
display: none; }
<?php endif; ?> </style> <?php } ?>
I am calling the function like this from the theme-customizer.php:
include 'partials.php'; namaste_style_header();
What do you think is causing the issue, should I just abort intending to separate this code from the theme-customizer.php altogether?
missgeekbunny
37,033 PointsLook in /MAMP/logs/php_error.log what errors does it show?
Ulises Calvo
2,233 PointsThank you malevolentbunny. Do you mean running that line from a command terminal?
missgeekbunny
37,033 PointsEither from the command line or just opening the file. I work in linux a lot so I'm used to expressing file paths like that
Ulises Calvo
2,233 PointsI see this error: [26-Jan-2016 11:21:20 UTC] PHP Warning: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/Namaste-Theme/wp-content/themes/Namaste/partials.php:9) in /Applications/MAMP/htdocs/Namaste-Theme/wp-includes/pluggable.php on line 1228
Does this have anything to do with my having changed my password? I see there partials.php which is a file I created yesterday to house some CSS inline styles I use for the customizer.
Ulises Calvo
2,233 PointsI apologize for being so intense, I think I found the related error: [Tue Jan 26 12:21:09 2016] [error] [client ::1] client denied by server configuration: /Applications/MAMP/htdocs/.DS_Store, referer: http://localhost/MAMP/?language=English [Tue Jan 26 12:28:32 2016] [error] [client ::1] client denied by server configuration: /Applications/MAMP/htdocs/.DS_Store [Tue Jan 26 13:10:26 2016] [notice] Digest: generating secret for digest authentication ... [Tue Jan 26 13:10:26 2016] [notice] Digest: done [Tue Jan 26 13:10:26 2016] [notice] FastCGI: process manager initialized (pid 587) [Tue Jan 26 13:10:26 2016] [notice] Apache/2.2.29 (Unix) mod_wsgi/3.5 Python/2.7.10 PHP/5.6.10 mod_ssl/2.2.29 OpenSSL/0.9.8zg DAV/2 mod_fastcgi/2.4.6 mod_perl/2.0.9 Perl/v5.22.0 configured -- resuming normal operations [Tue Jan 26 13:10:28 2016] [error] [client ::1] File does not exist: /Applications/MAMP/htdocs/docs-assets
The problem is, this is over my head, what do you think I should do? Many thanks
missgeekbunny
37,033 PointsIs the line actually
color: #echo esc_attr( $text_color ); ?;
If so then the issue is that you forgot to close the php tag and just threw it a question mark.
Ulises Calvo
2,233 PointsUlises Calvo
2,233 PointsI am not used to the command terminal. I am on a Mac. Went ahead and tried to run MAMP/logs/php_error.log and I get -bash: /MAMP/logs/php_error.log: No such file or directory What part do you think I am missing here?