Error: Some mandatory parameters are missing

Questions around the Aimeos bundle for the Symfony framework
Forum rules
Always add your Symfony, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
rasch
Posts: 22
Joined: 02 Sep 2019, 11:51

Error: Some mandatory parameters are missing

Post by rasch » 03 Sep 2019, 06:13

Hi,

when I click "Insert new entry" in the customer list, I get the following error message

Code: Select all

Some mandatory parameters are missing ("id") to generate a URL for route "aimeos_shop_jqadm_get"., /var/www/html/vendor/symfony/routing/Generator/UrlGenerator.php:167.
Saving the new customer is not possible.

Thank your for your help.
----
aimeos: 2019.07
symfony: 4.3
php: 7.2
ubuntu: 18

User avatar
aimeos
Administrator
Posts: 8380
Joined: 01 Jan 1970, 00:00

Re: Error: Some mandatory parameters are missing

Post by aimeos » 03 Sep 2019, 07:06

Thank you for reporting!
The issue was caused due to a wrong action in the template and is fixed now.
Please run "composer update" to get the new "aimeos/ai-admin-jqadm": "2019.07.7" package.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

rasch
Posts: 22
Joined: 02 Sep 2019, 11:51

Re: Error: Some mandatory parameters are missing

Post by rasch » 03 Sep 2019, 10:37

Thank you for the quick help.

The form is now displayed and I can save a new user. I have assigned him the role editor.

But the new user can't log in. In the table fos_user I can find the new user, but I think he has no role entry. The column roles has the value a: 0: {}.

User avatar
aimeos
Administrator
Posts: 8380
Joined: 01 Jan 1970, 00:00

Re: Error: Some mandatory parameters are missing

Post by aimeos » 03 Sep 2019, 12:17

You have to create backend users via the command line:

Code: Select all

./bin/console aimeos:account --admin me@mydomain.com
The groups in the customer panel of the admin interface are frontend groups (even if they are named the same). The reason behind is that Symfony uses roles like ROLE_ADMIN or ROLE_USER that doesn't match with the FE customer groups you can assign in the customer panel.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

rasch
Posts: 22
Joined: 02 Sep 2019, 11:51

Re: Error: Some mandatory parameters are missing

Post by rasch » 03 Sep 2019, 14:31

Thank you for the quick help. But I still do not do something right.

I have created a new user with editor role with

Code: Select all

./bin/console aimeos:account --editor me@mydomain.com
me@mydomain.com can sign up at the backend with the role editor (e.g. Locales/Site will not be shown). Then I opened the customer form and filled in the missing mandatory fields and saved. Now I get the following error message:

Not allowed to access JQAdm "dashboard" client
in ext/ai-admin-jqadm/admin/jqadm/src/Admin/JQAdm.php (line 52)

Code: Select all

$parts[$idx] = ucwords( $part );
        }
        if( $view->access( $config->get( 'admin/jqadm/resource/' . $path . '/groups', [] ) ) !== true ) {
            throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'Not allowed to access JQAdm "%1$s" client', $path ) );
        }
        $factory = '\\Aimeos\\Admin\\JQAdm\\' . implode( '\\', $parts ) . '\\Factory';
        if( class_exists( $factory ) === false ) {
If I log out and try to log in again with the editor user I will get the same error message immediately after click login.

I noticed, when I call the customer form with the Editor User, the field User groups is blank. When I call it with the admin user, the field contains the groups Admin and Editor, but none is selected.

What am I doing wrong?

User avatar
aimeos
Administrator
Posts: 8380
Joined: 01 Jan 1970, 00:00

Re: Error: Some mandatory parameters are missing

Post by aimeos » 04 Sep 2019, 16:37

Seems like there's getting something lost in Symfony when the customer data is stored. We are still investigating that.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
aimeos
Administrator
Posts: 8380
Joined: 01 Jan 1970, 00:00

Re: Error: Some mandatory parameters are missing

Post by aimeos » 10 Sep 2019, 13:16

Was a bit more difficult to fix that because
1.) editors shouldn't loose their own group like you've observed
2.) but editors shouldn't be able to make others to editors
3.) and editors shouldn't be able to transfer groups if they copy their own record

We think we've found a good solution now that doesn't create any privilege escalation problems.
Can you please try yourself after updating to the 2019.07.x-dev version with:

Code: Select all

composer req aimeos/ai-admin-jqadm:2019.07.x-dev
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

rasch
Posts: 22
Joined: 02 Sep 2019, 11:51

Re: Error: Some mandatory parameters are missing

Post by rasch » 12 Sep 2019, 07:18

It works !

Thank you for the quick help.

Post Reply