MWDelaney / sage-acf-wp-blocks

Composer library for generating ACF Gutenberg blocks from templates. Intended for use with Roots/Sage (http://roots.io)
346 stars 66 forks source link

Camel case names will not work on linux but will work on windows environment #39

Open unnamedfeeling opened 4 years ago

unnamedfeeling commented 4 years ago

My problem: When I create a block according to instructions it will work correctly on my local environment (Win10 + php 7.2 + Mariadb 10.1 + WP 5.3.2 + Sage 9.x + ACF Pro 5.8.7) and will render correctly render without any errors. But when I upload the code to my dev server it will throw an error: Fatal error: Uncaught InvalidArgumentException: View [blocks.parallaxblock] not found. in /var/www/***/htdocs/wp-content/themes/mytheme/vendor/illuminate/view/FileViewFinder.php:137 Stack trace: #0 /var/www/***/htdocs/wp-content/themes/mytheme/vendor/illuminate/view/FileViewFinder.php(79): Illuminate\View\FileViewFinder->findInPaths('blocks.parallax...', Array) #1 /var/www/***/htdocs/wp-content/themes/mytheme/vendor/illuminate/view/Factory.php(128): Illuminate\View\FileViewFinder->find('blocks.parallax...') #2 [internal function]: Illuminate\View\Factory->make('blocks.parallax...', Array, Array) #3 /var/www/***/htdocs/wp-content/themes/mytheme/vendor/roots/sage-lib/Template/Blade.php(138): call_user_func_array(Array, Array) #4 /var/www/*** in /var/www/***/htdocs/wp-content/themes/mytheme/vendor/illuminate/view/FileViewFinder.php on line 137

My research: I have named my block template files in camelCase. When I rename templates to lowercase it will work correctly.

My (temporary) fix: Don`t name template files in camelcase.

Is it possible to fix this one?

robmeijerink commented 4 years ago

Hmm I don't know what could be causing this.

I don't have any issues on MacOS or Ubuntu Linux using blockCamelCase.blade.php or BlockPascalCase.blade.php.

pepijn-vanvlaanderen commented 3 years ago

Having the same issue, all lowercase seems to be the solution for now. The problem seems to occur after you saved a block once, after that when you try to update the block again it does not update anymore and sometimes the block disappears totally.

AlexGach commented 3 years ago

+1 Camel case was the problem for me, changing to middle dash solved it