Page 1 of 1

Error: Some mandatory parameters are missing

Posted: 03 Sep 2019, 06:13
by rasch
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

Re: Error: Some mandatory parameters are missing

Posted: 03 Sep 2019, 07:06
by aimeos
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.

Re: Error: Some mandatory parameters are missing

Posted: 03 Sep 2019, 10:37
by rasch
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: {}.

Re: Error: Some mandatory parameters are missing

Posted: 03 Sep 2019, 12:17
by aimeos
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.

Re: Error: Some mandatory parameters are missing

Posted: 03 Sep 2019, 14:31
by rasch
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?

Re: Error: Some mandatory parameters are missing

Posted: 04 Sep 2019, 16:37
by aimeos
Seems like there's getting something lost in Symfony when the customer data is stored. We are still investigating that.

Re: Error: Some mandatory parameters are missing

Posted: 10 Sep 2019, 13:16
by aimeos
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

Re: Error: Some mandatory parameters are missing

Posted: 12 Sep 2019, 07:18
by rasch
It works !

Thank you for the quick help.