toteph42 / identy_switch

This plugin allows users to switch between different accounts (and check for new mails) in a single Roundcube session.
GNU General Public License v3.0
6 stars 3 forks source link

Issues enabling identy_switch #3

Closed FlyGuye10 closed 4 months ago

FlyGuye10 commented 4 months ago

Hi, I manage to install identy_switch manually but have a problem with the enable button, despite clicking to "enable" , when I save the setting,it says "successfully saved" but it returns the page with the option still not "enabled" . I am a beginner & have successfully installed a few plugins in roundcube (even got to make "ident_switch" to work. But I would like to move over to your plugin as I think it's better.

Can you assist me? Thank you kindly.

toteph42 commented 4 months ago

Please check version you are using. Is it 1.0.12? (There has been some problems in previous version). DO you have any message in logs/error.log?

HLFH commented 4 months ago

It is when the identy_switch table is not created. And these is an error on that: https://github.com/toteph42/identy_switch/issues/4#issuecomment-2091737580

FlyGuye10 commented 4 months ago

Hi & thank you for replies,

toteph42 - version is 1.0.12. I'm not sure where to find these logs?

HLFH - through SQL web interface, I can see that indent_switch table is created.

I can do another clean install if that would help. I would run "php composer.phar update" with "identy_switch" removed from composer.json file, this would remove identy_switch, then I can go into SQL & drop the "identy_switch" table.

Just correct me if i'm wrong, to re-install 1) make identy entry into composer.json file 2) run php composer.phar update anything else i'm missing?

HLFH commented 4 months ago

I have submitted a PR here: https://github.com/toteph42/identy_switch/pull/5. This is a new plugin, most of use are migrating from the former plugin ident_switch, we need to drop the former ident_switch table and create the identy_switch table. If you don't have the identy_switch table but the former one ident_switch, it won't work either. I am waiting for my PR to be merged to increase readability on the SQL setup.

To drop the former table:

DROP TABLE IF EXISTS ident_switch;

In your roundcubemail folder, you can see the error log in the logs folder.

In your file config.inc.php of your Roundcube instance, you should add identy_switch to your plugins list:

$config['plugins'] = ['identy_switch'];

And remove ident_switch if you had it.

toteph42 commented 4 months ago

Hi,

if I encounter composer require toteph42/identy_switch RoundCube always creates the table identy_switch. During installation I was always asked if RoundCube should enable plugin in config/config.inc.php.

Even if ident_switch table is in your SQL database, this does not affect how identy_switch plugin works.

The log file logs/errors.log is located in the RoundCube base directory. You may also edit plugins/identy_switch/config.inc.php and enable logging ('logging' => true,). Then a file logs/identy_switch.log is created. Both may give you more information if any error had occurred.

FlyGuye10 commented 4 months ago

Hi, Sorry for late reply, have been away on work. I have enabled logging in plugins/identy_switch/config.inc.php but there is still no log errors. there is no log file created as well. I have updated to 1.0.13 but still getting the same issue, I can add info into identities but when I click "save", it says "successfully saved" but the enabled button is still "not enabled" & none of the inputs I have inserted is there. I so lost now.

syncgw commented 4 months ago

Strange...

One stupid question: Did you click on the "Enabled" switch before saving?

To reproduce I need exactly where you're clicking and which fields in which order you're filling and finnaly saving content.

FlyGuye10 commented 4 months ago

Hi, I would go to identities, go do to "identy_switch" section, click "enabled" button, then go down to enter login details & also enable items under "new messages" area. Finally, I would click on "save". but then when the page reloads, the "enabled" button is still disabled. I'll attach some pics for better illustration if it would help. top_part_identy_switch selected_items Screenshot 2024-05-08 190958 Screenshot 2024-05-08 191149 Screenshot 2024-05-08 191219

syncgw commented 4 months ago

Hi, can reproduce. Will fix it. To make it work, you need to enter all the data (IMAP/SMTP Host) protocol, port and all that stuff). I will modify to take defaults from RoundCube configuration.

FlyGuye10 commented 4 months ago

Hi, thank you for the prompt reply :) just to be clear, it will work now only if I enter all info?

FlyGuye10 commented 4 months ago

I just tried, filled all the fields & clicked save but still failed to enable..... :(

syncgw commented 4 months ago

Hi, I checked it. If you create a new identity and enter xxx in field Display Name and as Email xx@x.xom and then turn on field Enabled (Data of identity) and click Save, no new record will be created in table identity_switch. This is due to a limitation of RoundCube.

When you then enables Data of identity again and click on Save you should get error message Value in 'SMTP Port' field must be a number. until you fill all fields correctly. Entered values will be temporary available, but you need to enable Data of identity each time you get an error message.

At the end, a new record in identity_switch table is created and you can switch to that identity.

syncgw commented 4 months ago

Added a special message and locking identy_switch section as long as identity record is not created.

toteph42 commented 4 months ago

No further input. closing