So Confused about Plugins
-
Any tutorial that I find to install plugins assumes a lot of knowledge that I don't have. My only experience with composer is how it relates to wordpress the few times I've used it was as part of wp-cli. Can anyone provide me some clarity or fill in the blanks. I don't understand what order to do everything in, which composer.json file are they referring to and can this be done for an app thats already deployed??
-
@nebulon said in So Confused about Plugins:
have you seen and tried https://docs.cloudron.io/apps/roundcube/#plugins already?
I'm not sure, but I think that's out of date and you now have to use Composer for all Roundcube plugins.
At least that's what it sounds like here:
-
@nebulon yes this was the first place I looked.
In this documentation it’s unclear where and when I would use composer or how exactly. When it mentioned uploading I assumed I could download plugins somewhere, but that doesn’t seem to be the case from the roundcube plugins website. Their documentation doesn’t really say if I update the composer.json that already exists or create a new one? It’s just unclear.I attempted to just use composer require in the terminal which downloaded the package but then threw an error and deleted it.
-
@derin I have updated the plugin section a bit - https://docs.cloudron.io/apps/roundcube/#plugins . We don't support installing plugins via composer because that involves editing the source code which is not a good idea. Instead, many plugins provide tarballs that you can upload into the plugin directory. I tried a couple of them using the instructions in the docs and it seems to work.
Let me know if I can make the docs clearer.
-
@girish said in So Confused about Plugins:
Let me know if I can make the docs clearer.
It's still a bit confusing that it says:
Cloudron package does not support installing plugins via Composer since that involves editing composer.json which makes automatic updates tricky.
But then still goes on to say:
- Some plugin release tarballs do not contain dependancies and have to be installed via composer. composer requires a lot of RAM for it's resolution mechanism. For this reason, first bump the memory limit of the app to 2GB (you can reset back the memory limit after plugin installation). Open a Web Terminal and run the following:
# cd /app/data/plugins/<plugin> # composer install --no-dev --optimize # chown -R www-data:www-data .
-
@jdaviescoates the plugins itself are not installed via composer but the plugin's dependencies (depending on the plugin) are
-
@girish thanks for the help but im still a bit lost. For example:
The Kolab Calender plugin: https://packagist.org/packages/kolab/calendar
As far as I understand it requires 2 dependencies aside from the roundcube plugin installer. Now would I just download the file from the linked github repository?
And then the two dependencies listed I am assuming would then be installed via composer?
-
@girish said in So Confused about Plugins:
@jdaviescoates the plugins itself are not installed via composer but the plugin's dependencies (depending on the plugin) are
I kinda sorta guessed that much, but it's still a bit confusing. It reads like one bit is contradicting the other. I'm not sure exactly how to suggest to improve it, but it could certainly be improved
-
@girish said in So Confused about Plugins:
I have updated the plugin section a bit - https://docs.cloudron.io/apps/roundcube/#plugins
I just tried installing the carddav plugin (I think perhaps that should actually come pre-packaged in the app), but so far I can't get it to work.
Does the Roundcube app need to be restarted or anything? (not that that has helped me, just be good to know).
I note that the docs say:
- Add the plugin to $config['plugins'] in /app/data/customconfig.php. The name below must match the name of the directory in the first step.
array_push($config['plugins'], 'myplugin');
But in the actual
customconfig.php
file in the app it doesn't have$config
it has$rcmail_config
- so either the file in the app or the docs need updating to reflect whichever is actually correct.Also, I think I'm correct in saying that you don't need to add another
array_push...
line, just to add'myplugin'
to the existing array, right?So perhaps the docs should say:
Add the plugin to $rcmail_config['plugins'] in /app/data/customconfig.php. The name below must match the name of the directory in the first step.
array_push($rcmail_config['plugins'],'message_label','myplugin','myplugin2');
To make that clearer?
Also, just so I know, does whitespace/ spaces make any difference in this file?
Thanks!
- Add the plugin to $config['plugins'] in /app/data/customconfig.php. The name below must match the name of the directory in the first step.