Bug 1372948 - Error 500 due to missing vendor directory /usr/share/dokuwiki/vendor
Summary: Error 500 due to missing vendor directory /usr/share/dokuwiki/vendor
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dokuwiki
Version: 26
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Andrew Colin Kissa
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-04 08:31 UTC by Georgios Anastasiou
Modified: 2018-09-20 05:16 UTC (History)
12 users (show)

Fixed In Version: dokuwiki-20180422a-1.fc28 dokuwiki-20180422a-2.fc27
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-29 12:35:59 UTC


Attachments (Terms of Use)
specfile (10.44 KB, text/x-matlab)
2016-10-15 09:22 UTC, Paul van Maaren
no flags Details
Patch to add missing vendor directory to spec file (838 bytes, patch)
2017-02-17 04:30 UTC, Aaron Copley
no flags Details | Diff

Description Georgios Anastasiou 2016-09-04 08:31:33 UTC
Description of problem:
The web application is crashing due to a missing php file. The file is required when you are trying to access http://localhost/dokuwiki.

The file that seems it is missing is: /usr/share/dokuwiki/vendor/autoload.php 

Version-Release number of selected component (if applicable): 
fedora24 - dokuwiki-0.27.20150810a.fc24


How reproducible:


Steps to Reproduce:
1. Try to access http://localhost/dokuwiki
2. Inspect error_log in /var/log/httpd/error_log
3. [Sun Sep 04 10:28:31.609701 2016] [:error] [pid 13894] [client ::1:47708] PHP Warning:  require_once(/usr/share/dokuwiki/vendor/autoload.php): failed to open stream: No such file or directory in /usr/share/dokuwiki/inc/init.php on line 194
[Sun Sep 04 10:28:31.609786 2016] [:error] [pid 13894] [client ::1:47708] PHP Fatal error:  require_once(): Failed opening required '/usr/share/dokuwiki/vendor/autoload.php' (include_path='.:/usr/share/pear:/usr/share/php') in /usr/share/dokuwiki/inc/init.php on line 194


Actual results:

Error 500 - Blank Page

Expected results:

Homepage of Dokuwiki(doku.php)

Additional info:

Comment 1 Georgios Anastasiou 2016-09-04 18:54:45 UTC
Seems that it is not only one file, but the whole vendor directory in /usr/share/dokuwiki/vendor is missing. Once i have extracted the directory from the stable release. It was working fine.

Comment 2 Dominik 'Rathann' Mierzejewski 2016-09-15 10:55:57 UTC
Same here.

Comment 3 Paul van Maaren 2016-10-15 09:22:09 UTC
Created attachment 1210749 [details]
specfile

Attached a spec file that fixed the issue for me.

Comment 4 RottenBeauty 2016-12-18 16:59:12 UTC
Since Fedora 23 is at end-of-life and Fedora 23 is the last version where dokuwiki actually works. This is an important issue to be resolved now.

I have upgraded to Fedora 24 and then reinstalled dokuwiki from Fedora 23.

As far as I can tell this is unresolved in Fedora 25.

This is a show stopper for over 3 months!

Will it ever be fixed?

Comment 5 Zachary Elcor 2016-12-21 16:53:12 UTC
same here with f24 and f25.

Comment 6 Paul van Maaren 2016-12-21 17:21:53 UTC
Has anybody tried the spec file I have attached? It solved the problem for me.

