0

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.

5
  • 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
    Commented Apr 27, 2013 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++. Commented Apr 27, 2013 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
    Commented Apr 27, 2013 at 22:56
  • 1
    I guess it was a BOM issue?
    – fuxia
    Commented Apr 27, 2013 at 23:00
  • Is the problem solved?
    – Ralf912
    Commented Apr 28, 2013 at 8:31

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.