linuxserver / docker-dokuwiki

GNU General Public License v3.0
113 stars 24 forks source link

new release 2020-07-29 "Hogfather" #16

Closed heylix closed 2 years ago

heylix commented 4 years ago

https://www.dokuwiki.org/changes#release_2020-07-29_hogfather

watch out, some plugins don't work: https://www.patreon.com/posts/38090834, https://forum.dokuwiki.org/d/17863-quick-reminder-what-to-do-when-a-plugin-doesnt-work-on-hogfather

Ryonez commented 4 years ago

I assume this was in the latest docker image, as my wiki's just died. Hard to tell when the error is just: FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Class 'dokuwiki\plugin\config\core\Setting\Setting' not found in /app/dokuwiki/inc/deprecated.php:61

Meant to be going to bed, so I'm rolling back and will deal with this another time.

heylix commented 4 years ago

@Ryonez I had to upgrade my own Dokuwiki installation with the upgrade plugin before upgrading the Docker image. More information here: https://www.dokuwiki.org/install:upgrade

lbalogh commented 4 years ago

After this update my wiki just died also... (blank page)

I didn't investigate too much, I just started over with an empty volume and copied the data\pages directory from the old one. I have a simple wiki with no medias and no need to keep history, though

isriam commented 4 years ago

same issue here, had to go back to 2018-04-22c-ls41

esticle commented 4 years ago

Same here, linuxserver version appears broken since 2020-07-29-ls42

I tried using the 'upgrade plugin' on version 2018-04-22c-ls41 but it results in the same HTTP 500 error.

Reverting to 2018-04-22c-ls41 is OK.

heylix commented 4 years ago

After this update my wiki just died also... (blank page)

Disable the option "defer loading Javascript". This is outlined in the link I posted in the first comment of the issue.

https://forum.dokuwiki.org/d/17863-quick-reminder-what-to-do-when-a-plugin-doesnt-work-on-hogfather

df911 commented 4 years ago

Same error with $conf["defer_js"] = 0;

thoschworks commented 4 years ago

Same here.

But I am lucky. After a rollback to 2018-04-22c-ls41 and an app upgrade using the upgrade plugin I was able to update to the newest image and everything works fine.

aptalca commented 4 years ago

I believe this is fixed in the latest image, please test and let us know here

esticle commented 4 years ago

I believe this is fixed in the latest image, please test and let us know here

Unfortunately not -

$ docker inspect -f '{{ index .Config.Labels "build_version" }}' dokuwiki
Linuxserver.io version:- 2020-07-29-ls48 Build-date:- 2020-09-17T15:55:36+01:00

Curl on localhost gives error 500...

