austintoddj / canvas

Publishing on your own terms
http://trycanvas.app
MIT License
3.23k stars 517 forks source link

Laravel 11 | Warning 1265 Data truncated for 'user_id' #1431

Open alex32 opened 1 month ago

alex32 commented 1 month ago

Is there an existing issue for this?

Current Behavior

When I access the login page I get error 500 below. https://www.example.com/canvas/login

Note: 'sessions.user_id' is a bigint (20)

SQLSTATE[01000]: Warning: 1265 Data truncated for column 'user_id' at row 1 (Connection: mysql, SQL: updatesessionssetpayload= YTo0OntzOjY6Il90b2tlbiI7czo0MDoiZmtGMWs3RUdsVEJVY3VESmRXTzRLUDVYMlliM3dIeGJ1Q0Z5NGxNeiI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6MzI6Imh0dHBzOi8vd3d3LmtsYXlyaXZlci5jb20vY2FudmFzIjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319czo1MzoibG9naW5fY2FudmFzXzU5YmEzNmFkZGMyYjJmOTQwMTU4MGYwMTRjN2Y1OGVhNGUzMDk4OWQiO3M6MzY6IjkwOGIzNGIxLTZkYWEtNGYxMC1iYWI5LWE1NWI4NjM0NTNlYyI7fQ==,last_activity= 1718115707,user_id= 908b34b1-6daa-4f10-bab9-a55b863453ec,ip_address= 84.71.26.63,user_agent= Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 OPR/110.0.0.0 whereid= b46ZFoRfsccM5IIvvGJhHBQOK3DYpHWDIhTxAyqm)

Expected Behavior

I expected the home page to load.

Steps To Reproduce

I've installed laravel 11 on my live server (no jetstream), then:

cd /laravel
composer require austintoddj/canvas
php artisan canvas:install   
 // got login credentials
 email: email@example.com  psw: password
php artisan storage:link

Environment

php 8.2
laravel 11
Ubuntu 22.04
Canvas: latest (6.0.54)

Anything else?

Please help, thanks.

https://github.com/austintoddj/canvas/discussions/1094 https://github.com/austintoddj/canvas/issues/851

kusman28 commented 2 days ago

Just create a new migration

public function up(): void { Schema::table('sessions', function (Blueprint $table) { $table->string('user_id', length: 255)->change()->nullable(); }); }