This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 237253 - FTP upload on run does not check modified files in folders
Summary: FTP upload on run does not check modified files in folders
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: FTP Support (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal with 3 votes (vote)
Assignee: Tomas Mysik
URL:
Keywords:
: 237176 237394 237589 240766 249076 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-10-17 13:28 UTC by mmolda
Modified: 2015-12-03 07:03 UTC (History)
11 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Modified files inside folders are not selected (140.18 KB, image/png)
2013-10-17 13:28 UTC, mmolda
Details
Screenshot of Upload window (33.60 KB, image/png)
2013-10-24 13:45 UTC, mmolda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mmolda 2013-10-17 13:28:42 UTC
Created attachment 141209 [details]
Modified files inside folders are not selected

1. Create new PHP Application from Remote Server.
2. On last step (4. Confirmation) let NetBeans download all source files.
3. In Project Properties - Run Configuration set Upload files: On run.
4. Run project - All files are selected, click Upload. Wait while all files are uploaded.
5. Edit some source file in project source files root directory (e.g. index.php).
6. Edit some source file in some folder (e.g. views/test.php).
7. Hit Run project again
8. Only the files under the root directory are selected for upload. The files inside folders are not selected (looking in the Remote output and also on FTP server, only index.php is loaded).

Product Version: NetBeans IDE Dev (Build 201310170001)
Java: 1.7.0_45; Java HotSpot(TM) Client VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Windows 7 version 6.1 running on x86; Cp1250; en_US (nb)
Comment 1 Tomas Mysik 2013-10-18 05:11:53 UTC
This is very likely caused by children fetching lazily (now, both remote and local children are fetched only on demand, not always as it used to be). Hard to say what can be done here, likely nothing, sorry :/

But I will try to look at it.
Comment 2 Tomas Mysik 2013-10-21 08:14:37 UTC
*** Bug 237394 has been marked as a duplicate of this bug. ***
Comment 3 RedOctober1982 2013-10-21 08:38:22 UTC
(In reply to Tomas Mysik from comment #1)
> This is very likely caused by children fetching lazily (now, both remote and
> local children are fetched only on demand, not always as it used to be).
> Hard to say what can be done here, likely nothing, sorry :/
> 
> But I will try to look at it.

Actually, it is very inconvenient to users. The files in subdirectories are changing quite often, and it's inconvenient to track changes manually. Besides, in 7.3 it worked great.
Comment 4 Tomas Mysik 2013-10-21 09:07:54 UTC
(In reply to RedOctober1982 from comment #3)
> Besides, in 7.3 it worked great.

Unfortunately, it did not. There were many slowness reports for big projects :/ But in the development version of NetBeans, there is a possibility to synchronize _folders_ (not only the whole project) - you can give it a try if you want.

Thanks.
Comment 5 mmolda 2013-10-24 13:36:00 UTC
*** Bug 237589 has been marked as a duplicate of this bug. ***
Comment 6 mmolda 2013-10-24 13:45:32 UTC
Created attachment 141522 [details]
Screenshot of Upload window

@tmysik: Tomasi, don't know if it will help, but:

1. Say I have project with folder Test with subfolder Subtest.
2. In Subtest I have 4 files: A.php, B.php, C.php, D.php
3. I modify B.php and Run Project
4. Upload window is shown. 0 files are selected.
5. I expand Test folder, still 0 files are selected.
6. I expand Subtest folder, now file B.php and all files below B.php (C.php and D.php are also selected)
Comment 7 steeltoad 2013-10-24 14:11:03 UTC
(In reply to mmolda from comment #5)
> *** Bug 237589 has been marked as a duplicate of this bug. ***

I'm experiencing the same issue, project was functioning correctly in 7.3, and I was working on a .php in a project subfolder. Upgraded to 7.4 and the same file is not selected for upload, but modified files in the main project folder are selected and update correctly

In Addition, The any attempt to select the subfolder in the Upload window automatically selects the folder and all of it's files
Comment 8 omeyer 2013-10-26 09:57:55 UTC
This new behavior is totally annoying - which developer has all files for his projects in the project-root? Please change the behavior back to the way it worked in v7.3.
Comment 9 iosolinf 2013-10-27 13:26:14 UTC
The same happens in Netbeans 7.4 for Mac
Comment 10 BrendanTWhite 2013-10-31 05:24:15 UTC
(In reply to Tomas Mysik from comment #4)
> (In reply to RedOctober1982 from comment #3)
> > Besides, in 7.3 it worked great.
> 
> Unfortunately, it did not. There were many slowness reports for big projects
> :/ (snip)

I haven't worked on any particularly large projects so I can't comment, but I'd suggest that in this instance (ie copying changed files to the server were they are to run) it'd be better to have them actually copy, without the programmer needing to memorise what has changed and then go hunting to tick them, even if it is slow.


> (snip) But in the development version of NetBeans, there is a possibility to
> synchronize _folders_ (not only the whole project) - you can give it a try
> if you want.

I can see that this might be an option for teams where each developer only works on a small subsection of a project. However for one-person shops or small teams, each person works on all areas of a project, so selecting just one directory to upload isn't going to fix the problem.

...unless you can synchronise folders *and their subfolders*? If so, can we choose to synchronise all the top-level folders, and have their sub-folders also synchronise too? That might work ... 

We'd need to remember to tick all top-level folders for synchronisation, and we'd need to remember to tick any new top-level folders if any new ones are created, but that'd be a fairly small price to pay to have Netbeans automatically copying the right files at the right time again.
Comment 11 Tomas Mysik 2013-10-31 06:04:31 UTC
(In reply to BrendanTWhite from comment #10)
> ...unless you can synchronise folders *and their subfolders*?

Sure.

> We'd need to remember to tick all top-level folders for synchronisation, and
> we'd need to remember to tick any new top-level folders if any new ones are
> created

Not true. Simply download a dev version of NetBeans, open your project and choose Synchronize... on any folder - and you will see ;)

Thanks.
Comment 12 BrendanTWhite 2013-10-31 06:40:58 UTC
(In reply to Tomas Mysik from comment #11)
> (In reply to BrendanTWhite from comment #10)
> > ...unless you can synchronise folders *and their subfolders*?
> 
> Sure.

Cool - I'll give it a try.

> > We'd need to remember to tick all top-level folders for synchronisation (snip)
> 
> Not true. Simply download a dev version of NetBeans, open your project and
> choose Synchronize... on any folder - and you will see ;)

Brilliant - I'll give it a go. Thanks for the update.  :-)
Comment 13 mediacept 2013-11-20 10:21:25 UTC
I'm experiencing the same issue, does not upload changed files in project's subdirectories.
Comment 14 Tomas Mysik 2013-11-26 12:32:20 UTC
*** Bug 237176 has been marked as a duplicate of this bug. ***
Comment 15 Tomas Mysik 2013-11-26 13:07:53 UTC
So, I have added a property for it (reasons why property are explained in my previous comments). Now, if NetBeans (latest dev build, of course) is started from command line with:

-J-Dnb.php.remote.localFiles.eager=true

property, all local files are fetched and newer files are correctly preselected.

A few notes:
- there can be "slowness detected" problems with it - please, do not report them since the cause is this property/change;
- the UI does not properly selects parent folders of the newer files - the newer files themselves are properly preselected and also info message saying e.g. "1 files (or more) selected" is correct.

Please note that as I already wrote, remote synchronization now works for directories and is definitely and strongly preferred.

Thanks for reporting.

http://hg.netbeans.org/web-main/rev/0263903c23f6
Comment 16 steeltoad 2013-11-27 01:36:40 UTC
Why is restoration of previously functionality added as a *new* property?
Comment 17 Quality Engineering 2013-11-27 02:37:32 UTC
Integrated into 'main-silver', will be available in build *201311270002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/0263903c23f6
User: Tomas Mysik <tmysik@netbeans.org>
Log: #237253 - FTP upload on run does not check modified files in folders
Comment 18 Tomas Mysik 2013-11-27 06:47:41 UTC
(In reply to steeltoad from comment #16)
> Why is restoration of previously functionality added as a *new* property?

Because now, the remote synchronization is preferred. This is the way how to get back to the old behaviour.

Thanks.
Comment 19 steeltoad 2013-11-27 17:02:40 UTC
Wait,  so a perfectly functioning process was replaced with one that's admittedly not reliable.

This just can't be right. Remote synchronization is a great option, but it should be just that, an option. From what I can gather (it's difficult to find documentation on the remote synchronization) it was added to ver 7.2 ftp was functioning correctly through ver 7.3

Surely something as base as knowing which files need to be uploaded for a project shouldn't need a special option.
Comment 20 Tomas Mysik 2013-11-28 06:16:58 UTC
(In reply to steeltoad from comment #19)
> Wait,  so a perfectly functioning process

Not true, already explained in my previous comments.

BTW I am not sure what is the problem with using a property...
Comment 21 steeltoad 2013-11-28 07:29:00 UTC
> > Wait,  so a perfectly functioning process
> 
> Not true, already explained in my previous comments.

This issue did NOT occur in 7.3 or any previous versions. "Perfectly" may be an overstatement, lets say previously functioning without any issues.

Could you please point to some documentation on how the syncronization is supposed to work, it's not exactly easy to find on a site search.

> BTW I am not sure what is the problem with using a property...

Problem ? No, it seems an unnecessary inconvenience to have to specifically instruct the program to do something that should be most basic functionality. Just like I don't have a switch on my car that I have to keep set so that it doesn't veer off the road.

Is there any chance that we'll at least see this command line setting make it into a configuration option in the near future ?

>Because now, the remote synchronization is preferred

What I'd prefer is that the IDE running on my pc be able to know what files on my pc need to be uploaded to my server when they've been changed.
Comment 22 Tomas Mysik 2013-11-28 07:48:26 UTC
(In reply to steeltoad from comment #21)
> This issue did NOT occur in 7.3 or any previous versions. "Perfectly" may be
> an overstatement, lets say previously functioning without any issues.

Well, this issue could have been resolved as INVALID saying "use remote synchronization"; this did not happen, we have provided a way how to continue using this functionality even if there are problems with it, especially for large projects or slow filesystems.

> Could you please point to some documentation on how the syncronization is
> supposed to work, it's not exactly easy to find on a site search.

Not sure about any official documentation but you can find some info on our blog [1][2].

> Is there any chance that we'll at least see this command line setting make
> it into a configuration option in the near future ?

Sorry, not sure what you mean - anyone can use it in the development version of NetBeans today.

Thanks.
[1] https://blogs.oracle.com/netbeansphp/entry/remote_synchronization1
[2] https://blogs.oracle.com/netbeansphp/entry/new_ui_for_remote_synchronization
Comment 23 mediacept 2013-11-28 08:26:50 UTC
steeltoad@netbeans.org Saied:
This just can't be right. Remote synchronization is a great option, but it should be just that, an option. From what I can gather (it's difficult to find documentation on the remote synchronization) it was added to ver 7.2 ftp was functioning correctly through ver 7.3


Is the Netbeans team continuing to listen to the community and  gives enough importance to its requests. 
That is the question.
Comment 24 steeltoad 2013-11-30 21:51:44 UTC
>> Well, this issue could have been resolved as INVALID saying "use remote
synchronization"; this did not happen, we have provided a way how to continue
using this functionality even if there are problems with it, especially for
large projects or slow filesystems.

I sense a bit of exasperation in the tone of this reply. I'm not trying to be obstinate or intentionally obtuse. I honestly cannot see how this isn't seen as a real problem

>> Well, this issue could have been resolved as INVALID saying "use remote synchronization"

And what about the people who don't want to use synchronization and want to use the ftp, especially as it occurs automatically when you run your project. I would hardly call people who want to use the default option in Netbeans as 'INVALID'. 

>> we have provided a way how to continue using this functionality even if there are problems with it

You are providing a solution with problems where no problem previously existed.

>> especially for large projects or slow filesystems.

That may be convenient for some people but those are not my issues.

>> Not sure about any official documentation but you can find some info on our blog [1][2].

If you're going to be replacing part of the functionality of Netbeans it would be nice to have more information than a couple of blog posts.

>>> Is there any chance that we'll at least see this command line setting make it into a configuration option in the near future ?
>> Sorry, not sure what you mean - anyone can use it in the development version of NetBeans today.

I meant a setting under Tools-Options rather than a command line option necessary to tell Netbeans to function properly.

>> (blog) Please notice that the remote synchronization works better only on the whole project (it means that the Source Files must be selected). 

The entire point of this specific bug report is for when you want to update a few files in subfolders not the whole project.

>> (blog) (more files can be selected at once) but the suggested operation (download, upload etc.) does not work so precisely

Yes, this imprecise problem has migrated from synchronization to the ftp upload.

>> (blog) Also please notice that the suggested operations are not 100% reliable since the timestamps provided by FTP servers are not exact.

I would (and I'm sure others would) prefer something reliable like the ftp process was.

>> (blog) As you can see, NetBeans tries to suggest you operations (upload, download etc.) which should be done for each individual file of your project. If you are interested only in some particular changes, you can simply filter the list

I do not want to filter out the list, nor do I want Netbeans to suggest operations. 

>> (blog) Since we have a file conflict, we need to resolve it first. Fortunately this is very easy because we just select the desired file and click the Diff button

Again I don't want to resolve conflicts (that's why I use Netbeans) I want to upload what I've changed, that is all.

>> The remote version of our file is downloaded and compared with the local version

I don't want to download the other files in the project just to upload the few that I've changed. I don't want to compare the contents and have Netbeans synchronize them. It may very well be that there are other people working on other source files in the project that I don't want to have downloaded.


Synchronization may be very useful to some, I can think of other instances where something like it would have been useful. Synchronization should be an option, a different way of updating remote files, but as a separate option it should not interfere with FTP. 

If I've modified a file in my project root and one in a subfolder or two, I can either synchronize the whole project, or synchronize the folders/files individually, in either case I have to remember what files to check and make sure they get sent and what is coming back that I don't want. 

With synchronizing, I have to download the remote files (waste of time) and if I remember something to change in the synchronization process, I have to exit and download them again. I don't want to do this. I simply want Netbeans to look at what files I've changed and push them to the server, just as it always has, just that and nothing more.

The Status of this bug should not be RESOLVED FIXED at all. What has happened is that one perfectly functioning method of uploading files has been replaced with two unreliable methods of uploading files.

Finally, it appears in looking back through the replies on this topic that there is a lack of communication (I'm not ruling myself out as the cause) Is it possible that somebody else from the Netbeans team could look into this matter and provide a fresh perspective ?
Comment 25 mmolda 2013-12-04 13:06:09 UTC
Tomasi, if i run netbeans with command line switch

-J-Dnb.php.remote.localFiles.eager=true

there is still the problem I described in comment 6 :(

Product Version: NetBeans IDE Dev (Build 201312040002)
Java: 1.7.0_45; Java HotSpot(TM) Client VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Windows 7 version 6.1 running on x86; Cp1250; en_US (nb)
Comment 26 Tomas Mysik 2013-12-04 13:08:12 UTC
OK, I will have a look at it. Thanks.
Comment 27 Tomas Mysik 2013-12-12 12:59:36 UTC
Should be fixed now , for both upload and download.

Properties:
- for download: nb.php.remote.remoteFiles.eager
- for upload: nb.php.remote.localFiles.eager
- for both download & upload: nb.php.remote.files.eager

Please note that the UI is not correct - checkboxes are not checked properly but the info message is OK (this will not be fixed because this is unofficial feature ;). This can be easily verified by selecting Download/Upload action and simply immediate clicking OK button.

Thanks.

http://hg.netbeans.org/web-main/rev/c240b33f0281
Comment 28 Tomas Mysik 2014-01-22 06:44:49 UTC
*** Bug 240766 has been marked as a duplicate of this bug. ***
Comment 29 Jonsbe 2014-04-26 10:31:48 UTC
The same problem still exists with the newest Netbeans IDE 7.4 and 8.0-version on Mac OS X (Mavericks). Netbeans IDE 7.4 doesn't autoselect modified files in the folders and Netbeans IDE 8.0 doesn't autoselect any modified files - the problem is not only with UI. I have also tried to synchronize the folders but it doesn't help.
Comment 30 Tomas Mysik 2014-04-28 05:22:01 UTC
@Jonsbe: Have you read this issue, please? Apparently not so please do not reopen it, there is no reason for it.

Thanks.
Comment 31 findyourcloud 2014-05-26 09:15:34 UTC
Could someone please summarize the steps HOT to get the 7.3 and lower FTP functionality back??

I have read this and do not understand what I am supposed to do to resolve this. 

What was settled? Command line addition? Actually fixed? Fixed but hidden with configuration changes? If so what files where need hand editing?

Thanks in advance.
Comment 32 Tomas Mysik 2014-05-26 09:20:40 UTC
@findyourcloud: Please, do not reopen fixed issue. Thanks.

See comment 27: use any of the properties mentioned there - run NB from command line and provide the property. See comment 15 for more information.

Thanks.
Comment 33 Tomas Mysik 2014-12-03 09:19:32 UTC
*** Bug 249076 has been marked as a duplicate of this bug. ***
Comment 34 Tomas Mysik 2014-12-04 06:47:00 UTC
*** Bug 249076 has been marked as a duplicate of this bug. ***
Comment 35 fretelweb 2015-12-02 17:57:13 UTC
Coul it has an option to only upload the web root so I can keep only the public_html sync
Comment 36 Tomas Mysik 2015-12-03 07:03:28 UTC
Please, do not reopen FIXED issue. Simply report a new one. Thanks.