Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have been working on a theme for a few days and when I realized my JS file for my theme customizer wasn't updating I decided to clear the cookies and cache, and wow that was problematic. As soon as I did that I recieved this error many times, mainly stating the file I am working on(customize.php and the other file it said was pluggable.php:

Warning: Cannot modify header information - headers already sent by customize.php 

After I tried to login I am now receiving this error:

Parse error: syntax error, unexpected T_FUNCTION on line 1

Everytime I replace the file with a previous version it keeps messing up the format of the code and making it all one line of code as soon as I refresh the page and redownload the file.

I don't understand what is causing this. Why is it making the whole file 1 line? It makes it harder for me to find the original issue.

Edit: I ended up creating a an empty file and copy and pasted the code into it. After that my issue stopped. For some reason Notepad++ was adding way too much whitespace to the width of the file causing all of the code to form on 1 line. Therefore causing a plethora of problems. After pasting the code into a new file it works.

share|improve this question
    
Are you hacking the customize.php at /wp-admin/customize.php? Please post the complete error messages, not edited versions of them. –  s_ha_dum Apr 27 '13 at 22:01
    
Thanks for the reply. It seems that notepad++ added too much white space into the file even though their shouldn't of been. Causing it to all move to line 1. Therefore causing my issues. I am still not sure why the extra whitespace was added to the width, if it is an issue from wordpress editor to notepad++. –  user1632018 Apr 27 '13 at 22:53
    
Whitespace should be irrelevant and NotePad++ is supposed to be a code editor (never used it). Maybe have an encoding issue? What is the encoding on the file? –  s_ha_dum Apr 27 '13 at 22:56
1  
I guess it was a BOM issue? –  toscho Apr 27 '13 at 23:00
    
Is the problem solved? –  Ralf912 Apr 28 '13 at 8:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.