Home > Blockchain >  Laravel Jetsream Profile page not loading on fresh install
Laravel Jetsream Profile page not loading on fresh install

Time:05-14

I have performed a fresh install of Laravel Jetstream.

Upon completing all the steps outlined in the Jetstream (Inertia) set up process, the project starts up fine using the 'php artisan serve' command. I can navigate to the Dashboard page which displays properly.

However, when I click on the newly created user in the top-right of the screen then select 'Profile', the profile page does not render.

Within my console view I see the following error:

Uncaught (in promise) Error: Ziggy error: route 'verification.send' is not in the route list.

I have not made any changes to the routes since installing the new project.

Does anyone have any idea what is causing this and how to fix it please?

CodePudding user response:

The error occurs because a link to resend the email verification has been added in the profile view. You can fix the error by enabling

Features::emailVerification()

in config/forty.php or simply removing the "Click here to re-send the verification email." link on the profile page.

CodePudding user response:

It seems like a Jetstream bug. If you don't wanna enable Email Verification.

Go to the file UpdateProfileInformationForm.php in resources/js/Pages/Profile/Partials

You'll find this line

<div v-show="user.email_verified_at === null">

You have to add

v-if="$page.props.jetstream.hasEmailVerification"

inside that div to check if the email verification is enabled.

Then that whole div should looks like this

<div v-if="$page.props.jetstream.hasEmailVerification" v-show="user.email_verified_at === null">
  <p >
    Your email address is unverified.

    <Link
      :href="route('verification.send')"
      method="post"
      as="button"
      
      @click.prevent="sendEmailVerification"
    >
      Click here to re-send the verification email.
    </Link>
  </p>

  <div v-show="verificationLinkSent" >
    A new verification link has been sent to your email address.
  </div>
</div>
  • Related