none
unwanted auto-inserted double-line spacing in files

    Question

  • When I use Expression 4 to open my existing htm, php or other files, the "codes" all have unwanted auto-inserted double-line spacing in them, and sometimes it keeps them from running properly until I remove the extra lines; is there something I could do to prevent this?  Thanks for your support.  -- Billy.

    I apologize; I should have shown clearly what I meant.  I tried to upload two sample images but this editor won't let me.  However here's the equivalent in text format:

    (#1): Created originally with FrontPage 2003 SP3 via Http, with FrontPage Extension on Linux/Apache server.

    $adm_body = "<body bgcolor=\"white\" text=\"black\" link=\"blue\" ";
    $adm_body .= "alink=\"blue\" vlink=\"black\" marginheight=\"20\" ";
    $adm_body .= "marginwidth=\"20\" topmargin=\"20\" leftmargin=\"20\">";

    (#2): Loaded with Expression Web 4, via FTP, without FrontPage Extension on Linux/Apache server; this contains extra lines (double-line spacing).

    $adm_body = "<body bgcolor=\"white\" text=\"black\" link=\"blue\" ";

    $adm_body .= "alink=\"blue\" vlink=\"black\" marginheight=\"20\" ";

    $adm_body .= "marginwidth=\"20\" topmargin=\"20\" leftmargin=\"20\">";


    • Edited by Billy4Julie Monday, June 22, 2015 6:06 AM update
    Sunday, June 21, 2015 6:35 PM

All replies

  • Can you show an example of what you are talking about?   (EW doesn't "auto insert" stuff into files, in my experience, but it's hard to know what you are really describing.) And how are these files created, if not in EW?
    Sunday, June 21, 2015 9:19 PM
  • You do realize that when working in a html page that Enter always double spaces.
    For a single space you use Shift + Enter just like you do posting here.


    Expression Web MVP

    Sunday, June 21, 2015 11:19 PM
  • As Steve noted, when you are editing text in the design pane, "Enter" means "new paragraph," which automatically adds the default top/bottom paragraph margins. Using "Shift+Enter" means "new line," which does what it says, and no default margin settings are applied. This forum editor is an HTML editor similar to the design pane, and as Steve noted, you will see exactly the same behavior here if you try it.

    cheers,
    scott


    Please remember to "Mark as Answer" the responses that resolved your issue. It is common courtesy to recognize those who have helped you, and it also makes it easier for visitors to find the resolution later.

    Monday, June 22, 2015 3:11 AM
  • I'm pretty sure Steve and Scott have misunderstood your question, since you weren't talking about double spacing when you edited in Design View, but about opening existing files and what you see in Code View.

    It looks like that is some PHP code, but... where?  In what kind of file?   Simply putting those lines in a PHP file using an external text editor does not cause any extra lines to be inserted when it is opened in EW.   Ditto adding those lines in EW itself.  It makes me wonder what is really in your source files.  Are you sure there aren't extra newlines/line feeds in them?


    • Edited by KathyW2 Monday, June 22, 2015 5:05 PM
    Monday, June 22, 2015 5:00 PM
  • Nope! There are no newlines or line-feeds in my php source-code/files; but the problem also shows up in my htm and css files/source codes.  These pages/files have run very well, and still do; but last week, the hosting that I use - HostGator- removed the FrontPage Extensions on the server, so I'm no longer able to use FrontPage 2003 to login via http, so I decided to use Expression Web 4. It logs in nicely, via FTP, except for the extra lines in my source files, and for some reason, this prevents some of the files from behaving properly.  I tried using NetBeans, and it works fine without adding extra lines; but I'm really a Microsoft person, and would love to be able to use EW4 or such to do my programmings.  Thanks for your support. -- Billy.

    Tuesday, June 23, 2015 2:03 AM
  • Are you working on a full local copy of your site now that you can't use FPSEs? And then publishing the changes to the server?

    Explain exactly what you do to edit.

    And, as it says in the Forum FAQ--give us a link to the site so we can see everything working together, in situ. It will save a lot of time. Tell us exactly where the problems are and how how it should look.


    A horse walks into a bar. The bartender asks "Why the long face?"
    "Because I was born into servitude and when I die my hooves will be used to make glue."
    It was at this point that the bartender realized he would not be getting a tip.

    Tuesday, June 23, 2015 2:11 AM
  • Well, since EW *doesn't* add lines to any of my files, I can only assume there is something in your files that is not normal for the line endings/coding/whatever that your EW is expecting. There is no way for anyone to simply guess what is wrong with them.
    Tuesday, June 23, 2015 2:44 AM
  • Yep! not having FPSE on the server means I have to work on a local folder and then upload via FTP, which seems fine, sort of, but EW4 lets me login directly via FTP and edit on the server, which I prefer, very much like FrontPage 2003. The website runs fine, as long as I'm careful with the extra lines which also increase the file size.  The site is: www.CashPlum.com -- Thanks again. -- Billy.
    Tuesday, June 23, 2015 3:24 AM
  • When you edit by FTP, you are *not* editing on the server. You are downloading each page to your PC, editing it there using EW, and uploading it back up. (FTP: "File Transfer Protocol", not "File Editing Protocol").
    Tuesday, June 23, 2015 6:52 AM
  • Don't know if you have gotten your answer yet.  I was having the same issues on one computer but not on another one.  I discovered one of them was on ftp the other was sftp.  Changing to sftp got rid of the double spacing.
    Friday, April 8, 2016 1:57 PM
  • Or, you could simply stop deluding yourself that you are editing on the server, and edit your files locally, test in all major desktop and mobile browsers of interest, and publish your changes to the server when you're certain everything works everywhere.

    Here's the thing: As Kathy says, FTP is a file-level transfer protocol That is as granular as it gets, transferring a file at a time (in packets). Unlike FrontPage's FPSE, it is completely incapable of real-time editing of a remote file. That means that, also as Kathy noted, when you "live edit" a remote file in EW, EW is actually downloading the file, where you edit it, then when you "save" the file, it uploads it back to the server, replacing the original.

    By not following standard best practice, any errors or inconsistencies are immediately visible in your live site, plus, you have no local backup in case anything happens to the server. Very bad idea.

    But, suit yourself.

    cheers,
    scott


    Please remember to "Mark as Answer" the responses that resolved your issue. It is common courtesy to recognize those who have helped you, and it also makes it easier for visitors to find the resolution later.

    Saturday, April 9, 2016 2:11 AM
  • Did you get a solution for this?  We are having the same problem when we open some php files even though we have gone through and deleted the extra lines in the past.  Some files open OK, others put double and triple spacing in the code which makes it very difficult to edit although it seems to still work fine.
    Wednesday, August 29, 2018 7:36 PM
  • As we've said, EW doesn't add extra lines itself. If you are "editing live" over FTP, as another poster found, it was the ftp transfer that was doing something to the file lines that added extra lines. If not, something in your source file encoding is not standard to EW's understanding of line endings / line feeds.

    Kathleen Wilber
    BrightWillow - Asp.Net Applications

    Thursday, August 30, 2018 2:22 AM