Laravel-Backpack / community-forum

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

[Bug] Call to a member function getKey() on null #1056

Closed tringuyenduc2903 closed 4 months ago

tringuyenduc2903 commented 5 months ago

Bug report

What I did

Verify account email address when not logged in: http://localhost:8001/admin/email/verify/2/339ff24d6e1112f476f74e2461ebf89a3883ff5d?expires=1719674964&signature=5b681d7501ca78906f16443e57681abf73581fec60 1478e88d4652e803385bce

What I expected to happen

Redirect user to login page

What happened

Exception: Call to a member function getKey() on null image

What I've already tried to fix it

In src/app/Http/Controllers/Auth/VerifyEmailController.php

    public function __construct()
    {
        $this->middleware(backpack_middleware());
        ...
    }

Is it a bug in the latest version of Backpack?

After I run composer update Backpack/crud the error still occurs

Backpack, Laravel, PHP, DB version

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

### PHP VERSION:
8.3.7

### PHP EXTENSIONS:
Core, date, libxml, openssl, pcre, zlib, filter, hash, json, pcntl, random, Reflection, SPL, session, standard, sodium, mysqlnd, PDO, xml, bcmath, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, iconv, igbinary, imagick, imap, intl, ldap, exif, msgpack, mysqli, pcov, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, readline, redis, shmop, SimpleXML, soap, sockets, sqlite3, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, memcached, swoole, Zend OPcache, xdebug

### LARAVEL VERSION:
11.13.0.0

### BACKPACK PACKAGE VERSIONS:
backpack/basset: 1.3.4
backpack/crud: 6.7.17
backpack/generators: v4.0.5
backpack/language-switcher: 2.0.0
backpack/permissionmanager: 7.2.1
backpack/pro: 2.2.4
backpack/theme-tabler: 1.2.10
karandatwani92 commented 5 months ago

Hey @tringuyenduc2903

I just retested it. It's working fine for me. Did you take all four steps to Enable email verification in Backpack routes?