1
Shiva
smartprofile - updating a profile
  • 2008/8/25 13:46

  • Shiva

  • Quite a regular

  • Posts: 280

  • Since: 2006/7/9 1


I can't seem to be able to update the profile apart from the basic user fields using smartprofile.

I have looked at the code and I believe I can see where the problem is but If I am right then I would have thought many other people would have had the same problem. It's in edituser.php

Quote:

if (!$member_handler->insertUser($edituser)) {
include XOOPS_ROOT_PATH.'/header.php';
include_once 'include/forms.php';
echo ''. _PROFILE_MA_PROFILE .' »» '. _PROFILE_MA_EDITPROFILE .'

';
$form =& getUserForm($edituser, $profile);
echo $edituser->getHtmlErrors();

$form->display();
} else {
$profile->setVar('profileid', $edituser->getVar('uid'));
$profile_handler->insert($profile);
unset($_SESSION['xoopsUserTheme']);
redirect_header(XOOPS_URL.'/modules/smartprofile/userinfo.php?uid='.$uid, 2, _PROFILE_MA_PROFUPDATED);
}


The code tries to save the basic fields and if it fails then it tries to save the customized fields. Surely it should try to save both? - Very confused!

And then if I change the code to force the customized fields to save then I get an error which does not show in debug. "An error occured during the BeforeUpdate event"

Any help would be great.

Thanks!

2
trabis
Re: smartprofile - updating a profile
  • 2008/8/25 14:36

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Quote:

Shiva wrote:

The code tries to save the basic fields and if it fails then it tries to save the customized fields. Surely it should try to save both? - Very confused!


As far as see:
The code tries to save the basic fields an if it fails then it loads the user form. If it succeed it goes and tries to save customized fields.
Notice the '!'...

Tip:Use var_dump() or print_r() to follow your objects or vars trough the code.

3
pablo103
Re: smartprofile - updating a profile
  • 2008/9/15 12:52

  • pablo103

  • Not too shy to talk

  • Posts: 181

  • Since: 2008/2/3 1


I have the same problem. trabis can you post a full code?

thanks!

4
pablo103
Re: smartprofile - updating a profile
  • 2008/9/16 10:29

  • pablo103

  • Not too shy to talk

  • Posts: 181

  • Since: 2008/2/3 1


please help

5
Marco
Re: smartprofile - updating a profile
  • 2008/9/16 17:57

  • Marco

  • Home away from home

  • Posts: 1256

  • Since: 2004/3/15


well, you'd better to upgrade to 2.3, and make use of the embedded Ext. Profile. For now it's still at RC stage, but final is for very soon.
Do synergy or die.

6
Shiva
Re: smartprofile - updating a profile
  • 2008/9/18 5:34

  • Shiva

  • Quite a regular

  • Posts: 280

  • Since: 2006/7/9 1


Thank you for the comments - I have sorted it now.

I would like to upgrade to the new 2.3 profile module - but how is it possible to upgrade while retaining all my fields, data, and permissions.

A script would be great - does one exist?

7
Marco
Re: smartprofile - updating a profile
  • 2008/9/18 5:47

  • Marco

  • Home away from home

  • Posts: 1256

  • Since: 2004/3/15


yes, the upgrade script does exist, by it's for the 2.2 ext profile module. Smartprofile is not very far from the 2.2 one, but you'd better to compare the module's tables structures first, to check if it can work for smartprofile.
Do synergy or die.

8
Shiva
Re: smartprofile - updating a profile
  • 2008/9/18 6:14

  • Shiva

  • Quite a regular

  • Posts: 280

  • Since: 2006/7/9 1


cool - where can I find it.

thank you.

9
pablo103
Re: smartprofile - updating a profile
  • 2008/9/18 12:52

  • pablo103

  • Not too shy to talk

  • Posts: 181

  • Since: 2008/2/3 1


Shiva, How did you sort it out? can you send me the correct files or write down here the changes you have made?

thank you in advance

Login

Who's Online

313 user(s) are online (258 user(s) are browsing Support Forums)


Members: 0


Guests: 313


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits