NotFoundException in XMDS 1.8.0-rc1

Peter sent me the beta player, but I received the error below to try to register in cms.

http://test.suatv.com.br/xmds.php

There’s something wrong with your CMS…

Fatal error: Uncaught exception 'Xibo\Exception\NotFoundException' with message 'User not found' in<snip>\lib\Factory\UserFactory.php:109 Stack trace: #0 <snip>\web\xmds.php(91): Xibo\Factory\UserFactory->getById(1) #1 {main} thrown in <snip>\lib\Factory\UserFactory.php on line 109

Please see the email I sent to you earlier today. I think there’s something more serious wrong with your installation which is causing the issues you’re seeing.

I’d do a fresh 1.8.0-rc1 install and see if you still have the same issue.

Hello Alex,

I did an upgrade as of 1.7.9, I will try to do a clean installation without upgrade.

Hello Alex,

I reinstalled RC1, but the error remains. My environment is windows PHP FastCGI.
I do not know what it can be, unfortunately I need your help to identify the problem.

Please can you create a new thread in the Dev category and when we’re able to look at it we will.

You’re certain you did the install against an empty database? The error you’re getting suggests to me it’s using the same database as before…

Hello Alex,

I could not install with an empty database. The Wizard is not passing the user to connect to database, I get the msn from could not connect without password for the user in mysql.

I was able to perform the upgrade installation.

The XDMS link, I had to comment the function below to work:
public function getById($userId)
{
// $users = $this->query(null, array(‘disableUserCheck’ => 1, ‘userId’ => $userId));

   // if (count($users) <= 0)
   //     throw new NotFoundException(__('User not found'));

  //  return $users[0];
}

I think you’ve deleted the original user that was created?


In xmds.php on L91, can you please try changing:

$app->user = $app->userFactory->getById(1);

to

$app->user = $app->userFactory->getSystemUser();

and let me know if that solves any of your issues?

DAN, the change in XMDS worked.

About the user, I think I got the problem right. Our login users are emails.
I can not create new users in this format, login = email.

It wont matter if you use emails or usernames as your login details - XMDS just needs a user for permissions purposes. It was using the xibo_admin user (or user ID 1) which was wrong, because we cannot guarantee that user will still be there.

Now it will use a pseudo system user, which is better.

I am not sure if this will fix your other problems - but it is worth checking them to see.

Thanks,
Dan

Dan, by entering the user field with xxx@xxxx.com.br

I get the following error

User name must be between 1 and 50 characters.
# 0 \ lib \ Entity \ User.php (676): Xibo \ Entity \ User-> validate () 
# 1 \ lib \ Controller \ User.php (520): Xibo \ Entity \ User-> save [Internal function]: Xibo \ Controller \ User-> edit ( '3') 
# 3 \ vendor \ akrabat \ rka-slim-controller \ RKA \ Slim.php (79): call_user_func_array (Array) 
# 4 [internal (6) \ vendor \ slim \ Slim \ Route.php (468): call_user_func_array (Object (Closure), Array) RKA \ Slim-> RKA \ {closure} Slim \ slim \ Slim \ Slim.php (1357): Slim \ Route-> dispatch () 
# 7 \ vendor \ slim \ slim \ Slim \ Middleware \ Flash.php (85) Slim \ Middleware \ Flash-> call () 
# 9 \ lib \ Middleware \ Actions.php (136): Slim \ Middleware \ MethodOverride-> Slim \ Middleware \ Call () 
# 10 \ lib \ Middleware \ Theme.php (35): Xibo \ Middleware \ Actions-> call () 
# 11 \ lib \ Middleware \ WebAuthentication.php Xibo \ Middleware \ CsrfGuard-> call () 
# 12 \ lib \ Middleware \ CsrfGuard.php (62): Xibo \ Middleware \ WebAuthentication-> Xibo \ Middleware \ Storage-> call () 
# 16 \ lib \ Middleware \ Xmr.php (36): Xibo \ Middleware \ Slim \ slim \> run () # 18 {main} <slim \ slim \ slim.php (1302): Xibo \ Middleware \ Xmr->

@Peter can you test whether users can be created with email addresses please? and also add the same to the test suite (or your list of tests to add to the suit anyway)