rick.harrison [gatenbysanderson]
rick.harrison [gatenbysanderson]

Hello,

Anybody got any thoughts on why symlink-ing within the plugins directory might mean the plugins dont get picked up by October in the back-end Components list ?

Here's the scenario - i'm going to be running a lot of small october sites that all need to share the same bespoke self-developed plugins, so rather than copy the plugin into every install and it being a pain if i need to change the plugin further down the line with copying to each virtualhost, i'd like to make my authorname in the plugins directory a symlink to a directory above the webroot where the actual plugins are stored.

so : /plugins/my-author-name/ is a symlink to ../../../../shared-code/plugins/my-author-name

with the plugins placed in the symlinked location instead.

I can artisan create:plugin and artisan create:component fine with the symlink in place, but the plugin never shows up in the october back-end....

If i do away with the symlink and place the exact same plugins in a "normal" directory at plugins/my-author-name/ (all paths identical) they show up fine, which suggests its something about the symlink that causes the issue, but i would have assumed php-fpm would treat the symlink as a normal directory?

if i do an artisan october:up it lists my authorname, which suggests at a cli level php/october is (potentially?) seeing files through the symlink?

Server wise, it's running on my development vagrant box at the moment (Centos6.7 + php55-fpm (via software collections) + apache22 & mod_fastcgi (FollowSymLinks is on in the apache conf)).

Any thoughts on why it wouldn't be working?

Kind Regards, Rick.

elibaird115930
elibaird115930

Yah this is weird. I am running into this as well I am symlinking in my plugin into the directory, and it is not showing up in October.

noezansithole29426
noezansithole29426

Have you guys manage to figure it out?

daftspunk
daftspunk

As far as I know, this has been addressed in recent releases of October CMS, however, you need to activate it via the cms. restrictBaseDir config property.

/*
|--------------------------------------------------------------------------
| Base Directory Restriction
|--------------------------------------------------------------------------
|
| Restricts loading backend template and config files to within the base
| directory of the application.
|
| WARNING: This should always be enabled for security reasons. However, in
| some cases you may need to disable this; for instance when developing
| plugins that are stored elsewhere in the filesystem for organizational
| reasons and then symlinked into the application plugins/ directory.
|
| NEVER have this disabled in production.
|
*/
'restrictBaseDir' => true,

Set this to false

Last updated

1-4 of 4