- edited description
Setting wont be saved.
Hi! i installed your plugin, i see the config-options in the Identities Section but the Information wont be saved.
Always get back to this state.
any ideas?
Comments (19)
-
reporter -
reporter - edited description
-
Did you do the database import?
-
reporter uhm.. ^^ no really :-D
not read anything about it, iam new to RC sorry. -
No problem You must import the SQL into the Roundcube database. Then he saves your settings.
-
reporter imported the mysql initial file…but error comes up
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'label
varchar(32),
flags
int
NOT NULL
DEFAULT 0,
smtp_host
varcha' at line 1
-
reporter at mariaDB anything to change?
-
reporter soooo i get the import to work.
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;CREATE TABLE
ident_switch
(
id
int(10) UNSIGNED NOT NULL,
user_id
int(10) UNSIGNED NOT NULL,
iid
int(10) UNSIGNED NOT NULL,
username
varchar(64) DEFAULT NULL,
password
varchar(64) DEFAULT NULL,
imap_host
varchar(64) DEFAULT NULL,
imap_port
int(11) DEFAULT NULL,
imap_delimiter
char(1) NOT NULL,
label
varchar(32) DEFAULT NULL,
flags
int(11) NOT NULL DEFAULT '0',
smtp_host
varchar(64) DEFAULT NULL,
smtp_port
int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;ALTER TABLE
ident_switch
ADD PRIMARY KEY (id
),
ADD UNIQUE KEYuser_id_label
(user_id
,label
),
ADD KEYIX_ident_switch_user_id
(user_id
),
ADD KEYIX_ident_switch_iid
(iid
);ALTER TABLE
ident_switch
MODIFYid
int(10) UNSIGNED NOT NULL AUTO_INCREMENT;ALTER TABLE
ident_switch
ADD CONSTRAINTfk_identity_id
FOREIGN KEY (iid
) REFERENCESidentities
(identity_id
) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINTfk_user_id
FOREIGN KEY (user_id
) REFERENCESusers
(user_id
) ON DELETE CASCADE ON UPDATE CASCADE;
COMMIT;
but the Script did not save anyhow.
now iam at the end
-
So the import is now successful? does it give an error message when saving?
-
reporter import works. Save didnt - no Error messages…
-
repo owner There should be personal log file of the plugin. Usually /var/log/roundcube/ident_switch
Also check that new table esists in database and has correct assecc rights. It could be an issue if you have created it under your account, not roundcube.
-
I have the same problem with the same SQL error. I am using a 5.5.62 MariaDB database.
-
At install, I get an error when creating the table in Postgres:
ERROR: [7] ERROR: column "port" does not exist (SQL Query: CREATE TABLE ident_switch …
imap_port integer CHECK(port > 0 AND port <= 65535), …
The check should have imap_port instead of port. smtp_port has the same issue.
-
repo owner @Gregory Odom , you are using outdated SQL script. This was fixed in 4a20b77edb495c3e4c1587b039e253ee59982d05. To be shure you can use SQL script from trunk.
-
I tried also with a MySQL database : I have the same SQL error at the import of mysql.initial.sql
Request:
label varchar(32), flags int NOT NULL DEFAULT 0, smtp_host varchar(64), smtp_port int CHECK(smtp_port > 0 AND smtp_port <= 65535), drafts_mbox varchar(64), sent_mbox varchar(64), junk_mbox varchar(64), trash_mbox varchar(64), UNIQUE KEY user_id_label (user_id, label), CONSTRAINT fk_user_id FOREIGN KEY (user_id) REFERENCES users(user_id) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT fk_identity_id FOREIGN KEY (iid) REFERENCES identities(identity_id) ON DELETE CASCADE ON UPDATE CASCADE, PRIMARY KEY(id), INDEX IX_ident_switch_user_id (user_id), INDEX IX_ident_switch_iid (iid) );
MySQL replies :
#1064 - Syntax error near 'label
varchar(32),
flags
int
NOT NULL
DEFAULT 0,
smtp_host
varcha' at line 1
Thanks for help
-
I found a fix for MariaDB.
It seems that all the values (id, user_id, iid, username,..) they need to be quoted with “`”.
…
CREATE TABLE IF NOT EXISTS `ident_switch`
(
`id`
int(10) UNSIGNED
NOT NULL
AUTO_INCREMENT,
`user_id`
int(10) UNSIGNED
NOT NULL,
`iid`…
I guess MySQL is more permissive with that.
-
repo owner Thanx, will check this weekend
-
repo owner Looks like you have enabled some unusual option in your config. Label is not a reserved word:
-
repo owner - changed status to closed
Quote all identifier for MySQL/MariaDB. Closes
#54→ <<cset 312026b059a6>>
- Log in to comment