Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

[SOLVED] [5.2.1] Us...
 
Notifications
Clear all

[SOLVED] [5.2.1] User parameters not saved until restart?

9 Posts
3 Users
0 Reactions
7,204 Views
(@papjul)
Posts: 143
Active Member
Topic starter
 
[#2931]

Good day,

Since 5.2.1, users parameters are not saved until I disconnect and log in again. I think it worked in 5.2.0.

How to reproduce:
- Go to user parameters
- Change a parameter (display history for example)
- Save
- Go to user parameters again, display history has its old value

Since I have some custom developments on my ProjeQtOr version, I applied a diff from ProjeQtOr 5.2.0, so if you can't reproduce, please tell me and I will see if I missed a "id" becoming "idData" somewhere or something like this…


 
Posted : 19 Jan 2016 13H09
Klaus
(@climb4fun)
Posts: 449
Contributor
 

Hi Papjul,

I already tested it in my environment and it worked well.
Did you test it in DEMO environment here in ProjQtiOr? Of not, my be you should give him a try.

climb4fun


 
Posted : 19 Jan 2016 14H06
(@papjul)
Posts: 143
Active Member
Topic starter
 

You can't change user parameters in demo.projeqtor.org, that's why I couldn't check.
Guess I will have to check with another fresh installation of ProjeQtOr to compare…


 
Posted : 19 Jan 2016 14H10
Klaus
(@climb4fun)
Posts: 449
Contributor
 

Yes, you are right, in demo user parameters not enabled. Helped by you, I discovered this today for the first time.


 
Posted : 19 Jan 2016 14H19
(@babynus)
Posts: 14952
Member Admin
 

Hi,

I tested and first all seemed to work.
But when trying "Display history" option, I could reproduce issue : saved value is not retreived.
Ticket #1938 recorded.

NB : user parameters is disabled is Demo because everybody uses same few users, and so should not change some parameter values (such as language...)


 
Posted : 19 Jan 2016 15H04
(@babynus)
Posts: 14952
Member Admin
 

Fixed !!
Fix is to replace lines 48-52 in /tool/saveDataToSession.php from

  if (in_array($id, getParamtersList('userParameter'))) {
    // OK, it is a user parameter
  } else if (in_array($id, getParamtersList('globalParameter'))) {
    // OK, it is a global parameter

to

  if (array_key_exists($id, Parameter::getParamtersList('userParameter'))) {
    // OK, it is a user parameter
  } else if (array_key_exists($id, Parameter::getParamtersList('globalParameter'))) {
    // OK, it is a global parameter

 
Posted : 19 Jan 2016 21H29
(@papjul)
Posts: 143
Active Member
Topic starter
 

Now it works but my error log has:
2016-01-20 09:41:02.897 ** ERROR ** Invalid id value - [displayHistory]


 
Posted : 20 Jan 2016 11H42
(@babynus)
Posts: 14952
Member Admin
 

Are you sure the log is not prior to fixing ?


 
Posted : 20 Jan 2016 12H50
(@papjul)
Posts: 143
Active Member
Topic starter
 

No, it works (parameters are updated in real time) and I still have some errors right now:
2016-01-20 10:51:16.281 ** ERROR ** Invalid id value - [displayHistory]
2016-01-20 10:51:26.608 ** ERROR ** Invalid id value - [displayHistory]

It's not very important since it works, but just FYI 😉


 
Posted : 20 Jan 2016 12H52
Share:

Scroll to Top