NOTE:: Before reporting an issue, make sure you are running the latest version, currently 3.3.1

View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0016845phplist applicationpluginspublic23-08-13 23:2327-08-13 22:01
PlatformOSOS Version
Product Version3.0.2 
Target Version3.0.3Fixed in Version3.0.3 
Summary0016845: Plugins not detected on public pages
DescriptionOn the public pages, subscribe etc, plugins are not detected when PLUGIN_ROOTDIR is a relative directory, such as the default 'plugins'. The value is implicitly relative to the admin directory.

The problem arises because the public pages have a current working directory of lists and therefore the plugin directory does not exist.
Whereas the admin pages have a current working directory of admin.

See file admin/pluginlib.php line 22
  if (is_dir($pluginRootDir)) {

When I changed the PLUGIN_ROOTDIR value from 'plugins' to the full file system path then the plugins were detected.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
michiel (manager)
24-08-13 00:01

I guess
   if (is_dir($pluginRootDir)) {

should become
  if (is_dir(dirname(__FILE__).'/'.$pluginRootDir)) {
duncanc (developer)
24-08-13 10:08

That will not work when the plugin root dir is an absolute path.

The problem is the current working directory. That needs to be changed to the 'admin' directory when on a public page prior to the include of pluginlib.php.
That might break something else but I tried adding this at line 29 of index.php and it seems to work:


Or in pluginlib.php temporarily change the current working directory to the 'admin' directory, and then change it back. But that would be redundant when not on a public page.
michiel (manager)
27-08-13 22:01

rev4212 - expand the pluginrootdir, if not found as is.

Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker