Skip to main content
July 15, 2021
Answered

Visible code is not the actual code, maybe in conjunction with GIT or copy/paste

  • July 15, 2021
  • 3 replies
  • 801 views

Today I encountered something really strange. I use the latest version of Dreamweaver with Windows 10 and edited a PHP file. I connected my DW site with a GIT repository, maybe this is relevant.

 

I viewed my code (developer view) and tried to copy a single word and paste it to another place. But it did not work. It seemed like copy & paste simply does not work. But then I realized I copied something else to the clipboard, not the selected word.

 

Then I closed the document, which had clean code, and reopened it and it was total chaos. Everything I copy/pasted or just wrote in the last 30 minutes was somewhere in the document, but nothing where it should be or was visible before I closed the document.

 

So maybe for 30 minutes I edited a document which did not exists the way I saw it.

 

I said it could be related to GIT, because by activating/using this, any changes are documented and can be viewed in the code window. So maybe DW does not know which code is currently edited.

 

Has anybody had this problem before? I think I cannot reproduce it, but maybe it will happen again.

    This topic has been closed for replies.
    Correct answer Nancy OShea

    @17526090,

    This is a user-to-user community, not support.  Quite honestly, I've never seen this reported before. So it could be just a one-off glitch.  Unless it's repeatable, there's nothing much Adobe engineers can do.

     

    In any event, feel free to submit your feedback directly to the development team on UserVoice or by clicking DW Help > Submit Bug/Feature request.  

    https://helpx.adobe.com/x-productkb/global/how-to-user-voice.html

     

    3 replies

    Legend
    July 16, 2021

    The only problem I've observed with GIT in Dreamweaver is if you have a large number of staged files, Dreamweaver starts to become very slow and does some glitchy things .... Try doing a commit + push  and see if that helps ...

    Paul-M - Community Expert
    July 16, 2021

    The number of files is quite low at the moment, because the project is in the starting phase. I do a commit and push every evening. At this moment I'm not sure whether GIT has to do with my problem (as I said), but maybe it has to to with it, because you say "does some glitchy things".

     

    But DW is not slow at all (at least not because of GIT).

     

     

    BenPleysier
    Community Expert
    Community Expert
    July 15, 2021

    Why are you using GIT?

    Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
    July 16, 2021

    I don't know what answer you expect to this question. You could also ask "Why are you using Dreamweaver?".

     

    The answer is: Because I can and because I want to. Or: Why not?

     

    Sorry if this anwer seems rude to you, but again: What should I answer to this?

    BenPleysier
    Community Expert
    Community Expert
    July 19, 2021

    A sensible answer would have sufficed. like

     

    1. I work with others on the project and want to eliminate the risk of conflicting code.

    2. I want to be able to back up the code in a central place

    3. I want to be able to roll back to a previous version

    4. My team members want to create their own separate branches.

    5. Et cetera.

     

    The reason for my question was purely to make you think about what you are doing..But I guess you are King and I should apologise for daring to ask the question. Good luck.

    Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
    Nancy OShea
    Community Expert
    Community Expert
    July 15, 2021

    Forgive the obvious question but did you Save the PHP file to your local hard drive before closing DW?

    Can you open the PHP file in another plain text/code editor to check it?

     

    Nancy O'Shea— Product User & Community Expert
    July 16, 2021

    Yes, I'm 100% sure/I know that I saved the file to my local hard drive. Now the content is OK, of course, because I corrected it yesterday. But even if I would not have saved it correctly, the behaviour I saw should not happen. I will make a simple example of what I experienced (really only a example, I cannot  remember all steps and the exact code is too long and (I guess) not the problem).

     

    1.) I wrote a code, let's say:

    <?php

    if (isset($var)) {

    echo 'hello world';

    }

    ?>

     

    2.) I pushed it to GIT, closed DW.

     

    3.) On the next day I opened the document again, marked $var and copy/pasted (Ctrl-C/V) it over "'hello world'". It did not work, the code was not pasted (tried it several times). So I manually did it and also added the line "echo 'hi';". The code was fine in the code view:

     

    <?php

    if (isset($var)) {

    echo $var;

    echo 'hi';

    }

    ?>

     

    4.) I closed the document and opened it again immediately and saw something like this:

     

    <?php

    if $var$var$var$var(isset($var)) {

    echo 'hello world';

    }

    ?>

    echo 'hi';

     

    I think this describes the chaos I got. Again, this is only an example and NOT an instruction how to reproduce it. I only want to make clear what I mean.

    Nancy OShea
    Community Expert
    Nancy OSheaCommunity ExpertCorrect answer
    Community Expert
    July 16, 2021

    @17526090,

    This is a user-to-user community, not support.  Quite honestly, I've never seen this reported before. So it could be just a one-off glitch.  Unless it's repeatable, there's nothing much Adobe engineers can do.

     

    In any event, feel free to submit your feedback directly to the development team on UserVoice or by clicking DW Help > Submit Bug/Feature request.  

    https://helpx.adobe.com/x-productkb/global/how-to-user-voice.html

     

    Nancy O'Shea— Product User & Community Expert