statamic / cms

The core Laravel CMS Composer package
https://statamic.com
Other
3.72k stars 510 forks source link

CP's Create User form doesn't respect the user's blueprint #7980

Closed MtDalPizzol closed 1 year ago

MtDalPizzol commented 1 year ago

Bug description

I need to add a required phone column to the users table.

So, a made and ran the migration and also added a field for the phone on the user blueprint.

The problem is that the form for editing the user is not the same as the form for creating the user.

When creating the user, there's no phone field and I get a database error since the column is required.

When editing a user everything is fine.

How to reproduce

  1. Create a migration that adds a NON NULLABLE column to the users table
  2. Run the migration
  3. Modify theuser blueprint adding a field for that column
  4. Try creating a new user via the CP

Logs

No response

Environment

Environment
Application Name: Clube Amo Meu Pet
Laravel Version: 9.45.1
PHP Version: 8.1.13
Composer Version: 2.5.1
Environment: local
Debug Mode: ENABLED
URL: statamic.amomeupet.test
Maintenance Mode: OFF

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: pusher
Cache: statamic
Database: mysql
Logs: stack / single
Mail: smtp
Queue: sync
Session: file

Statamic
Addons: 2
Antlers: regex
Stache Watcher: Enabled
Static Caching: Disabled
Version: 3.4.7 PRO

Statamic Addons
doublethreedigital/runway: dev-main
statamic/eloquent-driver: 1.1.2

Installation

Fresh statamic/statamic site via CLI

Antlers Parser

None

Additional details

No response

duncanmcclean commented 1 year ago

Duplicate of https://github.com/statamic/cms/issues/7925 (happens without database users)