bwanders / dokuwiki-strata

Strata - a Semi-Structured Data plugin for Dokuwiki
https://www.dokuwiki.org/plugin:strata
17 stars 8 forks source link

SQLite Access can not access strata tables #52

Closed pop-ch closed 3 years ago

pop-ch commented 3 years ago

The SQLite interface allows access to the SQLite databases used in a DokuWiki instance. The strata database is shown as sqlite version 2. Trying to select this entry with the SQLite interface yields the error message:

This is a database in sqlite3 format. This plugin needs your database file has the extension ".sqlite3" instead of ".sqlite" before it will be recognized as sqlite3 database. The interface then offers to rename the sqlite2 file into a sqlite3 file. However, this results in both sqlite2 and sqlite3 version being shown, with the sqlite2 version still unaccessible and the sqlite3 version being reported as broken.

Dokuwiki is Release 2020-07-29 "Hogfather"; strata is Installed version: 2020-08-09

bwanders commented 3 years ago

This is somewhat of an incompatibility between the sqlite plugin and strata. The sqlite plugin assumes control over all files called *.sqlite and *.sqlite3. It does so even if the plugin that uses those files has nothing to do with the sqlite plugin. This creates a tug-of-war between the strata plugin and the sqlite plugin over those files, since strata's default configuration produces the strata.sqlite file.

We ran into this issue before in #9, and potential solutions we found were:

However even after fixing the naming tug-of-war, the sqlite plugin will most likely not see strata's database as "valid", because the database has no opts table. And as far as I can see there is no way for strata to opt out of the sqlite plugin's behaviour.

Hope this helps!

(Let me know if this runs into more problems -- I'd like for the two plugins to co-exist peacefully, but I don't want to update strata to use a different database name by default to prevent current installations from blowing up after updating...)

pop-ch commented 3 years ago

Thanks for your reply. Sorry that I did not find the other issue. I can see that there's no easy fix to this issue. I would have liked to use the SQLite plugin mainly for exporting the data as a backup and - perhaps - for further processing, but the plugin is not imperative for that.