incorrectly detecting some plugins as Local Development
-
4min video if you could review: https://share.getcloudapp.com/OAuBgAYn
-
Clifford,
Thanks for the video. I’m not certain that search as you did in the Finder will identify hidden files/folders.
In the Finder use the
Command-Shift-.command to toggle the view for hidden files/folders. Please let me know what you find.Andy
Also, plugins/themes that have a vcs directory are not saved anywhere. They are determined at runtime and passed in the
Initclass constructor to the other class constructors.PhpStorm and Finder both show hidden files on my system. Really flabbergasted about why this is happening. It’s like it’s cached but like you said it’s not. So weird.
Here’s a GIF showing no .git in the plugin folder even though appearing as such: https://share.getcloudapp.com/X6uoey0e
Is there a mu-plugin or something else that is loading the plugins in the
_temp-gitdirectory?Nope. And even removing that directory out of WP has the same result.
Obviously you haven’t had report of this before so I will dig further myself. No worries. I’ll report back if/when I find out.
Thanks, mate!
No I haven’t had this report before. I’m trying to re-create locally but I don’t seem to be able to. I did find another error to fix though 😉
Can you step through the code in
Init::get_vcs_checkouts()and see if you can figure it out from there?https://github.com/afragen/local-development/blob/develop/src/Local_Development/Init.php#L55-L76
-
This reply was modified 5 years, 11 months ago by
Andy Fragen.
7min video without success but maybe your more familiar eyes will see something of importance: https://share.getcloudapp.com/mXuArE4y
Thanks Clifford.
The
-1is the when the plugin is under VCS and the checkmark automatically appears and is not modifiable.What I’m really curious about are the valued from the following line.
When that line and
$is_vcsevaluates totruethe saved value in$configwill be-1, if false it won’t be in the $config unless it was checked in the Settings prefs. It is worthwhile to see what the value of$configis passed to the function.The question I have is why does this seem to evaluate to true on your system? It should only evaluate to true if there is a VCS directory in the specific plugin’s root directory.
Keep the videos coming. They are helpful.
There is no entry in
$configfor non-VCS plugins/themes.Thanks for sticking with me on this.
I figured it out: the Settings correctly got saved with Event Tickets, for example, as a -1 (has VCS), then I replaced the Event Tickets folder in-place where it is the final release/zip version, no longer the VCS version. And the Local Development plugin had already saved its site options so just keeps returning its value.
Therefore, I’d recommend updating the code to use a transient or otherwise only store the manual checkboxes not the detected checkboxes.
6min demo: https://share.getcloudapp.com/z8u8Oxq4
Well, I’m glad it’s sorted out. Only the manually checked options are saved, not the VCS checks. It seems from the video that something cleared after you check the additional plugin to test and saved the settings.
I wonder if previously there was something saved that didn’t clear when upon exchanged a VCS for a non-VCS folder or vice versa. There isn’t a way in the code to store the VCS data.
OK, maybe I checked them in the past at a time I had swapped out VCS with non. Thanks again for working through this with me. Really appreciate you!
Anytime Clifford. I appreciate all the Modern Tribe peeps. 😉
👍 likewise
@cliffpaulick I just added a function in the
developbranch that should remove any options that haven’t been manually checked. Hopefully this will solve the issue you had just by re-saving Settings. -
This reply was modified 5 years, 11 months ago by
The topic ‘incorrectly detecting some plugins as Local Development’ is closed to new replies.