Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing parameter "userId" #62

Open
bradwhiteVB opened this issue Sep 1, 2014 · 12 comments
Open

Missing parameter "userId" #62

bradwhiteVB opened this issue Sep 1, 2014 · 12 comments

Comments

@bradwhiteVB
Copy link

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
Copy link
Author

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
Copy link
Author

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.

@fabwu
Copy link

fabwu commented Sep 29, 2014

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

@bradwhiteVB
Copy link
Author

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.

@fabwu
Copy link

fabwu commented Sep 30, 2014

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?

@Danielss89
Copy link
Owner

feel free to PR :)

@fabwu
Copy link

fabwu commented Sep 30, 2014

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?

@Danielss89
Copy link
Owner

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

@fabwu
Copy link

fabwu commented Sep 30, 2014

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

@stijnhau
Copy link

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

@fabwu
Copy link

fabwu commented Oct 5, 2014

@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.

@chrRtg
Copy link

chrRtg commented Jan 19, 2016

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants