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

mdpage plugin doesn't work with farms #68

Open
iocampomx opened this issue Sep 14, 2020 · 5 comments
Open

mdpage plugin doesn't work with farms #68

iocampomx opened this issue Sep 14, 2020 · 5 comments
Labels
need feedback More information is needed

Comments

@iocampomx
Copy link

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.

if (
(!$loader = includeIfExists(__DIR__.'/../vendor/autoload.php'))
&& (!$loader = includeIfExists(__DIR__.'/../../../autoload.php'))
) {

Farm directory structure:

image

The error I got is:

image

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 iocampomx changed the title mdpage plugin doesn't work with farm mdpage plugin doesn't work with farms Sep 14, 2020
@mizunashi-mana mizunashi-mana added the need feedback More information is needed label Sep 14, 2020
@mizunashi-mana
Copy link
Owner

mizunashi-mana commented Sep 14, 2020

@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.

@iocampomx
Copy link
Author

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!

@mizunashi-mana
Copy link
Owner

@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.

@iocampomx
Copy link
Author

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.

@mizunashi-mana
Copy link
Owner

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need feedback More information is needed
Projects
None yet
Development

No branches or pull requests

2 participants