Closed stoyanoff2020 closed 1 year ago
I got the same - let's hope the pro version is out soon so this version can get some love :)
looks like there is a @ too much in /vendor/brackets/admin-generator/resources/views/templates/admin-user/form.blade.php
line 85 and line 99
Guys, I had only couple of minutes so I did a quick look. I don't think you're right. Double @@
is on purpose - the idea was that generator will generate the form.blade.php file for a model (during installation for admin-user) and if such model has a JSONB column, we treat is as a translatable column, so we need to generate the foreach code. But if installation breaks for you, then I guess something is wrong, but it's not it I think.
Can you provide info:
We have to dive deeper into it.
Thanks for the reply. Installation that triggers that alert is made on fresh new project by running step by step (couple of times :-) ) as described on the website. https://getcraftable.com/docs/7.0/installation I'm comfortable with Laravel, Sail and so on. Installation is running ok, selecting mysql, all dependancies are installed, then when starting generate admin part it fails with the error stated above.
Same here.
Clean installed sail (pgsql) with breeze.
And me - same error. If I remove the lines mentioned above (85 to 99 in /vendor/brackets/admin-generator/resources/views/templates/admin-user/form.blade.php) and then run craftable install, it completes. Clearly that's not a solution going forward though.
I am also getting the same error. I first tried installing craftable on a new Laravel 9 project using sail (MariaDB, Redis, and mail pit). I then deleted the project and utilized craftable to create a new project from scratch. Both scenarios ended up with the same result and error.
Package brackets/admin-auth installed
INFO Nothing to migrate.
Deleting previous files finished.
Generating App\Http\Controllers\Admin\AdminUsersController finished
Generating App\Http\Requests\Admin\AdminUser\IndexAdminUser finished
Generating App\Http\Requests\Admin\AdminUser\StoreAdminUser finished
Generating App\Http\Requests\Admin\AdminUser\UpdateAdminUser finished
Generating App\Http\Requests\Admin\AdminUser\DestroyAdminUser finished
Generating App\Http\Requests\Admin\AdminUser\ImpersonalLoginAdminUser finished
Generating /var/www/html/resources/views/admin/admin-user/index.blade.php finished
Generating /var/www/html/resources/js/admin/admin-user/Listing.js finished
Appending Listing to /var/www/html/resources/js/admin/admin-user/index.js finished
In 588e9d47f217c8dfeb09f354d0e4e48bf8a92abc.php line 99:
syntax error, unexpected token "endforeach", expecting "elseif" or "else" or "endif" (View: /var/www/html/vendor/bra
ckets/admin-generator/resources/views/templates/admin-user/form.blade.php)
In 588e9d47f217c8dfeb09f354d0e4e48bf8a92abc.php line 99:
syntax error, unexpected token "endforeach", expecting "elseif" or "else" or "endif"
Aborted.
Okay, I have reported an issue to the laravel, as long as they probably broke it with one of those latest releases: https://github.com/laravel/framework/issues/45915
Anyway, I fixed it in our package by using different approach: https://github.com/BRACKETS-by-TRIAD/admin-generator/commit/63099d773acdcb0139fde5d8537c5b1117d0aac2
let's hope the pro version is out soon
Got this end of install 3 times. Checked file form.blade.php in Github repo (This one: https://github.com/BRACKETS-by-TRIAD/admin-generator/blob/master/resources/views/templates/admin-user/form.blade.php) and it seems really have one additional '@' at line 99?
Please check and correct me if I'm wrong.
The error I get: