dwp-forge / refnotes

4 stars 6 forks source link

Fails to run in Dokuwiki RC (Hogfather) #52

Closed philpem closed 4 years ago

philpem commented 4 years ago

When this plugin is installed in the latest Dokuwiki release candidate (2020-06-01 "Hogfather"), the following error occurs:

PHP Warning:  require_once(/var/www/wiki/inc/JSON.php): failed to open stream: No such file or directory in /var/www/wiki/lib/plugins/refnotes/action.php on line 13
PHP Fatal error:  require_once(): Failed opening required '/var/www/wiki/inc/JSON.php' (include_path='.:/usr/share/php') in /var/www/wiki/lib/plugins/refnotes/action.php on line 13

This completely prevents the wiki from being loaded.

gw72 commented 4 years ago

I have the same problem. Had to restore from backup

plomoman commented 4 years ago

They deprecated their JSON.php. An easy fix for this would be to replace this with the native json_encode and json_decode, but that's not enough.

There appears to be quite some changes to the Parser and Lexer infrastructure, making this plugin incompatible with the new release.

ross41 commented 4 years ago

I have the same problem. Had to restore from backup

Same. Only this plugin stops me from updating the wiki.

fridde commented 4 years ago

Is there anyway an extension can indicate that it's not compatible with a certain upgrade?

I am not familiar with the dokuwiki extension system, but I guess the upgrade process has some dependency checks like composer or npm have, doesn't it?

polymathuk commented 4 years ago

Same problem. HTTP 500 as soon as the plugin is installed. I deleted the folder /var/www/html/wiki/lib/plugins/refnotes and all was good again.

dwp-forge commented 4 years ago

I've pushed some updates that should substantially improve compatibility with Hogfather. Not sure if everything is resolved, still verifying various features. Could you guys please pull the master and see if you still have some issues.

plomoman commented 4 years ago

Seems to work much better for my situation! My footnotes are proper again. I'll let you know if I find anything else. Thanks so much!

polymathuk commented 4 years ago

It's a win from me too :-)

jregan2018 commented 4 years ago

I worked for me as well. Yeah!

ross41 commented 4 years ago

RC3, works just fine. Have been using it for a week, didn't have any issues whatsoever.

ghost commented 4 years ago

Freshly installed "rc-2020-06-09 "Hogfather" RC3" on 2020-07-02 - the plugin still completely breaks the whole wiki.

dwp-forge commented 4 years ago

@EncyMag, did you install master revision or latest release?

ghost commented 4 years ago

Master revision did the trick. Thank you!

jcarlosd commented 4 years ago

It breaks y dokuwiki site. Where is the "master revision" for downloading?

danilovesky commented 4 years ago

@dwp-forge Master revision (commit bc31c2f) breaks the latest stable release of Dokuwiki ("Hogfather" 2020-07-29). I really hope this requires just a relatively small fix and RefNotes plugin is back to service...

dwp-forge commented 4 years ago

@danilovesky Could you elaborate on your problem? Seems to work fine on my setup.

danilovesky commented 4 years ago

@dwp-forge Thank you for looking into this!

Basically after installing refnotes from master the wiki pages stop rendering (blank in Firefox or HTTP ERROR 500 in Chrome and Chromium).

I just went through a clean install at https://staging.workcraft.org/ just in case, and the problem persists. Here is what I did, step by step:

  1. Downloaded and extracted Dokuwiki from https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz
  2. Went through the standard installation process via https://staging.workcraft.org/install.php

At this stage Wiki is fully functional - I can login, edit, logout, admin, etc.

  1. Now I go to the Extension Manager and there to Manual Install tab. I point Install from URL to https://github.com/dwp-forge/refnotes/archive/master.zip and click Install button.

When the page reloads in Firefox it is blank -- its HTML source is literally <html><head></head><body></body></html>. In Chrome the same URL returns ''HTTP ERROR 500'' though.

As soon as I remove ''lib/plugins/refnotes/'' directory via SSH everything is back to normal.

Any idea what it can be related to or how I can approach debugging this issue?

dwp-forge commented 4 years ago

Try to enable PHP error logging.

danilovesky commented 4 years ago

@dwp-forge Here is the PHP error I get (keep in mind I am far from PHP and only have basic understanding of web-related tech):

[01-Aug-2020 08:25:07 UTC] PHP Fatal error:  Declaration of refnotes_nested_call_writer::__construct($handler) must be compatible with dokuwiki\Parsing\Handler\ReWriterInterface::__construct(dokuwiki\Parsing\Handler\CallWriterInterface $callWriter) in /var/www/staging.workcraft.org/lib/plugins/refnotes/syntax/references.php on line 304

Does this help to identify the source of the problem?

dwp-forge commented 4 years ago

@danilovesky Which PHP version do you use?

danilovesky commented 4 years ago

@dwp-forge It is PHP 7.0.33-0ubuntu0.16.04.15 (I think it is the latest in Ubuntu 16.04 official repository).

dwp-forge commented 4 years ago

@danilovesky Fixed in e9a9fc4. Could you please check?

danilovesky commented 4 years ago

@dwp-forge This fix did help, thanks a lot! I realise PHP 7.0.33 is quite outdated, but probably many of us are still running Ubuntu 16.04 LTS and stuck with that version of PHP.

Juergen-aus-Zuendorf commented 4 years ago

Hi,

I have the same problem. But your fix e9a9fc4 doesn't help me. The error message after changing the both files is:

Warning: require_once(C:\xampp\htdocs\wiki/inc/JSON.php): failed to open stream: No such file or directory in C:\xampp\htdocs\wiki\lib\plugins\refnotes\action.php on line 13

Fatal error: require_once(): Failed opening required 'C:\xampp\htdocs\wiki/inc/JSON.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\wiki\lib\plugins\refnotes\action.php on line 13

I'm running hogfather on a test wiki with "XAMPP for Windows 7.4.8"

Best regards Juergen

dwp-forge commented 4 years ago

@Juergen-aus-Koeln This is not the same problem. Don't cherry-pick one patch, take the latest master instead. The JSON issue was fixed in df14732.

Juergen-aus-Zuendorf commented 4 years ago

Thank you very much, this is the solution !

heylix commented 4 years ago

hm, now that this works, maybe make a release and link it on the plugin page? Hogfather's stable now.

dwp-forge commented 4 years ago

Fixed in release 2020-08-10.