• Editing WordPress php or css files with Notepad++ with copy and paste causes problems and I can’t figure out why that would happen.

    I download files via FTP, edit them in Notepad++ and reupload them, if I edit them by hand there is no problem, but if I copy and paste anything all into the file it causes php files to be disabled, and css files to give an error.

    Does anyone know why this would be? I haven’t encountered the problem on non wordpress sites.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Any files, regardless to WordPress?

    Thread Starter robtomorrow

    (@robtomorrow)

    Pasting anything into any file in WordPress with Notepad++ causes problems.

    I never encountered the problem before when editing php or css files on non WordPress sites.

    Thread Starter robtomorrow

    (@robtomorrow)

    For instance, if I edit a background color in the Child Theme style.css file in Notepad++ by hand, by typing the color code in, it is fine, but if I paste the color code in I get an error message in the WordPress Dashboard.

    In the case of php files it disables the entire site.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    It sounds like general syntax errors.

    Thread Starter robtomorrow

    (@robtomorrow)

    Andrew, thank you for the reply, but it is not syntax errors, as I mentioned if I type the code in it works fine, it is only if I paste the code in that there is a problem, there is no syntactical difference.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Can you narrow the problem down for forum volunteers to diagnose?
    Post an excerpt of code, with the error generated.

    Have you tried another text editor?

    Thread Starter robtomorrow

    (@robtomorrow)

    Andrew, here is a snip it of code, if I I change the background color by typing the color code in and upload the edited style.css file everything is fine.

    body {

    background: #014681;

    color: #555555;

    }

    On the other hand if I have the color code on my clip board and paste it in and then upload the edited file I get this error on my WordPress Dashboard.

    ERROR: The themes directory is either empty or doesn’t exist. Please check your installation.

    The same strange thing happens if I edit a php file by pasting in code, except in that case there is no error message, I just get a blank page.

    (I haven’t tried using a different text editor yet)

    Thread Starter robtomorrow

    (@robtomorrow)

    hmmm… I just tried the same thing with HTML-Kit instead of Notepade++ and the problem doesn’t seem to occur.

    Strange, I’ve never had a problem with Notepad++ before. Even copying and pasting text from the file itself causes problems.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Copy and pasting into files causes problems’ is closed to new replies.