Laravel-Backpack / community-forum

A workspace to discuss improvement and feature ideas, before they're actually implemented.
28 stars 0 forks source link

[Bug] Changing register.blade.php is not working #766

Closed not82 closed 10 months ago

not82 commented 10 months ago

Bug report

What I did

I want to change default register.blade.php , nothing more than the view So with the doc ( https://backpackforlaravel.com/docs/6.x/base-how-to#add-one-or-more-fields-to-the-register-form-1, step 3 ) I know I have to create a view in : resources/views/vendor/backpack/ui/auth/register.blade.php

What I expected to happen

When I go to /admin/register , I should have my replaced view This was working perfectly in 4.1

What happened

It's still the default view included in backpack

What I've already tried to fix it

Tried to change the theme with coreuiv2, still doesn't work Tried to implement fully a new RegisterController, still doesn't work Tries to put in the "old 4.1" place : resources/views/vendor/backpack/base/auth/register.blade.php, still doesn't work

Is it a bug in the latest version of Backpack?

After I run composer update backpack/crud the bug... is it still there?

Yes

Backpack, Laravel, PHP, DB version

When I run php artisan backpack:version the output is:

PHP VERSION:

PHP 8.1.26 (cli) (built: Nov 22 2023 10:01:32) (ZTS Visual C++ 2019 x64) Copyright (c) The PHP Group Zend Engine v4.1.26, Copyright (c) Zend Technologies with Zend OPcache v8.1.26, Copyright (c), by Zend Technologies with Xdebug v3.2.2, Copyright (c) 2002-2023, by Derick Rethans

LARAVEL VERSION:

10.34.1.0

BACKPACK PACKAGE VERSIONS:

backpack/basset: 1.2.2 backpack/crud: 6.3.2 backpack/devtools: 3.0.4 backpack/editable-columns: 3.0.2 backpack/generators: v4.0.2 backpack/pro: 2.0.18 backpack/theme-coreuiv2: 1.2.2 backpack/theme-tabler: 1.1.1

not82 commented 10 months ago

Ok finally got it to work, the correct path to put the view is :

resources/views/vendor/backpack/theme-tabler/auth/register.blade.php

The doc is wrong in many parts : ( https://backpackforlaravel.com/docs/6.x/base-how-to#add-one-or-more-fields-to-the-register-form-1 )

Step 1 : the code Route isn't correct, it has no action ! Step 3 : the code is wrong : return backpack_view('auth.register'); Should be : ( at least ) return view(backpack_view('auth.register')); The path to the view is wrong as I told.

++

pxpm commented 10 months ago

Thanks for the feedback and for listing the issues. I'v created an issue in our docs repo to fix it asap.

https://github.com/Laravel-Backpack/docs/issues/524 , I assigned my college @karandatwani92

I will be closing this to keep any conversation related to this issue in the thread we are going to follow when fixing it.

Thanks again, and please report anything you found missing/confusing/wrong and we will try our best to address it.

Cheers 🙏