Page Index Toggle Pages: 1
Topic Tools
Normal Topic Additional Extended Profiles issues (Read 1,383 times)
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,128
Location: Earth

YaBB 2.6.0
Re: Additional Extended Profiles issues
Reply #3 - Nov 6th, 2012 at 9:33pm
Post Tools
This Topic was moved here from YaBB 2 - Bugs [Need Verification] [move by] Dandello.
  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,128
Location: Earth

YaBB 2.6.0
Re: Additional Extended Profiles issues
Reply #2 - Aug 12th, 2012 at 6:39pm
Post Tools
On further testing this version seems a little closer
Code
Select All
		# if setting didn't get submitted or field is disabled, load old value
		if (!defined $newprofile{'ext_'.$id} && $field{'active'} == 0 && $action eq "register2" ) { $newprofile{'ext_'.$id} = 0; }
		elsif (!defined $newprofile{'ext_'.$id} || $field{'active'} == 0) { $newprofile{'ext_'.$id} = $value; }
 



Logically, it should be looking for not defined and not active and in Register2 before plugging in a placeholder.
  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,128
Location: Earth

YaBB 2.6.0
Re: Additional Extended Profiles issues
Reply #1 - Aug 12th, 2012 at 2:46pm
Post Tools
This seems to work:
find
Code
Select All
		# if setting didn't get submitted or field is disabled, load old value
		if (!defined $newprofile{'ext_'.$id} || $field{'active'} == 0) { $newprofile{'ext_'.$id} = $value; }
 



replace with
Code
Select All
		# if setting didn't get submitted or field is disabled, load old value
		if (!defined $newprofile{'ext_'.$id} ||  $field{'active'} == 0 ) {
			if ($action eq "register2" ) { $newprofile{'ext_'.$id} = 0; }
			else { $newprofile{'ext_'.$id} = $value; }
	 	}
 }
 



As the comment indicates, this is supposed to input the old value of the field if the field is not active or if there is no value defined - but if there is no old value, as during registration, there's no value to put in so it fails. This fix forces the value to be set to 0 if the fields are not active during the registration process.
  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,128
Location: Earth

YaBB 2.6.0
Additional Extended Profiles issues
Aug 11th, 2012 at 10:09pm
Post Tools
Specifically, if an Extended Profile field is set to 'Required on Registration' but not set to 'Active', it blocks Registration as the required field does not display and cannot be filled in. I didn't see any warnings in the directions about this. However, this issue does not seem to appear when the user is in Edit Profile. The field does not display and no error pops up.

I am speculating that this has not been reported as a bug since, normally, if you have something set as Required on Registration, you probably have 'Active' checked.

  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Topic Tools
 
  « Board Index ‹ Board  ^Top