Cannot get PhpStorm to compare deployed files folder with local - phpstorm

Am following:
https://www.jetbrains.com/help/phpstorm/2016.3/comparing-deployed-files-and-folders-with-their-local-versions.html
I have my server setup in the remote host, and can see my directory, folders and files.
I would like to compare a whole folder on my local machine with what is on the server.
It works for individual files, but my developer has changed a whole load of files in the directory.
Please see screenshots.
I try and compare a directory from Remote host to the local server (see screenshot)
Says I failed to download the content of the file (...name of folder) - see screenshot
I try and compare one file (screenshot)
Works fine
How do I compare an entire folder, and see what has been changed?

As per official documentation from the link you have provided:
https://www.jetbrains.com/help/phpstorm/2016.3/comparing-deployed-files-and-folders-with-their-local-versions.html#d30440e104
Comparing a remote folder with its local version
Open the Remote Host tool window.
Select the folder in question. Then choose Tools | Deployment | Sync with Local on the main menu or Sync with local on the context menu of the selection.
In the Differences Viewer for Folders that opens, explore the differences and synchronize the files, where applicable.
The same but when invoked from Project View panel:
https://www.jetbrains.com/help/phpstorm/2016.3/comparing-deployed-files-and-folders-with-their-local-versions.html#d30440e154
Comparing a local folder with its remote version
This action is available only if you have a default server access configuration appointed.
Select the folder in question in the Project tool window, and then choose Tools | Deployment | Sync with Deployed to on the main menu.
In the Differences Viewer for Folders that opens, explore the differences and synchronize the files, where applicable.
In that Differences Viewer for Folders screen you can:
See a list of files with differences (or that do not exist of one of the sides) -- top part;
Choose any file and see the actual difference/compare them -- bottom part;
Also choose to upload/download such file(s) or merge them manually.
(screenshot from JetBrains website)

Related

PhpStorm How to open the folder containing files on remote host

I'm so tired of opening each folder to get where I need to go
Go to Folder Local: Ctrl + Shift + N -> Open File > Select Opened File
Go to Folder Remote Host: ????
Is there a way to find the folder containing the file in the fastest way on the remote host?
Go to Folder Remote Host: ???? Is there a way to find the folder containing the file in the fastest way on the remote host?
If you are asking: "I have some folder name and want to type/paste it somewhere and the IDE should select that folder in the Remote Host panel"... then the answer is No.
But if you want to navigate from a local location to a corresponding remote place -- then Yes.
This works for the currently opened/active file in the Editor .. or any folder or file currently selected in the Project View panel (should also work from other places where files are listed).
It's a 2-step shortcut... and the first part is already there, on your screenshot:
Alt+F1 (which is a shortcut for Navigate | Select In...). Then just select Remote Host (3) in the popup. So the full shortcut is Alt+F1, 3.
For example: me invoking the first part of the shortcut on a themes folder selected in the Project View panel.
NOTES:
It is required that you have a Deployment entry configured in your IDE and it should be selected as Default. The "Remote Host" option will be unavailable if you have no Default deployment entry.
Obviously, the deployment entry must be configured properly (the path mappings). I mean -- you should be able to upload/download files with no issues.
If there is no active connection to the remote host yet, then the action will fail mid way (will stop after showing the Remote Host panel and establishing the connection). In such a case just repeat the shortcut again.
The action will work just fine if the Remote Host panel is already visible and there is an active connection to the remote host.
A few Help Pages links:
https://www.jetbrains.com/help/phpstorm/navigating-through-the-source-code.html#navigate_in_project_view
https://www.jetbrains.com/help/phpstorm/tutorial-deployment-in-product.html#mapping-tab

Reconfigure each time - PhpStorrm

I am making all the settings of the PHPStorm software and when i reset, I set up FTP settings again every time and I can not see the last open files
For example, each time; Tools > Options > "Upload changed files automatically to the default server" .. I am setting this option every time.
I've never experienced this before.
What could be the reason for this?
Such problems may occur if the project is located on OneDrive; you can move .idea files to a local folder that is not part of OneDrive sync, keeping sources on OneDrive: create a new empty project in the preferred location on your local drive, and then link your source folder located on OneDrive to it by adding it as a content root in Settings | Directories, Add Content Root

css is not working after uploading the file on server with filezilla

