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.

Question on utility/structure

I am not a coder and I am having a problem with two emails being generated when a user applies for membership. I am also getting two applicants in the dashboard for the same user. I did some testing and when registering as a new user, the "click on the link to confirm email address" generates a fatal error. Before I post the error I ran /utility/structure and I get this.

update GDN_Role Role
set Type = 'applicant'
where RoleID in ('12', '1');

update GDN_Role Role
set Type = 'member'
where RoleID in ('8', '6');

update GDN_Role Role
set Type = 'unconfirmed'
where RoleID in ('13', '10');

update GDN_User User
set Permissions = ''
where Permissions <> '';

Is running the Run Structure and Data Scripts suppose to fix these problems or is that something I need to figure out. Running them does not seem to solve it when I rescan. Any idea how to fix this or do I need to post the fatal error info?

TIA

Dan

Comments

  • LincLinc Detroit Admin

    What version of Vanilla are you running? Is this a new site? Did you import from another platform?

    Something isn't right with your GDN_Roles table; it shouldn't be trying to set those Types on 2 rows each. The Permissions thing you can ignore, but it implies your Vanilla install is overdue for an update since we solved that a while back.

    vrijvlinder
  • Thanks Linc, not a new site, been running Vanilla for many years. Upgraded to 2.2.1 about a month and a half ago. Also upgrade my php at the same time. It is not a very active forum so I never noticed this problem. I think the problem just happened when I decided to remove some roles and create others. The problem goes away when I change the registration from Approval to Basic. The confirmation email link for the user generates the error when he clicks on it and I receive two approval/decline requests. I can approve or decline the user but one approve/decline remains. Only way I can get rid of the second one is to delete the user. Then the second approve/decline goes away. I am happy at 2.2.1 and was looking for a fix to avoid going through another update right now.

    Additional information for support personnel:
    Application: Vanilla
    Application Version: 2.2.1
    PHP Version: 7.0.14
    Operating System: Linux
    Server Software: Apache
    User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/602.4.8 (KHTML, like Gecko) Version/10.0.3 Safari/602.4.8
    Request Uri: /vanilla-2/entry/emailconfirm/150/JOHL4966
    Controller: PHP
    Method: trigger_error

  • Ok, @Linc, here is the what I get on the error:

    The error occurred on or near: /home/devinephoto/www.berksbassmasters.com/vanilla-2/library/database/class.database.php
    418: $this->closeConnection();
    419: continue;
    420: }
    421:
    422: trigger_error($message, E_USER_ERROR);
    423: }
    424:
    425: }
    426:
    Backtrace:
    /home/devinephoto/www.berksbassmasters.com/vanilla-2/library/database/class.database.phpPHP::Gdn_ErrorHandler();
    [/home/devinephoto/www.berksbassmasters.com/vanilla-2/library/database/class.database.php:422] PHP::trigger_error();
    [/home/devinephoto/www.berksbassmasters.com/vanilla-2/library/database/class.sqldriver.php:1663] Gdn_Database->query();
    [/home/devinephoto/www.berksbassmasters.com/vanilla-2/library/database/class.sqldriver.php:1083] Gdn_SQLDriver->query();
    [/home/devinephoto/www.berksbassmasters.com/vanilla-2/applications/dashboard/models/class.usermodel.php:2214] Gdn_SQLDriver->insert();
    [/home/devinephoto/www.berksbassmasters.com/vanilla-2/applications/dashboard/models/class.usermodel.php:554] UserModel->saveRoles();
    [/home/devinephoto/www.berksbassmasters.com/vanilla-2/applications/dashboard/controllers/class.entrycontroller.php:1742] UserModel->confirmEmail();
    [/home/devinephoto/www.berksbassmasters.com/vanilla-2/library/core/class.dispatcher.php:329] EntryController->emailConfirm();
    [/home/devinephoto/www.berksbassmasters.com/vanilla-2/index.php:44] Gdn_Dispatcher->dispatch();
    Variables in local scope:
    [Sql] 'insert GDN_UserRole
    (UserID, RoleID)
    values (:UserID, :RoleID)'
    [InputParameters] array (
    ':UserID' => 150,
    ':RoleID' => 1,
    )
    [Options] array (
    'Type' => 'insert',
    'Slave' => NULL,
    'ReturnType' => 'ID',
    )
    [ReturnType] 'ID'
    [tries] 2
    [try] 0
    [PDO] array (
    )
    [PDOStatement] array (
    'queryString' => 'insert GDN_UserRole
    (UserID, RoleID)
    values (:UserID, :RoleID)',
    )
    [state] '00000'
    [code] NULL
    [message] NULL
    [ex] array (
    )

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    You need to update to 2.3 ASAP We are not offering support for old versions that had security or other issues.

    Your problem is related to not updating and following the protocol. All of these issues were fixed in the new version.

    I am happy at 2.2.1 and was looking for a fix to avoid going through another update right now.

    You will be happier if you update to 2.3. It is easy and fast. And 2.3 has many improvements you are missing out on.

Sign In or Register to comment.