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

Problème sur Agenda perso #2654

Closed
AydoganEren opened this issue Sep 5, 2018 · 26 comments
Closed

Problème sur Agenda perso #2654

AydoganEren opened this issue Sep 5, 2018 · 26 comments
Assignees
Milestone

Comments

@AydoganEren
Copy link

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

@ywarnier
Copy link
Member

ywarnier commented Sep 5, 2018

"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;

@AydoganEren
Copy link
Author

C'est Chamilo 1.11.8

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

@ywarnier
Copy link
Member

ywarnier commented Sep 5, 2018

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

@AydoganEren
Copy link
Author

AydoganEren commented Sep 5, 2018

Ah desolé c'est 5.6.30 j'ai commis une faute quand je mettais à jour

merci.

@ywarnier
Copy link
Member

ywarnier commented Sep 7, 2018

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

@yourKatharsis
Copy link

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?

@steven1963
Copy link

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

@yourKatharsis
Copy link

@ywarnier can we reopen this issue?

@steven1963
Copy link

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.

@ywarnier ywarnier reopened this Mar 16, 2019
@ywarnier
Copy link
Member

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.

@ywarnier ywarnier added this to the 1.11.10 milestone Mar 16, 2019
@ywarnier
Copy link
Member

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)

@steven1963
Copy link

steven1963 commented Mar 18, 2019

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

@steven1963
Copy link

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.

@yourKatharsis
Copy link

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

@AngelFQC
Copy link
Member

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)

@yourKatharsis
Copy link

yourKatharsis commented Apr 11, 2019

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

@steven1963
Copy link

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

@ywarnier
Copy link
Member

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

@ywarnier ywarnier assigned ywarnier and unassigned AngelFQC Apr 22, 2019
@ywarnier
Copy link
Member

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.

@bassuma
Copy link

bassuma commented Apr 27, 2019

OK.
Downloading for test.
Thank you

@ywarnier
Copy link
Member

Any luck reproducing this issue with the beta, anyone?

@bassuma
Copy link

bassuma commented Apr 29, 2019

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, ...]

@steven1963
Copy link

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

@bassuma
Copy link

bassuma commented Apr 30, 2019

@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

@bassuma
Copy link

bassuma commented Apr 30, 2019

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.

@ywarnier
Copy link
Member

ywarnier commented May 3, 2019

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

@ywarnier ywarnier closed this as completed May 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants