Author Topic: Bug version 3.1 and 3.1.1 Can`t change user data  (Read 6096 times)

infinity

  • Newbie
  • *
  • Posts: 6
    • View Profile
Bug version 3.1 and 3.1.1 Can`t change user data
« on: March 05, 2015, 12:44:14 pm »
1. My username has super administrator rights, i`m trying to change my first name an last name. During i`m trying to change first and last name appears error 500 Internal Server Error
2. Can`t change user role to super administrator

Anybody know how to fix it?

marsian

  • Freshman
  • *
  • Posts: 39
    • View Profile
Re: Bug version 3.1 and 3.1.1 Can`t change user data
« Reply #1 on: March 05, 2015, 02:51:25 pm »
If you enable the debug mode it should show you some more Information on what exactly crashes, see http://www.fengoffice.com/web/wiki/doku.php/debugging

infinity

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Bug version 3.1 and 3.1.1 Can`t change user data
« Reply #2 on: March 05, 2015, 05:12:14 pm »
Appears empty page, inside log.php:

Quote
Session "default" started at 2015-03-05T20:06:14+0000
#1 ERROR: Error: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in '/var/www/html/environment/librar$
Time since start: 0.026876926422119 seconds
-------------------------------------------------------------------------------

Session "default" started at 2015-03-05T20:06:14+0000
#1 ERROR: Error: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in '/var/www/html/environment/librar$
Time since start: 0.027323007583618 seconds
-------------------------------------------------------------------------------

Session "default" started at 2015-03-05T20:06:14+0000
#1 ERROR: Error: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in '/var/www/html/environment/librar$
Time since start: 0.065119981765747 seconds
-------------------------------------------------------------------------------

Session "default" started at 2015-03-05T20:06:15+0000
#1 ERROR: Error: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in '/var/www/html/environment/librar$
Time since start: 0.036632061004639 seconds
-------------------------------------------------------------------------------

Session "default" started at 2015-03-05T20:06:19+0000
#1 ERROR: Error: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in '/var/www/html/environment/librar$
#2 ERROR: Error: Undefined variable: image in '/var/www/html/application/views/contact/card.php' on line 22 (error code: 8)
Time since start: 0.056920051574707 seconds
-------------------------------------------------------------------------------

Session "default" started at 2015-03-05T20:06:23+0000
#1 ERROR: Error: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in '/var/www/html/environment/librar$
#2 ERROR: Error: Invalid argument supplied for foreach() in '/var/www/html/application/helpers/permissions.php' on line 615 (error code: 2)
Time since start: 0.09558892250061 seconds
-------------------------------------------------------------------------------

Session "default" started at 2015-03-05T20:06:23+0000
#1 ERROR: Error: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in '/var/www/html/environment/librar$
Time since start: 0.05220103263855 seconds
-------------------------------------------------------------------------------

Session "default" started at 2015-03-05T20:06:23+0000
#1 ERROR: Error: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in '/var/www/html/environment/librar$
Time since start: 0.02698802947998 seconds
-------------------------------------------------------------------------------

And finaly, i can`t modify any contact data of Super Administrator  :-X
« Last Edit: March 05, 2015, 05:26:03 pm by infinity »

JourdanD

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Bug version 3.1 and 3.1.1 Can`t change user data
« Reply #3 on: March 07, 2015, 07:18:33 pm »
I have the exact same problem on 3.1.1 and 3.1.2.  I can create new users but can't edit existing ones.  If I try to edit something, once I hit save account it pops up a 500 internal server error as described in the rest of this thread.

jacob

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Bug version 3.1 and 3.1.1 Can`t change user data
« Reply #4 on: March 09, 2015, 02:26:12 am »
Same problems here on a fresh install

With debug mode on I get this sometimes when trying to edit users:
Fatal error: Call to a member function getId() on a non-object in /var/www/plugins/core_dimensions/hooks/core_dimensions_hooks.php on line 373
« Last Edit: March 09, 2015, 02:38:20 am by jacob »