css is not working after uploading the file on server with filezilla i added file permission 755 on server and even after that it's not working.
I have changed /web/assets/d01711d6/css/bootstrap.css.
css is not working after uploading the file on server with filezilla i added file permission 755 on server after that it's not working.
This may depend on several factors.
Cache
If the application is hosted it may be that it is a problem of the server cache so the new CSS file is read to the cache expiration (sometimes several days). In some cases the provider it provides configurations for enabling a temporary mode that disables this mode and promptly update the files.
Asset Management
Another factor is related to the fact that the directory where content assets are dynamically generated so not always the name of the directory in the development environment and the production server match. It is in these cases to find (looking for it) the actual directory used by the server and replace the file in the right place.
If, as the practice, changes to css file was made in the original directory and not on the copy of the file created by dynamically from asset management, one usually proceeds by eliminating the directory containing the assets of interest and the first subsequent invocation of the application (the URL / link) a new directory of assets is created for these files

Chrome Dev Tools - Workspace mapping mismatch

I have a remote webpage that loads a remote JavaScript file called script.js. I don't have immediate access to the remote filesystem to make changes to test something.
So I copy script.js to my local drive, and in Chrome Dev Tools I add my local folder to the workspace. Then I right-click on my remote script.js file and pick Map to File System Resource.... I pick my local script.js.
So now I would expect my locale changes to script.js to override the remote script.js, right? This way I can make some changes to my local script.js and when I reload the page I can see the changes being reflected on my page.
However in the Sources tab, when selecting my local script.js I see the warning at the top:
Workspace mapping mismatch
The content of this file on the file system:
file:///Users/me/test/script.js
does not match the loaded script:
http://someserver.com/js/script.js
Possible solutions are:
- Reload inspected page
- Check that your file and script are both loaded from the correct source and their contents match
So is this telling me that my local script.js needs to be exactly the same as the remote script.js? If so, then what is the point of the local resource?
Isn't it there so that you can make changes to it and see those changes reflected in the browser? If it has to match the remote file, then you must already have access to be able to edit the remote file, in which case you would be making your changes there and not on the local file. If that is the case, then what is the point of having the local resource mapped?
Am I missing something here? Is it not possible to make temporary local changes to a file in Chrome Dev Tools and have those changes be reflected when the page is reloaded? I thought that was the purpose of the Local File System Resources.
Workspaces is built to map the same file that's in file and served over the network. (like serving ~/code/app to localhost:8000).
It will not work for serving a local file as a replacement. There are some Chrome extensions for this, I recommend Flip the Script.

PhpStorm does not sync with the server

Here's the problem :
My project on phpStorm use a remote access to the server by FTP.
When I save a modified file, the file is uploaded normally to the serv, but when I create a folder on the serv, i don't see it in phpStorm.
Any idea?
PhpStorm is built around "local project files are the main ones -- deployed are secondary" idea. It's natural to have "automatically upload to remote host" (sync local with remote) functionality to follow such an idea.
At the same time the IDE does not have anything to "automatically sync remote with local" (the reverse: to automatically copy remote stuff back to local). Simply because it contradicts such an idea: local files are the main ones.
Therefore:
The "Synchronize" button that you are referring to does not do what you are expecting it to do. It syncs what the IDE knows about project files on a local file system. In other words: it checks if there were any changes to local files done outside of the IDE. It does not do anything with remote files.
NOTE: In modern 202x.x versions it has been renamed to "Reload All from Disk" to avoid such a confusion).
To manually sync with remote files (any direction) you have these main options:
Use Remote Host side panel (can be accessed via Tools | Deployment | Browse Remote Host if it’s closed/hidden) and download any files or folders manually (drag and drop can also be used, just make sure that you are copying files because by default IDE tries to "move" (copy+delete) instead of just "copy"). It has a "Refresh" button to refresh the remote location.
Use two-way synchronisation (with preview) accessible via right click on desired folder(s)/files and choosing Deployment | Synch with Deployed... where you can sync those files/folders both ways (by default newer stuff will override older regardless of the direction).
The IDE can automatically sync one way (from local to remote): just ensure that automatic deployment is enabled and you have one server (or a group) marked as Default for this project.
Settings (Preferences on macOS) | Build, Execution, Deployment | Deployment | Options | Upload changed files automatically to the default server is the option. Check other options there to better suit your needs.
Please refer to the official help pages for more info on deployment (including a simple video tutorial): https://www.jetbrains.com/help/phpstorm/deploying-applications.html
And the funny thing about it, it is not completly correct. The option underneath is missing.. 'skip external changes' should not be ticked.
In Mac -> PHPStorm -> preferences -> Build, Execution, Deployment -> options
Set the Upload as seen in the picture to always and make sure skip external changes is unticked.
It works for me in PhpStorm 2020.1