Wedge

Public area => Bug reports => The Pub => Archived fixes => Topic started by: BurkeKnight on August 23rd, 2014, 03:47 PM

Title: Profile Fields
Post by: BurkeKnight on August 23rd, 2014, 03:47 PM
When set up a custom profile field, there are errors in log when placement is set to Standard (with title).
Quote
URL http://www.SITE.com/?action=profile;area=summary
8: Array to string conversion
File: /public_html/SITE.com/core/html/Profile.template.php
Line: 216
Quote
URL http://www.SITE.com/?action=profile;area=summary
8: Array to string conversion
File: /public_html/SITE.com/core/html/Profile.template.php
Line: 205
Title: Re: Profile Fields
Post by: CerealGuy on August 24th, 2014, 08:56 PM
I'm having the same problem, adding custom fields via hook (http://wedge.org/pub/feats/8677/hook-custom-fields/).
Code: (Broken line) [Select]
<dt>', profile_privacy_icon('custom_' . $field, $field['name'] . $txt[':']), '</dt>

Im not really sure what it should be, perhaps just 'custom_field' or something like that (but its a bit long, i dont know...).
My suggestion would be
Code: [Select]
<dt>', profile_privacy_icon('custom_'.$field['name'] , $field['name'] . $txt[':']), '</dt>
.

But how you do it, privacy for custom fields is still broken. Needs perhaps some more work and perhaps an option to disable privacy features for certain custom fields.
Title: Re: Profile Fields
Post by: Nao on August 24th, 2014, 11:03 PM
No no I just made a mistake in my code, and didn't test because I don't have custom fields here.

I'll fix that ASAP but a bit busy irl right now.
Title: Re: Profile Fields
Post by: BurkeKnight on August 25th, 2014, 02:25 AM
Not looking for any rushing here...
Just doing my part to help, reporting what I find. :)


When do fix it, if could post here the fix for existing forum, would appreciate it. :)
Title: Re: Profile Fields
Post by: Nao on August 25th, 2014, 08:26 PM
https://github.com/Wedge/wedge/commit/e33bf389d6e312a7cbca17df1bdae34663062fb3#diff-f6d55bd4e44518c57e6a88ca6385af98

;)
Title: Re: Profile Fields
Post by: BurkeKnight on August 26th, 2014, 06:26 AM
Works perfectly, my friend. :)

Thank you.