Hardist
Hardist

Reputation: 1983

PhpStorm set all files / folders to brown background and weird structure

So I just noticed that my PhpStorm has set a background color to my project and also the structure is weird. All best explained by some screenshots.

This is how it is looking now, I cannot even see my App folder etc here:

enter image description here

After I click on Project in the top and then select Project Files, I can see my structure again like normal:

enter image description here

My question is, what does this mean and how can I set it "back to normal"? As for me, "normal" means the following:

enter image description here

I can see all my files in Project and also there is no brown background color.

What I have done so far, as suggested from Google searches, is:

  1. Close the project, remove it from recent projects and opening it again in PhpStorm.
  2. Removing the .idea folder and opening my project again.
  3. Reload All From Disk.
  4. Invalidate Caches.

P.S. This is a new Laravel project, with only some minor changes and all files added to git, and also just did one last commit. Nothing "fixes" this.

Upvotes: 7

Views: 1359

Answers (2)

gX.
gX.

Reputation: 952

I made a backup of the .idea folder when PHPStorm was closed, like the selected answer recommends, and then started PHPStorm. I then used Meld to track the differences in the 2 folders. In my case the [project-name].iml file was missing. Once I copied [project-name].iml from the new .idea to the original .idea everything worked fine and I didn't lose existing settings like database and debug configurations.

Updated answer thanks to Mostafa Asadi in the comments

Upvotes: 2

LazyOne
LazyOne

Reputation: 165088

This "yellowish" background means that the IDE treats those files/folders as excluded or not part of the project (i.e. outside of the project). This can be caused by some broken/out-of-sync project config file (for whatever reason, e.g. when making a project and there is incomplete .idea folder already / merge conflict etc).

Deleting .idea subfolder while IDE is closed and then reopening the project is enough to fix it (use "Open" and point to the project root folder and PhpStorm will make a new project from existing files).

Related forum thread/tickets:

Upvotes: 11

Related Questions