roots / sage

WordPress starter theme with Laravel Blade components and templates, Tailwind CSS, and a modern development workflow
https://roots.io/sage/
MIT License
12.77k stars 3.06k forks source link

Sage is incompatible with symbolic links : Unrecognized file extension #3140

Closed wavedeck closed 1 year ago

wavedeck commented 1 year ago

Version

10.6.0

What did you expect to happen?

I wanted to develop a theme using Sage, Acorn and symbolic links (ln -s PATH TARGET) to link the actual theme directory located in a different folder to the wp-content/themes directory (I'm not using bedrock, but i think this also applies there).

The theme should successfully load but it did not.

I resolved the issue by switching from a symbolic link to copying the theme inside of wp-content/themes but this is not a real fix and degrades the development experience and possibility to keep the theme's source separate of wordpress (e.g. no easy re-use on multiple wordpress installs)

What actually happens?

The theme did not load successfully and threw error:

InvalidArgumentException:
Unrecognized extension in file: /home/admin/htdocs/wpress.

  at /home/admin/dev/sage-theme/vendor/illuminate/view/Factory.php:305
  at Illuminate\View\Factory->getEngineFromPath('/home/admin/htdocs/wpress')
     (/home/admin/dev/sage-theme/vendor/illuminate/view/Factory.php:274)
  at Illuminate\View\Factory->viewInstance('/home/admin/htdocs/wpress', '/home/admin/htdocs/wpress', array())
     (/home/admin/dev/sage-theme/vendor/illuminate/view/Factory.php:122)
  at Illuminate\View\Factory->file('/home/admin/htdocs/wpress', array(), array())
     (/home/admin/dev/sage-theme/vendor/roots/acorn/src/Roots/helpers.php:99)
  at Roots\view('/home/admin/htdocs/wpress', array())
     (/home/admin/dev/sage-theme/vendor/roots/acorn/src/Roots/globals.php:13)
  at view('/home/admin/htdocs/wpress', array())
     (/home/admin/dev/sage-theme/index.php:14)
  at include('/home/admin/dev/sage-theme/index.php')
     (/home/admin/htdocs/wpress/wp-includes/template-loader.php:106)
  at require_once('/home/admin/htdocs/wpress/wp-includes/template-loader.php')
     (/home/admin/htdocs/wpress/wp-blog-header.php:19)
  at require('/home/admin/htdocs/wpress/wp-blog-header.php')
     (/home/admin/htdocs/wpress/index.php:17)

Steps to reproduce

Break:

Temp-Fix:

System info

Ubuntu Server 22.04 (happens on any other Linux / Unix / macOS, so it's platform independent) Wordpress optimized LAMP-Stack (not trellis) with Apache HTTPD and PHP FPM

Log output

No response

Please confirm this isn't a support request.

Yes

retlehs commented 1 year ago

Thanks for the report - tracking this issue on the Acorn repo: https://github.com/roots/acorn/issues/287