ZfcUserAdmin icon indicating copy to clipboard operation
ZfcUserAdmin copied to clipboard

Missing parameter "userId"

Open bradwhiteVB opened this issue 10 years ago • 12 comments

So after:

  1. adding zfcUserAdmin to a project that already had zfcUser up and working
  2. adding "'user_mapper' => 'ZfcUserAdmin\Mapper\UserZendDb'," to the ZfcUserAdmin.global.php file under config/autoload/

I then navigate to MYPROJECT/admin and I see a default Admin page with "Users" link in the navigation - great - click on this and I get:

Zend\Mvc\Router\Exception\InvalidArgumentException

Message: Missing parameter "userId"

Is there a trick to getting this to work? After following your instructions I didn't expect an error of this sort.

Regards, Brad

bradwhiteVB avatar Sep 01 '14 02:09 bradwhiteVB

If I didn't add ZfcUserAdmin.global.php file under config/autoload/ and change that line - I just got the php white screen of death.

bradwhiteVB avatar Sep 01 '14 02:09 bradwhiteVB

Also, I can no longer "logon" via MYPROJECT/user I seem to get rerouted to the login page - after checking in the DB, my status is still NULL meaning no success.

bradwhiteVB avatar Sep 01 '14 02:09 bradwhiteVB

I had the same problem too. Is there a solution?

fabwu avatar Sep 29 '14 21:09 fabwu

I decided to write my own module for my site instead for a couple of reasons:

  1. I would learn more
  2. the zfcUser module seems to have been updated since the last update for this module
  3. This module doesn’t seem to have the same level of support
  4. I didn’t want to look for what was wrong and have to code around it just in case this module is fixed (i.e. “…never change vendor module code … “)
  5. I didn’t need the extra “Admin” page option

What I have come across in my travels though is that there is no “userId” reference in the tables created by zfcUser there is only “user_id”. My guess is that this module was not updated after an update to the mySQL schema for zfcUser.

Hope this helps someone.

On 30 Sep 2014, at 7:44 am, Fabian Wüthrich [email protected] wrote:

I had the same problem too. Is there a solution?

— Reply to this email directly or view it on GitHub.

bradwhiteVB avatar Sep 29 '14 23:09 bradwhiteVB

Ok so I will write my own module too. It is too bad that this module doesn't get support. Can you upload your module to github?

fabwu avatar Sep 30 '14 09:09 fabwu

feel free to PR :)

Danielss89 avatar Sep 30 '14 10:09 Danielss89

This error occured with PR #55 and release 1.2.1 from zfcUser. In the actuall dev-master all closures are moved to factorys (:+1:) and ServiceManager return an instance of ZfcUser\Factory\Mapper\UserHydrator if you get zfcuser_user_hydrator. In release 1.2.1 ServiceManager return an instance of Zend\Stdlib\Hydrator\ClassMethods if you get zfcuser_user_hydrator and the entity break.

@Danielss89 Any idea to solve this problem?

fabwu avatar Sep 30 '14 13:09 fabwu

Well this module should keep up to date with 1.x branch of zfcuser. ZfcUser master branch is for ZfcUser 2.0.

Danielss89 avatar Sep 30 '14 13:09 Danielss89

I agreed with that. So then you revert PR #55 and close this issue?

fabwu avatar Sep 30 '14 14:09 fabwu

Do the dev of zfcuser and dev of this module should cooperate like it doing now.

stijnhau avatar Sep 30 '14 15:09 stijnhau

@Danielss89 Could you tag a alpha release without PR #55? Then I can use this module with zfcUser 1.x and the master branch keep up to date with zfcUser master branch.

fabwu avatar Oct 05 '14 10:10 fabwu

After updating my application from PHP 5.3 to 5.5 I got the error from above: "Missing parameter userId" for route /admin/user/list Any further routes like remove, edit and create are still working. Only listing users raises the error.

from my composer.json "require": { "php": ">=5.5.1", "zendframework/zendframework": "2.5.*", "zendframework/zend-developer-tools": "@dev", "bjyoungblood/bjy-profiler": "@dev", "neilime/zf2-twb-bundle": "@dev", "zf-commons/zfc-user" : "1.x-dev", "zf-commons/zfc-admin" : "dev-master", "danielss89/zfc-user-admin" : "dev-master" }

Any suggestion on how to load the version proper to make them work together? I had tried various variants but mybe I oversaw the obvious?

chrRtg avatar Jan 19 '16 21:01 chrRtg