dokuwiki-plugin-mdpage
dokuwiki-plugin-mdpage copied to clipboard
mdpage plugin doesn't work with farms
This is a bug report.
| Name | Value |
|---|---|
| DokuWiki Version | Release 2020-07-29 "Hogfather" |
| PHP Version | PHP Version 7.3.5 |
| OS | Debian 4.19.132-1 (2020-07-24) x86_64 GNU/Linux |
| Web Server | Apache/2.4.25 (Debian) |
Details:
When installing the mdpage plugin in a Dokuwiki farm, Dokuwiki becomes inoperable because the condition below doesn't meet, even though the file exists, there should be another way to validate it in a farm environment.
https://github.com/mizunashi-mana/dokuwiki-plugin-mdpage/blob/8d8ade76b71acfced603580f7ad4cbe9c76d5e08/src/bootstrap.php#L7-L10
Farm directory structure:

The error I got is:

I'm not sure if the src/bootstrap.php is required at all within this plugin, the function includeIfExists isn't being called outside this file.
@iocampomx Thanks for the report. I need more information.
How do you install this plugin? I do not have any troubles on Debian 10, Apache 2.4 and PHP 7.3. The error message means plugin could not find own libraries, not DokuWiki's libraries.
You cannot use this plain repository as a DokuWiki plugin. The distributed plugin archive include vendor libraries installing by composer which are not included in this git repository. I prefer you to install this plugin by "Search and Install" via DokuWiki's Extension Manager.
Hi @mizunashi-mana, your assessment makes sense. I'm installing the plugin just by downloading and unzipping it (it's an automated process that works for other 10+ plugins), but in this case, I will explore adding a composer install call.
I suggest to include a note about manual installation in the documentation.
Will keep you posted. Thanks!
@iocampomx I see. You can use https://github.com/mizunashi-mana/dokuwiki-plugin-mdpage/raw/release/plugin-package.tar.gz for manual installation, and you always can get this URL by the "Download" link on https://www.dokuwiki.org/plugin:mdpage which is used by DokuWiki's Extension Manager; other plugin's archives are also got same way. This is full contents including vendor libraries, and you do not need to install some by composer if you use that archive.
I suggest to include a note about manual installation in the documentation.
I recommend to install this plugin by DokuWiki's Extension Manager to avoid confusion. But, I will consider it.
Hi @mizunashi-mana, the plugin-package.tar.gz file should be extracted in a folder instead of on the self directory.
Here an example of a plugin https://github.com/splitbrain/dokuwiki-plugin-smtp/releases/tag/2020-02-24 with the behavior I'm looking for.
Also, based on Dokuwiki documentation it seems you aren't including the dependencies and your plugin requires to run composer manually, which is the opposite of what Dokuwiki is recommending to distribute plugins.
@iocampomx Thanks for feedback.
Hi @mizunashi-mana, the plugin-package.tar.gz file should be extracted in a folder instead of on the self directory.
I do not support this for compatibility as long as DokuWiki allow current archive structure. Someone may already be using this archive and depending its structure.
Also, based on Dokuwiki documentation it seems you aren't including the dependencies and your plugin requires to run composer manually, which is the opposite of what Dokuwiki is recommending to distribute plugins.
This document is about DokuWiki's manner for its own libraries, not the recommendation for plugins. DokuWiki use Composer and have some problems, but the reason why I use Composer for this plugin is independent from DokuWiki usage; this plugin would be maintained by Composer if DokuWiki did not use it.
And, this plugin does not require to run Composer manually. You can use https://github.com/mizunashi-mana/dokuwiki-plugin-mdpage/raw/release/plugin-package.tar.gz for manual installation or Extension Manager for one-click installation without Composer.