Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
unnamedfeeling opened this issue Mar 10, 2020 · 3 comments

Comments

@unnamedfeeling
Copy link

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
Copy link
Contributor

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
Copy link

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants