Closed clockwinder closed 3 years ago
Thanks for opening your first issue here! Be sure to follow the issue template!
To add more info, I started a new instance of linuxserver/dokuwiki following the instructions laid out in the "Application Setup" portion on the hub.docker page. At which point the wiki appears to be functional. Then I go to test the indexing, by installing the "SearchIndex Manager" plugin which gives me a result that looks like this:
So if we navigate to /mycontainer/dokuwiki/data
we only see
Where I would expect to see more directories, including cache
, index
, and locks
.
Those are just symlinked folders. The real data folder is inside the container at /app/dokuwiki/data, which should contain the cache folder https://github.com/linuxserver/docker-dokuwiki/blob/master/root/etc/cont-init.d/50-config#L3-L32
@aptalca Is /mycontainer/dokuwiki/data
different than /app/dokuwiki/data
?
The link you posted does note creation of a cache folder, or is that elsewhere?
The linked code doesn't create the folders, it only symlinks them to the config folder for persistence. The cache folder should be created by dokuwiki or the plugin in the main app folder
I'm also having problems with incomplete searches (and connected to this, failing page renaming with the 'Move' plug-in and 'Searchindex Manager' failing to rebuild the search index).
I think that the search index stored in /app/dokuwiki/data/index
is currently not persistent because it is only a container-local directory. It should be in the USER_DIRECTORY
list of the script to create a symlink to /config/dokuwiki/data/index
. The index must be preserved across container creations.
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.
Thanks for making some notes on this issue @grillbaer . Sadly it's been over two months and there hasn't been any response, and I'm not knowledgeable enough to make any progress on fixing this problem.
Do you have any ideas on how we could resolve this issue?
I've the same issue. Just stopping the container and restart it (Synology Docker) causes the index to loose all its data.
My workaround is to create an additional volume to the index folder:
-v /path/to/index_workaround:/app/dokuwiki/data/index
Hi @coldshouldermedia thanks for sharing this. I also just stumbled over this issue.
I initially created the folders cache
, lock
, index
, and tmp
below /config/dokuwiki/data/
in order to make the Searchindex Manager plugin happy. Sadly this did not fix the search as I assume dokuwiki inside the container uses /app/dokuwiki/data/index/
which is not updated by the plugin.
@Norrodar how do you update your index? Untl this is fixed in the image, wouldn't a symlink from /config/dokuwiki/data/index/
to /app/dokuwiki/data/index/
(and the other folders named) be the way to fix the search function AND the Searchindex Manager?
Yep, I created that link like I discribed 2 posts up. Than it just worked for me. But I'm sorry: I was looking for a good container-solutions because I started docker as a completly new project. I found a well maintained and working container from crazymax. His FirefoxSyncServer is another container I'm using from crazymax. So overall.. I'm staying away from lsio/dokuwiki for now.
There are two issues here (as mentioned by the other contributors):
Issue 1 can be fixed by storing the search index in persistent storage. Issue 2 by replacing the relative 'savedir' path with an absolute path.
I will create a pull request for both issues.
Please note (after/if the PR is merged and a new version is released): the fix for Searchindex Manager only works when you have not modified the savedir
setting manually (Admin -> Configuration Manager -> Basic -> Directory for saving data). In that case: ./data
(the default) will be changed to /app/dokuwiki/data
(absolute path for the default directory).
If you have changed savedir
manually you have to figure out what the new setting has to be (the fix will not overwrite your change).
Hmm. I've got the same problem with a new install. It seems that /app/dokuwiki/data/index
is not persistent because it's not symlinked to /config
This commands have been executed in a fresh install with no configuration at all:
docker exec -it dokuwiki bash
root@8a9f38f628db:/root# ls -lha /app/dokuwiki/data/
total 104K
drwxrwxr-x 1 abc users 4.0K Mar 28 11:47 .
drwxr-xr-x 1 abc users 4.0K Mar 28 11:47 ..
-rw-rw-r-- 1 abc users 143 Jul 29 2020 .htaccess
-rw-rw-r-- 1 abc users 32 Jul 29 2020 _dummy
lrwxrwxrwx 1 abc users 27 Mar 28 11:47 attic -> /config/dokuwiki/data/attic
drwxrwxr-x 1 abc users 4.0K Jul 29 2020 cache
-rw-rw-r-- 1 abc users 25K Jul 29 2020 deleted.files
-rw-rw-r-- 1 abc users 6.4K Jul 29 2020 dont-panic-if-you-see-this-in-your-logs-it-means-your-directory-permissions-are-correct.png
-rw-rw-r-- 1 abc users 12K Jul 29 2020 dont-panic-if-you-see-this-in-your-logs-it-means-your-directory-permissions-are-correct.xcf
drwxrwxr-x 1 abc users 4.0K Jul 29 2020 index
drwxrwxr-x 1 abc users 4.0K Jul 29 2020 locks
lrwxrwxrwx 1 abc users 27 Mar 28 11:47 media -> /config/dokuwiki/data/media
lrwxrwxrwx 1 abc users 33 Mar 28 11:47 media_attic -> /config/dokuwiki/data/media_attic
lrwxrwxrwx 1 abc users 32 Mar 28 11:47 media_meta -> /config/dokuwiki/data/media_meta
lrwxrwxrwx 1 abc users 26 Mar 28 11:47 meta -> /config/dokuwiki/data/meta
lrwxrwxrwx 1 abc users 27 Mar 28 11:47 pages -> /config/dokuwiki/data/pages
drwxrwxr-x 1 abc users 4.0K Jul 29 2020 tmp
You can move index directory to /config/dokuwiki/data and then symlink it:
mv /app/dokuwiki/data/index /config/dokuwiki/data
ln -s /config/dokuwiki/data/index /app/dokuwiki/data/index
This will solve the search problems, but every time you rebuild the container you'll have to REMOVE the empty index rmdir /app/config/data/index
and then symlink again the persisted one: ln -s /config/dokuwiki/data/index /app/dokuwiki/data/index
Behavior
Currently if I search for a page I know exists, there will be no search result. The only way to get a page to show up in searches is to edit that page. This info is also relevant to tags, tag indexs only update after page editing as well.
To reproduce
Another option is to backup your server via the backup plugin, start a new docker instance, and restore your backup to this new instance, even after manual indexing, there will be no search results.
I have tested this in other images by restoring my full wiki backup to dokuwiki-on-a-stick as well as 2 other dokuwiki docker images, and the behavior there has proper search indexing.
Environment
OS:Debian (OMV) CPU architecture: x86_64 How docker service was installed: official docker repo
Command used to create docker container (run/create/compose/screenshot)
Docker logs
Docker Log
Recent error log entries look like
2020/10/03 16:06:18 [error] 352#352: *1108 FastCGI sent in stderr: "PHP message: PHP Warning: DOMDocument not found, unable to use sanitizer in /app/dokuwiki/vendor/simplepie/simplepie/library/SimplePie/Sanitize.php on line 271PHP message: PHP Warning: DOMDocument not found, unable to use sanitizer in /app/dokuwiki/vendor/simplepie/simplepie/library/SimplePie/Sanitize.php on line 271" while reading upstream, client: 172.17.0.3, server: _, request: "GET /doku.php?id=wiki:syntax HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "wiki.myserver.org:443", referrer: "https://wiki.myserver.org/"
Recent debug log entries look like:
12:29:35 172.17.0.3: require_once() is deprecated. It was called from require() in /app/dokuwiki/inc/load.php:147 Autoloading. Do not require() files yourself. should be used instead! 12:29:35 172.17.0.3: INFO_DEPRECATION_LOG:AFTER event triggered before event system was initialized