jsConnect gives a bonk error on v 2.0.18.11
I'm getting a bonk error when trying to add a connection with jsConnect.
I've set up a brand new installation of Vanilla version 2.0.18.11 on http://staging.contraptionmaker.com/forums and installed jsConnect 1.4.1. When attempting to add a connection I get a bonk error.
I don't get this error in version 2.2.10.3 from Github, but I'm assuming I wouldn't want to use that version on a live site. Is that right or is it ok to use? There are some slight css issues with sidebar in that version, but at least the jsConnect works.
I turned debug on and here is the error I'm getting on version 2.0.18.11 when I add a connection in jsConnect 1.4.1:
Unknown column 'IsDefault' in 'field list'
insert ignore GDN_UserAuthenticationProvider
(Name, AuthenticationKey, URL, AssociationSecret, AuthenticateUrl, SignInUrl, RegisterUrl, SignOutUrl, IsDefault, AuthenticationSchemeAlias, AssociationHashMethod, Attributes)
values (:Name, :AuthenticationKey, :URL, :AssociationSecret, :AuthenticateUrl, :SignInUrl, :RegisterUrl, :SignOutUrl, :IsDefault, :AuthenticationSchemeAlias, :AssociationHashMethod, :Attributes)
The error occurred on or near: /var/www/cm-staging2/forums/library/database/class.database.php
276:
277: if (!is_object($PDOStatement)) {
278: trigger_error(ErrorMessage('PDO Statement failed to prepare', $this->ClassName, 'Query', $this->GetPDOErrorMessage($this->Connection()->errorInfo())), E_USER_ERROR);
279: } else if ($PDOStatement->execute($InputParameters) === FALSE) {
280: trigger_error(ErrorMessage($this->GetPDOErrorMessage($PDOStatement->errorInfo()), $this->ClassName, 'Query', $Sql), E_USER_ERROR);
281: }
282: } else {
283: $PDOStatement = $this->Connection()->query($Sql);
284: }
Backtrace:
/var/www/cm-staging2/forums/library/database/class.database.phpPHP::Gdn_ErrorHandler();
[/var/www/cm-staging2/forums/library/database/class.database.php:280] PHP::trigger_error();
[/var/www/cm-staging2/forums/library/database/class.sqldriver.php:1657] Gdn_Database->Query();
[/var/www/cm-staging2/forums/library/database/class.sqldriver.php:1128] Gdn_SQLDriver->Query();
[/var/www/cm-staging2/forums/plugins/jsconnect/class.jsconnect.plugin.php:492] Gdn_SQLDriver->Insert();
[/var/www/cm-staging2/forums/plugins/jsconnect/class.jsconnect.plugin.php:443] JsConnectPlugin->Settings_AddEdit();
[/var/www/cm-staging2/forums/library/core/class.pluginmanager.php:713] JsConnectPlugin->SettingsController_JsConnect_Create();
[/var/www/cm-staging2/forums/library/core/class.dispatcher.php:313] Gdn_PluginManager->CallNewMethod();
[/var/www/cm-staging2/forums/index.php:53] Gdn_Dispatcher->Dispatch();
Variables in local scope:
[Sql] 'insert ignore GDN_UserAuthenticationProvider
(Name, AuthenticationKey, URL, AssociationSecret, AuthenticateUrl, SignInUrl, RegisterUrl, SignOutUrl, IsDefault, AuthenticationSchemeAlias, AssociationHashMethod, Attributes)
values (:Name, :AuthenticationKey, :URL, :AssociationSecret, :AuthenticateUrl, :SignInUrl, :RegisterUrl, :SignOutUrl, :IsDefault, :AuthenticationSchemeAlias, :AssociationHashMethod, :Attributes)'
[InputParameters] array (
':Name' => 'Contraption Maker Forums',
':AuthenticationKey' => '1281901608',
':URL' => NULL,
':AssociationSecret' => 'a8e9f84d574d3e6481c588312da9d4d3',
':AuthenticateUrl' => 'http://staging.contraptionmaker.com/?VFRequest=connect',
':SignInUrl' => 'http://staging.contraptionmaker.com/wp-login.php?redirect_to={Target}',
':RegisterUrl' => 'http://staging.contraptionmaker.com/wp-login.php?action=register',
':SignOutUrl' => 'http://staging.contraptionmaker.com/wp-login.php?action=logout',
':IsDefault' => false,
':AuthenticationSchemeAlias' => 'jsconnect',
':AssociationHashMethod' => 'md5',
':Attributes' => 'a:3:{s:8:"HashType";s:3:"md5";s:8:"TestMode";b:0;s:7:"Trusted";s:1:"1";}',
)
[Options] array (
'ReturnType' => 'ID',
)
[ReturnType] 'ID'
[PDOStatement] array (
'queryString' => 'insert ignore GDN_UserAuthenticationProvider
(Name, AuthenticationKey, URL, AssociationSecret, AuthenticateUrl, SignInUrl, RegisterUrl, SignOutUrl, IsDefault, AuthenticationSchemeAlias, AssociationHashMethod, Attributes)
values (:Name, :AuthenticationKey, :URL, :AssociationSecret, :AuthenticateUrl, :SignInUrl, :RegisterUrl, :SignOutUrl, :IsDefault, :AuthenticationSchemeAlias, :AssociationHashMethod, :Attributes)',
)
Comments
I'll try 2.1 stable and see if that works.
Nope same exact error in 2.1 stable. Anyone know how I might fix this?
Hi @eddieo, try running /utility/update.
did you try this
ALTER TABLE GDN_UserAuthenticationProvider ADD IsDefault BOOLEAN NOT NULL DEFAULT FALSE ;
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I had the same issue and this worked perfectly for me.
Yup that worked perfectly. Thanks!
While that allows you to add the connection, the "Make this connection your default signin method." does nothing .. and on sign in it will show the login/password box instead of using the connector
Where should we be putting this?
its a SQL command to alter you table structure. not a code insertion.
although it is somewhat bizarre why jsconnect doesn't add it in the structure statements (baffling, but stranger things have happened).
sounds like you need a tutorial on phpmyadmin or mysql.
both available on the web.
http://vanillaforums.org/discussion/20231/how-to-become-somewhat-adept-at-modifying-vanilla-to-meet-your-needs-for-free
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
"Make this connection your default signin method" will make the Sign In & Register buttons go to your indicated URLs if you've chosen "Connect" under Registration -> Registration Method in the Dashboard.
I know that's the plan .. but it won't work with the currently released versions...
obviously the "IsDefault" field is missing in the forums database .. so it is never used by the forum software itself.
I searched the vanilla source for isDefault and found out that it is a 2.2 feature
https://github.com/vanilla/vanilla/commit/bee980aaf32094238c5be0f2c83db5b6be0330df