WordPress can't find changed files for a few seconds


I have a very strange issue that doesn’t look like a PHP issue but it might rather be something with Vagrant/Trellis and file syncing.

When I change a .php file, it will either throw a Warning: include(): Filename cannot be empty in /srv/www/mysite.dev/current/web/wp/wp-includes/template-loader.php or just display blank space if it is included with get_template_part(). Sometimes it will display the change/modification ASAP without throwing the error (50-50 chance). If the error is thrown, I have to click around for a while and refresh the page a few times for the error/blank space to go away and the content to appear.

Hey, check out Ben’s post here. This is likely a problem with WordPress 4.9.

Hi @MWDelaney, thanks for checking it out. The development site I am working on isn’t running 4.9, but rather 4.8.3. I’ve tried clearing the transients anyway and it doesn’t make a difference. This has just started happening recently and has been a problem on all my Trellis sites. I’ve tried vagrant destroy and vagrant up and it doesn’t help either.

This happens on every php page I edit.

The issue is apparently with the IDE I am using (PHPStorm - IntelliJ). This is not happening when files are edited through Sublime for example. I will issue a support ticket there.