Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Added plugins in config/local.inc.php are not considered #177

Open
CodeShakingSheep opened this issue Jul 26, 2023 · 1 comment
Open

Comments

@CodeShakingSheep
Copy link
Member

Describe the bug

The readme states

You can extend - or even override - the Roundcube configuration which is coming with this package in the file conf/local.inc.php. Do not edit the file conf/config.inc.php as future upgrades will overwrite it.

And it gives this example for adding a plugin:

<?php
$config['plugins'][] = 'html5_notifier';

However, this doesn't seem to work in my case. I installed this plugin twofactor_gauthenticator with composer. Then I created config/local.inc.php and put in the following:

<?php
$config['plugins'][] = 'twofactor_gauthenticator';

However, the plugin didn't appear in the settings. When I added it to the plugin section in config/conf.inc.php it showed up and worked.

Can anybody reproduce this? Could it be related to the renaming of the folder? The readme states conf/local.inc.php while the folder seems to have been renamed to config. I wanted to create a PR updating the readme with the correct folder name but doesn't make sense if it's not working. Any suggestions?

Context

  • Hardware: VPS bought online
  • YunoHost version: 11.2.3
  • I have access to my server: Through SSH | through the webadmin
  • Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: no

Steps to reproduce

  1. Install plugin
    Inside roundcube directory run ./composer.phar require alexandregz/twofactor_gauthenticator as roundcube user.
  2. Adopt permissions for folder
    Form /plugins folder run chown -R roundcube:www-data twofactor_gauthenticator/ and chmod o-rx twofactor_gauthenticator/
  3. Apply this comment for plugin
    Roundcube 1.6 Support? alexandregz/twofactor_gauthenticator#170 (comment)
  4. Create / edit config/local.inc.php with this:
<?php
$config['plugins'][] = 'twofactor_gauthenticator';
  1. Open settings in Roundcube and see that the expected entry isn't present
  2. Add plugin in config/conf.inc.php instead of config/local.inc.php
  3. Open settings again and see that the expected entry is present now

Expected behavior

The plugin should be activated in Roundcube when adding it inside /config/local.inc.php.

@nicofrand
Copy link

I don't think config/local.inc.php is read at all.

To confirm it I put (and then removed ofc) file_put_contents("/tmp/test-roundcube-config.txt", "config file read"); at the beginning of config/config.inc.php and file_put_contents("/tmp/test-roundcube-local.txt", "local config file read"); in config/local.inc.php (with the same rights) and only /tmp/test-roundcube-config.txt was created.

Also the configuration directory is now config and not conf like stated in the disclaimer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants