Chamilo-lms: Probl猫me sur Agenda perso

Created on 5 Sep 2018  路  26Comments  路  Source: chamilo/chamilo-lms

J'ai chang茅 mon profil comme Directeur RH.

Je re莽ois toujours un erreur.

Notice: Undefined variable: sessions in /home/fant/public_html/main/inc/lib/agenda.lib.php on line 3026

Fatal error: Uncaught Error: Unsupported operand types in /home/fant/public_html/main/inc/lib/agenda.lib.php:3026 Stack trace: #0 /home/fant/public_html/main/calendar/agenda_js.php(157): Agenda->displayActions('calendar', NULL) #1 {main} thrown in /home/fant/public_html/main/inc/lib/agenda.lib.php on line 3026

On hold - Can't reproduce

Most helpful comment

We have just published our beta version here https://github.com/chamilo/chamilo-lms/releases/tag/v1.11.10-beta.1
Please check it to make sure whether this issue is fixed, and let us know if it isn't.
We plan to release the stable on the 30th of April, so please don't take too much time doing that. As we can't reproduce this issue, we will consider it fixed if not proven otherwise by the time of the release.
Thanks.

All 26 comments

"Unsupported operand types" semble indiquer une version incorrecte de PHP... Quelle est la version de PHP que tu utilises?
La ligne de code:

 $sessions = ['0' => get_lang('SelectAnOption')] + $sessions;

C'est Chamilo 1.11.8

"$sessions = ['0' => get_lang('SelectAnOption')] + $sessions;"
Oui c'est 莽a.

Je parle de la "version de PHP". Voir dans administration -> Syst猫me -> Informations du syst猫me -> Version de PHP

Ah desol茅 c'est 5.6.30 j'ai commis une faute quand je mettais 脿 jour

merci.

Et donc... avec 7.*, 莽a va mieux?

I have the same Error with php-7.0.32 and chamilo 1.11.8.
I already checked the user_id (main/calendar/agenda_js.php ( 157)) - its set and not NULL.
And also try another hrm-user.

What else can i do?

I have the exact same problem with creating HR users having broken agenda links with the exact same errors and line numbers

@ywarnier can we reopen this issue?

I have installed both the PHP 5 version and the PHP 7 versions on my Development environment and both installations reflect this bug. I am trying to read through he code starting with account creation for HR Manager then the Login Procedure to see it there is a typo for the creation of the HR Manager not matching what the agenda API is looking for.

Reopening. We need more details though, guys and gals, because so fat we have no context about what whether you have actually tested this on the latest development version or 1.11.8 stable.

Also note that PHP 7.0 in particular (not 7.1, 7.2 or 7.3) had a lot of weird behaviour changes, so preferrably try to avoid it (plus it's not supported anymore, anyway: http://php.net/supported-versions.php)

this is a consistent issue with all Stable versions when signed in as HR Issue when trying to use the personal agenda for the HR user. I am trying to trace it back. All you have to do is login as a HR manager role and this error shows up in the PHP Logs. I am trying trace but have unable to trace it as of yet while reviewing the scripts.

Fatal error: Uncaught Error: Unsupported operand types in /home/fant/public_html/main/inc/lib/agenda.lib.php:3026 Stack trace: #0 /home/fant/public_html/main/calendar/agenda_js.php(157): Agenda->displayActions('calendar', NULL) #1 {main} thrown in /home/fant/public_html/main/inc/lib/agenda.lib.php on line 3026

I have even gone through the files related to creating an User Role and even coded in a new user roll and the Agenda works fine for the new user role that I created. so it maybe related to the to the View. I am now investigating the Views. I am trying find out how the add the Administration link to the new role and how to manage the admin screen as sample I am trying to limit the access in the administration similar to how the view works for Sessions manager. any pointers to where this is managed would help me possible fix this issue and finish the role inplementation.

I just updated php7.0 to 7.2.
This issue still exists.

Try changing the line

https://github.com/chamilo/chamilo-lms/blob/1.11.x/main/inc/lib/agenda.lib.php#L3044

with:

$sessions =  array_merge(['0' => get_lang('SelectAnOption')], $sessions)

Thanks a lot.
I have access now.
But it still throws a warning:

Notice: Undefined variable: sessions in /var/www/chamilo/www/main/inc/lib/agenda.lib.php on line 3044

Warning: array_merge(): Argument #2 is not an array in /var/www/chamilo/www/main/inc/lib/agenda.lib.php on line 3044

does not matter what version of PHP you use I have tried several now and the issue exists

We believe this should be fixed in 1.11.10. I will be releasing a beta version tomorrow so you can test.

We have just published our beta version here https://github.com/chamilo/chamilo-lms/releases/tag/v1.11.10-beta.1
Please check it to make sure whether this issue is fixed, and let us know if it isn't.
We plan to release the stable on the 30th of April, so please don't take too much time doing that. As we can't reproduce this issue, we will consider it fixed if not proven otherwise by the time of the release.
Thanks.

OK.
Downloading for test.
Thank you

Any luck reproducing this issue with the beta, anyone?

Hi
Unfortunately I can not help.
I changed my profile for HR.
No error message appears.
greetings

**Server vps
OS: CentOS Linux 7.6.1810 (Core)
Version of Chamilo: [1.11.10 Beta 1.]
Version of PHP: [7.2, ...]

The Problem of this agenda for HR managers has been resolved in the beta new issue for HR Manager though in beta. in the social network on the "Personal Data" link is going to a blank screen. This also happens with "Learners" the "Admin" accounts works fine

@steven1963
Hello.
I do not know if that helps.
Switch to test server.
See if the white page will show the problem warning.
Go in administration;
Server Type:

  • Test Server
    Greetings

Hi
I went to 11.chamilo.org.
I created an admin profile.
then I switched to HR.
I went to social network.
And I clicked on "Personal data"
Shows this.
img
greetings
RH

Note: this does not happen in my beta.

This last commit fixed the "notice" issue. That was good reporting. Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AldoAbdiel picture AldoAbdiel  路  3Comments

sjcqs picture sjcqs  路  6Comments

AngelFQC picture AngelFQC  路  5Comments

jderriks picture jderriks  路  8Comments

480419140 picture 480419140  路  5Comments