WordPress.org

Ready to get started?Download WordPress

Forums

my files randomly get minified (no caching plugin) (5 posts)

  1. polaris1
    Member
    Posted 2 years ago #

    When I upload files via ftp to the WordPress theme or a plugin folder, they sometimes get minified in a bad way -- code gets pushed onto one-line comments, spaces are automatically added after a colon (goodbye pseudoclasses), etc. Basically, my code gets destroyed and won't even run in this state. This happens inconsistently -- I can't always reproduce it, though it only occurs when I upload a new file.

    Also, another less-pressing problem is that if I view a .css file in WordPress' editor, it basically adds a line break to every other line. This isn't viewable in the WP editor the first time, but if I download the file via ftp and view it in my text editor it is apparent. My 2000-line css files get magically turned to 4000.

    No plugins are installed in WordPress besides a .less compiler (problem happens even if I don't use this).

    I am using NotePad++ and WinSCP and am wondering it it's an encoding problem. UTF-8 without BOM, or ANSI doesn't seem to make a difference though. The problem also happens when I use FileZilla (transfer type is set to auto).

    Before I smash my computer and jump out this window, I'm curious if any other folks have run into anything like this.

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    When you create or edit files, what file format are you using? Unix or PC?

  3. polaris1
    Member
    Posted 2 years ago #

    I have Notepad++ set to create new documents in the Windows format.

  4. esmi
    Forum Moderator
    Posted 2 years ago #

    Change that to Unix format.

  5. polaris1
    Member
    Posted 2 years ago #

    You, my friend, define awesomeness. Thank you very much -- worked like a charm.

Topic Closed

This topic has been closed to new replies.

About this Topic