Comments (6)
Sorry for the confusion, I've been working too much on nova-calendar 🙈.
I meant "2. At what URL are you trying to open your wizard?"
I guess the same URL as you mentioned under 3?
from nova-wizard.
I've updated my local installation to use that same uri but everything keeps working, so the problem is not with the custom uri.
403 indicates an authorization / authentication problem; the issue might be related to your Nova path.
If you can answer the following questions we'll probably find the issue:
- What is the
path
option set to inconfig/nova.php
? - At what complete URL are you trying to open your calendar?
- Do you see the link to your "Create Community" wizard added to your Nova menu? If so, what path is it pointing to?
- Did you add the wizard link to the menu manually, or are you using Nova's automatic menu generation?
from nova-wizard.
Thanks for your quick reply.
- path ist set to
'path' => '/admin_backend',
- open calendar? don't understand what you mean 🫣
- it's pointing to
https://domain.test/admin_backend/setup/create-community
- right now I added it manually:
MenuItem::link(__('backend/sidebar_menu.community_wizard'), NovaWizard::pathToWizard('create-community')),
when adding it as tool with new NovaWizard('create-community')
it links to https://domain.test/admin_backend/nova-wizard
and inside the wizard config:
return [
'create-community' => [
'class' => CreateCommunityWizard::class,
'uri' => 'setup/create-community',
'windowTitle' => 'Create your Community now',
],
];
from nova-wizard.
I've recreated your setup but everything works for me.
However, I do get a 403 if I remove the Tool from the array returned by tools()
in the NovaServiceProvider
.
Can you check again if you performed step 4 of the installation instructions completely?
I.e., are you including new NovaWizard('create-community')
in the array returned by the tools()
method?
from nova-wizard.
indeed the tool was missing as I understood it to either add it as tool or as link.
Now I added the tool as well.
The link is still added manually. Sorry was a misunderstood of my side 🫣
But now I've a followup problem:
The window remains empty except the navigations. In the console there's this error:
In the class I copied the demo content:
<?php
namespace App\Nova\Wizard;
use Laravel\Nova\Fields;
use Wdelfuego\NovaWizard\AbstractWizard;
class CreateCommunityWizard extends AbstractWizard
{
public function wizardViewData(): array
{
return [
'steps' =>
[
'title' => 'Step 1/2',
'fields' => [
Fields\Text::make(__('Username'), 'username'),
Fields\Text::make(__('Text field'), 'myText'),
Fields\Textarea::make(__('Longer text'), 'myLongerText')
->help("You can use Help texts on Nova fields like you're used to"),
Fields\Number::make(__('Some number'), 'myNumber')
->rules('required')
->withMeta(['value' => 60])
->min(1)
->step(1),
],
],
[
'title' => 'Step 2/2',
'fields' => [
Fields\Text::make(__('Text field 2'), 'myText2'),
Fields\Textarea::make(__('Longer text 2'), 'myLongerText2')
->help("You can use Help texts on Nova fields like you're used to"),
Fields\Number::make(__('Some number 2'), 'myNumber2')
->rules('required')
->withMeta(['value' => 60])
->min(1)
->step(1),
],
],
];
}
public function onSubmit($formData, &$context): bool
{
return true;
}
public function successViewData($context): array
{
return [
'message' => 'Success! Your Community has been created.',
];
}
}
from nova-wizard.
Thanks for letting me know. If you think the documentation can be improved, feel free to create a PR!
I've created a new issue for your Javascript error.
from nova-wizard.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nova-wizard.