Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Profile Extender fields blank when editing profile

2

Comments

  • rbrahmsonrbrahmson ✭✭✭

    Thanks @hgtonight, that is indeed a workaround, far from elegant I'd say. Obviously not your fault.

  • MrVladMrVlad New
    edited August 2015

    Hello !

    I had a similar issue, and the solution provided by @Bleistivt provided a functionnal workaround for me. However, even after changing line 229 as described, the issue remains when a user registers : Nothing appears in his profile and database 'gdn_usermeta' remains the same.

    If a user edits his profile, then the changes are successfully commited. Does anyone had the same issue ? If so, is there any known solution ? I'll try to look into the code in order to solve the problem (I'm not so good with php though :/).

  • Following my previous post : There is no database update triggered when a user sign up, which is in my case a serious issue. In order to fix this, would you recommand editing an existing function in profile extender (I was thinking using 'RegisterValidation_Handler') or creating a new one ? I'm quite lost so all of this might sound very confused ^^

  • @MrVlad What version of Vanilla? This has likely been fixed with 2.2

  • MrVladMrVlad New
    edited August 2015

    @Bleistivt I'm running v2.1.11 at the moment, thx for the tip :), I'll try to download the latest version and see if I can fix the plugin from that !

    Just to let you know: I'm currently trying to find the best event hook that I can use to, once the user registration is completed, update gdn_usermeta with the data from the registration form ... quite a hard task for me, but i'm not desperate ^^

  • It's working now :D (at least that part) ! Thx a lot !

  • MrVladMrVlad New
    edited August 2015

    Well ... of course there are more issues ! After uploading my plugin (I was testing with wamp before that), the issue is back :( !

    What I did, following @Bleistivt advice, was looking in 2.2b code and use a couple of function from there :

    • function userModel_afterInsertUser_handler ($Sender, $Args)
    • function userModel_afterSave_handler($Sender, $Args)

    with

    • function updateUserFields($UserID, $Fields)

    The probleme is: When I use afterInsertUser_handler, on the server, $Args do NOT contains the data for profile extender fields. So, I thought of using another event hook and when I tried userModel_beforeInsertUser_handler, I sucessfully retreive the data from profile extender fields BUT the information related to the user (ID, etc.) is, of course, not here.

    Then, I tried to create a global variable '$newUserMeta', store the profile extender data inside it using userModel_beforeInsertUser_handler hook, and merge it with '$Args' in afterInsertUser_handler ... which results in an unbelievable mess. Which I don't understand because everything works fine on locale (using parts from 2.2's code).

    After that, I set up some logs too see if the functions from 2.2 are triggered, and they are, in both case (locale and server). So the issue is really with the content of '$Args' with afterSave_handler ...

  • After 10 days of wandering ... my mental health is having a hard time. It works with Wamp, so it must be related to server configuration (I guess), but I have ZERO knowledge in that area ...

    Should I press the reset button for vanilla (if there's one ^^)?

  • I'm having the same problem that MrVlad has. When a user registers and fills out forms created via Profile Extender, that data disappears immediately afterwards.

  • edited September 2015

    I'm having the same problem. When a new user registers, the extra registration forms provided by Profile Extender does not get saved into their user profile.

    Could it have something to do with the fact that this line seems to be commented out by default on line 13 in class.profileextender.plugin.php?

    // 'RegisterPermissions' => array('Plugins.ProfileExtender.Add'),

  • well I tried to enable that line ... the issue remains :/

  • Someone made a PR to fix this in the current master branch: https://github.com/vanilla/vanilla/pull/3104

  • MrVladMrVlad New
    edited September 2015

    I already have the line

    $this->UserFields = Gdn::UserModel()->GetMeta($Sender->User->UserID, 'Profile.%', 'Profile.');
    instead of
    $this->UserFields = Gdn::userModel()->GetMeta($Sender->data("User.UserID"), 'Profile.%', 'Profile.');

    In class.profileextender.plugin.php so this must be related to something else :/

  • I made that pull request, but then I closed it when I discovered the version of Vanilla I was using was a sadly outdated one at 2.0.17.9 as this is the version of Vanilla that GoDaddy provides. The good news @MrVlad is that if you update to the newest version of Vanilla, none of these bugs exist anymore! Hooray! Now, just to figure out how to upgrade. I did find this: http://vanillaforums.org/page/Installation-Upgrade but it goes from 2.0.18 to 2.1, and I want to go from 2.0.17.9 to 2.2.100.8

  • Since it is not too much work, I would suggest you go from 2.0 to 2.1 and after you have tested your 2.1 installation you can upgrade to 2.2, but 2.2 is only alpha by now.

  • @R_J Could you point me to where I can find some directions on upgrading from 2.0.17 to 2.1? Do you think the instructions will still work for 2.0.17 that are supposed to be from 2.0.18 to 2.1 that I posted above?

  • peregrineperegrine MVP
    edited September 2015

    Could you point me to where I can find some directions

    see the release notes, and the instructions in the readme.

    cloning a copy would be the cleanest, then testing.

    should be basically the same issues. same troubleshooting. for 2.0.x to 2.1.x
    theme incompatibilities and plugin incompatibilities.

    if you have not been using vanilla very long, it may be your desire to be the "most up to date", but it would not be prudent, unless you are totally familiar with vanilla and are fully capable of upgrading every theme or plugin you want to use with either 2.2 alpha or 2.2 beta.

    Running a beta version or alpha version of vanilla on a live forum unless you are totally familiar with the code is not too smart.

    Most of the people on this forum can give you support for 2.1, a few for 2.2b1, and less than that for alpha.

    A few people who thought they were particularly smart (but had no experience with vanilla) came crawling back to downgrade, when they ran into issues, and realized they bit off more than they could chew. Or they continually posted on the forum for addon developers to make themes and plugins compatible with 2.2 (which is unreasonable and pestering since 2.2 is still a sliding target and not stable yet otherwise it would not be called beta or alpha).

    http://vanillaforums.org/discussion/24793/yet-another-vanilla-upgrade-and-duplication-tutorial

    skim these also

    http://vanillaforums.org/categories/blog

    http://vanillaforums.org/categories/tutorials

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Thanks @peregrine. I'll try 2.1 first.

  • @gratiafide I'm running 2.1.11 on my server and on my local installation (using git to keep things similar), and the problem only occurs on my server.

    I have the same plugins, the same theme, the same roles, only the number of users differs. So I think it must be related to server configuration, but I can't figure how.

    I tried to turn off all plugins but profile extender and the issue remains.

  • @gratiafide did you find a solution to your problem ?

Sign In or Register to comment.