root@c2deb7a7a99f:/# curl -v http://localhost/wiki/
*   Trying 127.0.0.1:80...
* Connected to localhost (127.0.0.1) port 80 (#0)
> GET /wiki/ HTTP/1.1
> Host: localhost
> User-Agent: curl/7.69.1
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 500 Internal Server Error
< Server: nginx/1.18.0
< Date: Thu, 17 Sep 2020 21:49:39 GMT
< Content-Type: text/html; charset=UTF-8
< Transfer-Encoding: chunked
< Connection: keep-alive
< X-Powered-By: PHP/7.3.22
< Vary: Cookie
< Set-Cookie: DokuWiki=s2jf53h9krh3tbsnblaej5ggqn; path=/wiki/; HttpOnly
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Cache-Control: no-store, no-cache, must-revalidate
< Pragma: no-cache
< 
* Connection #0 to host localhost left intact
root@c2deb7a7a99f:/#

Nginx log empty..

root@c2deb7a7a99f:/# cat /var/log/nginx/error.log 
root@c2deb7a7a99f:/# 

FWIW - Using the 'upgrade plugin' on a working version results in the same conditions as above for me.

aptalca commented 4 years ago

Nginx log is in the config folder

esticle commented 4 years ago

Nginx log is in the config folder

Now that was silly, thanks!

Hrm...

2020/09/18 09:26:57 [error] 351#351: *16 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Class 'dokuwiki\plugin\config\core\Setting\Setting' not found in /app/dokuwiki/inc/deprecated.php:61
Stack trace:
#0 /app/dokuwiki/inc/load.php(38): require_once()
#1 /app/dokuwiki/inc/init.php(200): require_once('/app/dokuwiki/i...')
#2 /app/dokuwiki/doku.php(36): require_once('/app/dokuwiki/i...')
#3 {main}
  thrown in /app/dokuwiki/inc/deprecated.php on line 61" while reading response header from upstream, client: 172.19.0.12, server: _, request: "GET //doku.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.mydomain.com"

PHP log nothing noteworthy - listening for connections only.

github-actions[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

n1trux commented 4 years ago

it still doesn't work properly, I hate these bots

vinny75 commented 4 years ago

just ran into this issue this week as well

dolohow commented 4 years ago

I backuped wiki data directory. Run a new version, copied over conf and data dirs. Works fine.

github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

hellerbarde commented 2 years ago

I have a working upgrading Dockerfile with a custom entrypoint. It's heavily inspired by some other dokuwiki image, but I can't remember which. Maybe you can take some inspiration for a patch.

#!/bin/bash

set -eu
set -o pipefail

# Updating DokuWiki may need to change files in directories which we hold in
# volumes, e.g. `data` or `conf`. Therefore, we need to make sure these files
# are there when the container is started, not only when it is created. We do
# this by keeping track which version we last installed and update as necessary,
# or fully populate these folders if this is the first run.

dokudir=/var/www/html
tmpdir=/orig/dokuwiki
verfile=.last-version
containerver="$(date -f <(echo "$DOKUWIKI_VERSION" | tr -d '[:alpha:]') +%s)"

if [ ! -d "$dokudir" ]; then
    echo "DokuWiki does not appear to be installed correctly at: $dokudir." >&2
    exit 1
fi

# Check for downgrade/overwrite parameters
if [ "$1" = 'downgrade' ]; then downgrade=1; else downgrade=0; fi
if [ "$1" = 'overwrite' ]; then overwrite=1; else overwrite=0; fi

if [ "$1" = 'run' ] || [ "$1" = 'downgrade' ] || [ "$1" = 'overwrite' ]; then
    # Check each volume directory in turn
    for d in conf data lib/plugins lib/tpl; do
        if [ -f "$dokudir/$d/$verfile" ]; then
            volumever="$(date -f <(awk '{print $1}' "$dokudir/$d/$verfile" | tr -d '[:alpha:]') +%s)"
        else
            volumever=0
        fi

        if [ "$volumever" -eq "$containerver" ] && [ ! "$overwrite" -eq 1 ]; then
            # Do nothing for equal versions
            continue
        elif [ "$volumever" -lt "$containerver" ] || [ "$downgrade" -eq 1 ] || [ "$overwrite" -eq 1 ]; then

            # Then, update if the container version is newer than the volume version
            # Or if overridden using `downgrade`
            echo "Migrating $d..."
            cp -r "$tmpdir/$d/"* "$dokudir/$d/"
            cp "$tmpdir/VERSION" "$dokudir/$d/$verfile"
        elif [ "$volumever" -gt "$containerver" ]; then
            # Otherwise print an error message and stop
            cat >&2 <<EOM
This volume has previously been used with a newer version of DokuWiki.
If you want to force a downgrade (at your own risk!), run the \`downgrade\` command:
    docker run ... xyz/dokuwiki downgrade
EOM
        exit 2
        fi
    done

    rm -rf "$dokudir/data/cache"
    mkdir -p "$dokudir/data/cache"

    # Ensure permissions are set correctly
    chown -R www-data:www-data "$dokudir"

    # Run the web server
    exec /usr/local/bin/apache2-foreground
else
    # Handle custom commands otherwise
    exec "$@"
fi

This is a relevant part in my Dockerfile:

RUN echo "https://download.dokuwiki.org/src/dokuwiki/dokuwiki-$DOKUWIKI_VERSION.tgz" && \
    wget -q -O /dokuwiki.tgz "http://download.dokuwiki.org/src/dokuwiki/dokuwiki-$DOKUWIKI_VERSION.tgz" && \
    mkdir -p /var/www/html && \
    tar -zxf /dokuwiki.tgz -C /var/www/html --strip-components 1 && \
    rm /dokuwiki.tgz && \
    chown -R 33:33 /var/www/html /var/log && \
    mkdir -p /orig/dokuwiki/lib && \
    cp -r /var/www/html/conf /var/www/html/data /var/www/html/VERSION /orig/dokuwiki/ && \
    cp -r /var/www/html/lib/plugins /var/www/html/lib/tpl /orig/dokuwiki/lib/
github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Ryonez commented 2 years ago

@github-actions[bot]

There been no resolution yet.

aptalca commented 2 years ago

It's been a year and a half since the upstream release broke installs due to plugins not being compatible with the new version. There is nothing we can do to fix that. It's up to the plugin author to update the plugin, or the user to disable it.

Closing this issue.

Ryonez commented 2 years ago

Wasn't this an upgrade issue of updating the docker container without running the upgrade tools?