Comment 7 Zachary Elcor 2016-12-26 14:59:16 UTC
(In reply to Paul van Maaren from comment #6)
> Has anybody tried the spec file I have attached? It solved the problem for
> me.

Could you elaborate on how you use your spec file please ?

Comment 8 Solomon Peachy 2016-12-26 15:43:22 UTC
The realllly short version:

 * install the rpmdevtools package
 * grab the original srpm and install it (rpm -i dokuwiki...src.rpm)
 * plop the new spec file in ~/rpmbuild/SPECS
 * rpmbuild -bb --clean ~/rpmbuild/SPECS/dokuwiki....spec
 * the resulting RPM will be in ~/rpmbuild/RPMS/noarch

Here are the RPMs I built from that spec for F24.  And yes, I can confirm it solves the problem.

http://www.shaftnet.org/~pizza/dokuwiki-1-0.27.20150810a.fc24.noarch.rpm
http://www.shaftnet.org/~pizza/dokuwiki-selinux-1-0.27.20150810a.fc24.noarch.rpm

I'm not sure if the version bump in this spec is the right way to do this though.

Comment 9 Zachary Elcor 2016-12-26 16:55:59 UTC
Worked like a charm. Dokuwiki is back. Thanks !

Comment 10 Paul van Maaren 2016-12-27 06:54:55 UTC
(In reply to bugzilla.redhat from comment #9)
> Worked like a charm. Dokuwiki is back. Thanks !

(In reply to Solomon Peachy from comment #8)
> The realllly short version:
> 
>  * install the rpmdevtools package
>  * grab the original srpm and install it (rpm -i dokuwiki...src.rpm)
>  * plop the new spec file in ~/rpmbuild/SPECS
>  * rpmbuild -bb --clean ~/rpmbuild/SPECS/dokuwiki....spec
>  * the resulting RPM will be in ~/rpmbuild/RPMS/noarch
> 
> Here are the RPMs I built from that spec for F24.  And yes, I can confirm it
> solves the problem.
> 
> http://www.shaftnet.org/~pizza/dokuwiki-1-0.27.20150810a.fc24.noarch.rpm
> http://www.shaftnet.org/~pizza/dokuwiki-selinux-1-0.27.20150810a.fc24.noarch.
> rpm
> 
> I'm not sure if the version bump in this spec is the right way to do this
> though.

Thanks for testing! And I am also not sure if this is the right way...

Comment 11 Dominik 'Rathann' Mierzejewski 2016-12-27 21:03:54 UTC
Instead of attaching a full spec file, you should've attached a patch (in diff -u or git format-patch form) against current git master HEAD.

Also, this is not the right way. The bundled libs should not end up in the package. Instead, the
require_once(DOKU_INC.'vendor/autoload.php');
should be patched out from dokuwiki/inc/init.php. Initial configuration works without it just fine.

Comment 12 Zachary Elcor 2016-12-30 16:31:56 UTC
(In reply to Dominik 'Rathann' Mierzejewski from comment #11)
> Instead of attaching a full spec file, you should've attached a patch (in
> diff -u or git format-patch form) against current git master HEAD.
> 
> Also, this is not the right way. The bundled libs should not end up in the
> package. Instead, the
> require_once(DOKU_INC.'vendor/autoload.php');
> should be patched out from dokuwiki/inc/init.php. Initial configuration
> works without it just fine.

Commenting out the above line does not seem to work well on a fresh dokuwiki install with pages containing html tags. As soon as the page is saved, the following error appears in /var/log/httpd/error_log (added line breaks for readability):

[Fri Dec 30 17:08:46.714315 2016] [:error] [pid 3247] [client ::1:40238] PHP Fatal error:  Uncaught Error: Class 'GeSHi' not found in /usr/share/dokuwiki/inc/parserutils.php:762
Stack trace:
#0 /usr/share/dokuwiki/inc/parser/xhtml.php(546): p_xhtml_cached_geshi('  <div style="w...', 'html4strict', 'code')
#1 /usr/share/dokuwiki/inc/parserutils.php(652): Doku_Renderer_xhtml->html('\\n  <div style="...')
#2 /usr/share/dokuwiki/inc/parserutils.php(128): p_render('xhtml', Array, NULL)
#3 /usr/share/dokuwiki/inc/parserutils.php(81): p_cached_output('/var/lib/dokuwi...', 'xhtml', 'fedora1')
#4 /usr/share/dokuwiki/inc/html.php(282): p_wiki_xhtml('fedora1', 0, true, '')
#5 /usr/share/dokuwiki/inc/template.php(106): html_show()
#6 /usr/share/dokuwiki/inc/events.php(111): tpl_content_core('show')
#7 /usr/share/dokuwiki/inc/events.php(238): Doku_Event->trigger('tpl_content_cor...', true)
#8 /usr/share/dokuwiki/inc/template.php(83): trigger_event('TPL_ACT_RENDER', 'show', 'tpl_content_cor...')
#9 /usr/share/dokuwiki/lib/tpl/dokuwiki/main.php(60): tpl_content()
#10 /usr/share/dokuwiki/inc/actions.php(196): inclu in /usr/share/dokuwiki/inc/parserutils.php on line 762, referer: http://localhost/dokuwiki/doku.php?id=fedora1&do=edit

Steps to reproduce :

- install dokuwiki on a fresh fedora 25
- comment line 194 in dokuwiki/inc/init.php
- create a page with html tag
- save

The resulting page is empty and above error occurs.

Comment 13 Zachary Elcor 2016-12-30 18:54:00 UTC
similar error occurs when trying to add syntax highlight on <code> block :

[Fri Dec 30 19:49:58.961868 2016] [:error] [pid 1079] [client 127.0.0.1:33742] PHP Fatal error:  Class 'GeSHi' not found in /usr/share/dokuwiki/inc/parserutils.php on line 762, referer: http://localhost/dokuwiki/doku.php

Comment 14 Dominik 'Rathann' Mierzejewski 2017-01-02 09:58:36 UTC
Do you have php-geshi installed?

Comment 15 Zachary Elcor 2017-01-02 13:10:10 UTC
(In reply to Dominik 'Rathann' Mierzejewski from comment #14)
> Do you have php-geshi installed?

yes

Comment 16 Aaron Copley 2017-02-17 04:28:56 UTC
Please see the upstream discussion that commenting out vendor/autoload.php is not viable.

> Guys, commenting out the autoloader will not fix any problems. It might seem to work, but will break later at various places.

https://github.com/splitbrain/dokuwiki-plugin-upgrade/issues/91#issuecomment-229068357

I am attaching a patch that adds the missing vendor directory.

Comment 17 Aaron Copley 2017-02-17 04:30:05 UTC
Created attachment 1251789 [details]
Patch to add missing vendor directory to spec file

Comment 18 Fedora End Of Life 2017-02-28 10:12:05 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 19 Daniel Bristot de Oliveira 2017-07-13 14:57:21 UTC
Hi,

I updated my Fedora from 25 to 26 and this problem popped up!

Any news?

-- Daniel

Comment 20 Marius Pfeffer 2017-07-22 14:34:52 UTC
F25 XFCE here (updated from f23-> f24 -> f25), problem still exists, error_log content:

[Sat Jul 22 16:22:56.504994 2017] [:error] [pid 2101] [client ::1:47774] PHP Warning:  require_once(/usr/share/dokuwiki/vendor/autoload.php): failed to open stream: No such file or directory in /usr/share/dokuwiki/inc/init.php on line 194
[Sat Jul 22 16:22:56.505031 2017] [:error] [pid 2101] [client ::1:47774] PHP Fatal error:  require_once(): Failed opening required '/usr/share/dokuwiki/vendor/autoload.php' (include_path='.:/usr/share/pear:/usr/share/php') in /usr/share/dokuwiki/inc/init.php on line 194


Any news on this?

Comment 21 Peter "Pessoft" Kolínek 2017-07-22 20:50:13 UTC
Hi,

I can confirm the same issue after upgrading F25 > F26. Dokuwiki is indeed broken in F26 too. Patch in Comment 17 ( https://bugzilla.redhat.com/show_bug.cgi?id=1372948#c17 ) seems like a viable fix.

As a temporary workaround I extracted the vendor dir from matching upstream version: https://download.dokuwiki.org/src/dokuwiki/dokuwiki-2015-08-10a.tgz

Comment 22 Dominik 'Rathann' Mierzejewski 2017-11-03 09:45:21 UTC
On F26 I'm getting other errors as well:

PHP Fatal error:  Uncaught Error: [] operator not supported for strings in /usr/share/dokuwiki/lib/exe/css.php:174\nStack trace:\n#0 /usr/share/dokuwiki/lib/exe/css.php(145): css_parseless('@ini_text: #666...')\n#1 /usr/share/dokuwiki/lib/exe/css.php(18): css_out()\n#2 {main}\n  thrown in /usr/share/dokuwiki/lib/exe/css.php on line 174, referer: https://myserver/dokuwiki/doku.php?id=start

That seems to come from the new and more strict PHP7.

It looks like dokuwiki was last updated in 2015 and has been rotting away since then.

Comment 23 Dominik 'Rathann' Mierzejewski 2017-11-03 09:53:28 UTC
Simple patch to fix the above:
--- inc/lessc.inc.php.orig	2015-08-23 15:57:26.000000001 +0200
+++ inc/lessc.inc.php	2017-11-03 10:48:41.491927433 +0100
@@ -51,7 +51,7 @@
 	public $parentSelector = '&';
 
 	public $importDisabled = false;
-	public $importDir = '';
+	public $importDir = array();
 
 	protected $numberPrecision = null;
 

Not sure if it's correct (and lessphp is actually packaged in Fedora as php-lessphp and should be unbundled), but it works for me (credit goes to https://stackoverflow.com/a/5879753).

Comment 24 Fedora End Of Life 2018-05-03 08:17:01 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 25 Fedora End Of Life 2018-05-29 12:35:59 UTC
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26
is no longer maintained, which means that it will not receive any
further security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 26 Paul van Maaren 2018-05-29 12:44:55 UTC
I fixed this issue yesterday on a system I upgraded to F27...

Comment 27 Peter "Pessoft" Kolínek 2018-06-30 21:11:51 UTC
Still applies for F28.

Comment 28 Fedora Update System 2018-08-27 10:20:35 UTC
dokuwiki-20180422a-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-be9f4838dd

Comment 29 Fedora Update System 2018-08-27 10:21:17 UTC
dokuwiki-20180422a-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-59285e9fa0

Comment 30 Solomon Peachy 2018-08-27 10:41:18 UTC
$ sudo dnf localinstall doku*
Last metadata expiration check: 1:15:24 ago on Mon 27 Aug 2018 05:23:05 AM EDT.
Error: 
 Problem: conflicting requests
  - nothing provides python2-policycoreutils needed by dokuwiki-selinux-20180422a-1.fc27.noarch

This is correct for F28, but on F27, the package is called 'policycoreutils-python'

Comment 31 Fedora Update System 2018-08-28 10:50:41 UTC
dokuwiki-20180422a-1.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-be9f4838dd

Comment 32 Fedora Update System 2018-08-28 11:39:03 UTC
dokuwiki-20180422a-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-59285e9fa0

Comment 33 Fedora Update System 2018-08-30 17:39:47 UTC
dokuwiki-20180422a-2.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-a1bd27f59b

Comment 34 Fedora Update System 2018-08-31 15:34:17 UTC
dokuwiki-20180422a-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-ffe36cb56a

Comment 35 Fedora Update System 2018-08-31 15:34:55 UTC
dokuwiki-20180422a-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-eba049c0b3

Comment 36 Fedora Update System 2018-08-31 20:20:54 UTC
dokuwiki-20180422a-2.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-a1bd27f59b

Comment 37 Fedora Update System 2018-08-31 20:54:43 UTC
dokuwiki-20180422a-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-ffe36cb56a

Comment 38 Fedora Update System 2018-08-31 21:01:58 UTC
dokuwiki-20180422a-1.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-eba049c0b3

Comment 39 Fedora Update System 2018-09-06 03:09:33 UTC
dokuwiki-20180422a-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 40 Fedora Update System 2018-09-20 05:16:33 UTC
dokuwiki-20180422a-2.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.