jacob

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Bug version 3.1 and 3.1.1 Can`t change user data
« Reply #5 on: March 09, 2015, 08:42:43 am »
I have created a workaround for this bug that works in version 3.1.2
I do not know of any possible side-effects it may have but at least I can edit users.

The problem appears on line 373 of /plugins/core_dimensions/hooks/core_dimensions_hooks.php

Feng is apparently trying to get the parent member of a company and is coming up empty handled, throwing an unhanded error.


In the core_dimensions_hooks.php file

Replace this if block:
Quote
if ($object->getCompanyId() > 0) {
                                $pmember = Members::findOne(array('conditions' => '`object_id` = '.$object->getCompanyId(). ' AND `object_type_id` = '.$company_ot->getId(). ' AND `dimension_id` = '.$person_dim->getId()));
                                $member->setParentMemberId($pmember->getId());
                                $member->setDepth($pmember->getDepth() + 1);
                        }else{
                                //Is first level
                                $member->setDepth(1);
                                $member->setParentMemberId(0);
                        }

With this if block:
Quote
if ($object->getCompanyId() > 0) {
                                $pmember = Members::findOne(array('conditions' => '`object_id` = '.$object->getCompanyId(). ' AND `object_type_id` = '.$company_ot->getId(). ' AND `dimension_id` = '.$person_dim->getId()));

                                if($pmember) //Do not use pmember if null for any reason / hack by jacob on the fengoffice forum
                                {
                                $member->setParentMemberId($pmember->getId());
                                $member->setDepth($pmember->getDepth() + 1);
                                } else {
                                $member->setDepth(1);
                                $member->setParentMemberId(0);
                                }
                        }else{
                                //Is first level
                                $member->setDepth(1);
                                $member->setParentMemberId(0);
                        }
« Last Edit: March 11, 2015, 05:44:44 am by jacob »

infinity

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Bug version 3.1 and 3.1.1 Can`t change user data
« Reply #6 on: March 10, 2015, 02:10:12 pm »
Hi there, i think you have an error in this string, can you check again? A have empty page as a result

Quote
$pmember = Members::findOne(array('conditions' => '`object_id` = '.$object->getCompanyId().' AND `object_type_id` = '.$company_ot->getId(). ' AN$

« Last Edit: March 10, 2015, 02:15:18 pm by infinity »

jacob

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Bug version 3.1 and 3.1.1 Can`t change user data
« Reply #7 on: March 11, 2015, 03:56:11 am »
Hi there, i think you have an error in this string, can you check again? A have empty page as a result

Quote
$pmember = Members::findOne(array('conditions' => '`object_id` = '.$object->getCompanyId().' AND `object_type_id` = '.$company_ot->getId(). ' AN$



OOPS You are absolutely correct it should be:
Quote
  $pmember = Members::findOne(array('conditions' => '`object_id` = '.$object->getCompanyId(). ' AND `object_type_id` = '.$company_ot->getId(). ' AND `dimension_id` = '.$person_dim->getId()));


Sorry about that, I just copied it out of my SSH window and didnt notice it cut off a line

infinity

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Bug version 3.1 and 3.1.1 Can`t change user data
« Reply #8 on: March 11, 2015, 05:44:27 am »
You are the best!!! Works great!!! Thank u!   8)

gonggo

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Bug version 3.1 and 3.1.1 Can`t change user data
« Reply #9 on: March 11, 2015, 10:20:42 am »
found the bug in v 3.1.2
works like a charm. thank you!!
« Last Edit: March 11, 2015, 10:22:26 am by gonggo »

franponce87

  • Administrator
  • Hero Member
  • *****
  • Posts: 1819
    • View Profile
    • Email
Re: Bug version 3.1 and 3.1.1 Can`t change user data
« Reply #10 on: March 20, 2015, 10:50:24 am »
Hi everyone!

I am not entirely sure whether this issue has already been solved, but I have already shared this thread with our Dev Team.

Thank you all for your input!

Best regards,
Francisco
Would you like to install Feng Office Professional or Enterprise Edition in your servers? No problem! Read this article!

Dan

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Bug version 3.1 and 3.1.1 Can`t change user data
« Reply #11 on: April 08, 2015, 11:21:53 am »
Thanks a lot Jacob! Worked great for me.

franponce87

  • Administrator
  • Hero Member
  • *****
  • Posts: 1819
    • View Profile
    • Email
Re: Bug version 3.1 and 3.1.1 Can`t change user data
« Reply #12 on: May 19, 2015, 11:40:08 am »
This issue was happening depending on the server settings, but if anyone is still experiencing, please upgrade to the latest version available of Feng Office as some changes were applied long ago.

Best,
Francisco
Would you like to install Feng Office Professional or Enterprise Edition in your servers? No problem! Read this article!