Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

obs's avatar
Level 3

Spark: Registering not possible

I have a Spark installation and also use Passport.

First, the register page was empty and I found out, that I needed to enter Stripe credentials to get this working. Now I can see the register form, but when I click submit, I get redirected to the register form and the data is just passed as GET parameters. Nothing else happens.

I don't get any errors, even when I don't fill in anything. So there is obviously something missing here, but I can't figure out what it is.

My SparkServiceProvider boot method looks like this:

Spark::collectEuropeanVat('AT');

        Spark::useStripe()->noCardUpFront()->trialDays(10);

        Spark::freePlan()
            ->features([
                'First', 'Second', 'Third'
            ]);

        Spark::plan('Basic', 'provider-id-1')
            ->price(10)
            ->features([
                'First', 'Second', 'Third'
            ]);

In the register form I only have fields for name, email address and password (+ confirm password). I'm not quite sure which other information can be helpful to solve this, please let me know.

Any ideas how I can solve this?

Oliver

0 likes
4 replies
hhda's avatar

Hi Oliver,

Can you show us your <form>? Perhaps the action or method is not set? It will default to GET if the method is not specified.

obs's avatar
Level 3

Thanks for your reply.

I haven't changed the Spark forms. There is no method specified, I guess Vue should take care of this.

Is there a way to check if Vue is working? Or get Vue erors?

In the console it shows the following: You are running Vue in development mode. Make sure to turn on production mode when deploying for production.

Could it be that Passport gets in the way?

obs's avatar
Level 3

I tried something else now. When I remove the following Spark::useStripe()->noCardUpFront()->trialDays(10); I get the following error in console:

[Vue warn]: Error in nextTick: "IntegrationError: The selector you specified (#card-element) applies to no DOM elements that are currently on the page.
Make sure the element exists on the page before calling mount()."

found in

---> <SparkRegisterStripe>
       <Root>

The thing is, I haven't changed any of the Spark views. I guess it's meant to work out of the box, isn't it?

obs's avatar
obs
OP
Best Answer
Level 3

I finally found out why this happened: when I registered the Vue components for Passport I accidentially copied

var app = new Vue({
    mixins: [require('spark')]
});

So it was in the app.js twice. When I removed it once, everything worked as expected

1 like

Please or to participate in this conversation.