From c815877ad79679477987a07406da85a83515f00e Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Fri, 27 Nov 2020 22:36:06 -0500 Subject: [PATCH 01/13] docs: update BACKERS ***NO_CI*** --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 83f1d4dd..309e2ea8 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,7 @@ Support this project by becoming a sponsor. Your name will show up in the Contri - Robert Lanzke ([@winkelement](https://github.com/winkelement)) - Sam Martin ([@winkelement](https://github.com/ABitMoreDepth)) - Sean Coffey ([@seanecoffey](https://github.com/seanecoffey)) +- Victor Bilgin ([@vbilgin](https://github.com/vbilgin)) - aniketpanjwani ([@aniketpanjwani](https://github.com/aniketpanjwani)) - aytaa ([@aytaa](https://github.com/aytaa)) - magicpotato ([@fortheday](https://github.com/fortheday)) From 3fddfd69c324aca5fd2badd47ec7c9cc72e8ba92 Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Thu, 3 Dec 2020 13:02:29 -0500 Subject: [PATCH 02/13] docs: update BACKERS ***NO_CI*** --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 309e2ea8..118df86f 100644 --- a/README.md +++ b/README.md @@ -231,6 +231,7 @@ Thank you to all our patrons! 🙏 [[Become a patron](https://www.patreon.com/re - Ernie Reid - Etienne - Flemis Jurgenheimer +- Florent - Günter Pavlas - hong - Ian From d89224405c255758078f636e335174f0fc9b647e Mon Sep 17 00:00:00 2001 From: scienceasdf Date: Wed, 9 Dec 2020 10:41:45 +0800 Subject: [PATCH 03/13] feat: set analyzer for elasticsearch (#2793) * Feature: Custom configuration for elasticsearch For better search results especially in Chinese, which the standard token analyzer may not work well. * Set default analyzer in settings when building index * Remove dangling comma --- server/modules/search/elasticsearch/definition.yml | 10 ++++++++-- server/modules/search/elasticsearch/engine.js | 11 ++++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/server/modules/search/elasticsearch/definition.yml b/server/modules/search/elasticsearch/definition.yml index 834f3935..856f651b 100644 --- a/server/modules/search/elasticsearch/definition.yml +++ b/server/modules/search/elasticsearch/definition.yml @@ -26,16 +26,22 @@ props: hint: The index name to use during creation default: wiki order: 3 + analyzer: + type: String + title: Analyzer + hint: 'The token analyzer in elasticsearch' + default: simple + order: 4 sniffOnStart: type: Boolean title: Sniff on start hint: 'Should Wiki.js attempt to detect the rest of the cluster on first connect? (Default: off)' default: false - order: 4 + order: 5 sniffInterval: type: Number title: Sniff Interval hint: '0 = disabled, Interval in seconds to check for updated list of nodes in cluster. (Default: 0)' default: 0 - order: 5 + order: 6 diff --git a/server/modules/search/elasticsearch/engine.js b/server/modules/search/elasticsearch/engine.js index 7129c0f6..4a41df88 100644 --- a/server/modules/search/elasticsearch/engine.js +++ b/server/modules/search/elasticsearch/engine.js @@ -70,7 +70,16 @@ module.exports = { body: { mappings: (this.config.apiVersion === '6.x') ? { _doc: idxBody - } : idxBody + } : idxBody, + settings: { + analysis: { + analyzer: { + default: { + type: this.config.analyzer + } + } + } + } } }) } catch (err) { From 5e7a91dfdf803405a78eff09dca67206812d7efe Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Tue, 8 Dec 2020 21:44:14 -0500 Subject: [PATCH 04/13] docs: update help github template ***NO_CI*** --- .github/ISSUE_TEMPLATE/question---help.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/question---help.md b/.github/ISSUE_TEMPLATE/question---help.md index 61878996..043298dc 100644 --- a/.github/ISSUE_TEMPLATE/question---help.md +++ b/.github/ISSUE_TEMPLATE/question---help.md @@ -6,10 +6,9 @@ labels: help --- -**Question** -Describe in details what you are trying to achieve and where do you need guidance. +DO NOT POST QUESTIONS HERE! -**Host Info (please complete the following information):** -OS: [e.g. Ubuntu 18.04, Docker] -Wiki.js version: [e.g. 2.0.1] -Database engine: [e.g. postgres 9.7, mysql 5.7] +Use the Discussions instead: +https://github.com/Requarks/wiki/discussions + +^^^^^^ From d77e95e91d4d55a9d24e9e52e8fd575a9344533a Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Tue, 8 Dec 2020 21:56:18 -0500 Subject: [PATCH 05/13] docs: update issue template chooser config ***NO_CI*** --- .github/ISSUE_TEMPLATE/config.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/config.yml diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..ac73a742 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: Wiki.js Community Support + url: https://github.com/Requarks/wiki/discussions?discussions_q=category%3A%22Help+%2F+Questions%22 + about: Please ask and answer questions here. From 42e4eedc06acb07668907e6a72866c5d47f268fb Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Tue, 8 Dec 2020 21:57:28 -0500 Subject: [PATCH 06/13] docs: remove help issue template ***NO_CI*** --- .github/ISSUE_TEMPLATE/question---help.md | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/question---help.md diff --git a/.github/ISSUE_TEMPLATE/question---help.md b/.github/ISSUE_TEMPLATE/question---help.md deleted file mode 100644 index 043298dc..00000000 --- a/.github/ISSUE_TEMPLATE/question---help.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -name: Question / Help -about: Need help installing, configuring or using Wiki.js? -title: '' -labels: help - ---- - -DO NOT POST QUESTIONS HERE! - -Use the Discussions instead: -https://github.com/Requarks/wiki/discussions - -^^^^^^ From 933afd89ff3def6f98d3ba7d5923594392baafb7 Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Tue, 8 Dec 2020 21:57:57 -0500 Subject: [PATCH 07/13] docs: remove feature request issue template ***NO_CI*** --- .github/ISSUE_TEMPLATE/feature_request.md | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 813e5e1b..00000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: '' -assignees: '' - ---- - -!! IMPORTANT !! -Do not submit feature requests here. Use our feature request board instead: - -https://wiki.js.org/feedback From 35a0f1ac73715e18ba3fe5ad20b22042f325ef8e Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Tue, 8 Dec 2020 21:59:28 -0500 Subject: [PATCH 08/13] docs: update issue template chooser config ***NO_CI*** --- .github/ISSUE_TEMPLATE/config.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index ac73a742..21034212 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,8 @@ blank_issues_enabled: false contact_links: - - name: Wiki.js Community Support + - name: Help / Questions url: https://github.com/Requarks/wiki/discussions?discussions_q=category%3A%22Help+%2F+Questions%22 about: Please ask and answer questions here. + - name: Request a new feature / improvement + url: https://wiki.js.org/feedback + about: Submit ideas for new features or improvements. From a1f1cd7356ddc2ba9054aa0f39b0b9f3f43ce3f8 Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Tue, 8 Dec 2020 22:00:54 -0500 Subject: [PATCH 09/13] docs: update canny link in issue template chooser ***NO_CI*** --- .github/ISSUE_TEMPLATE/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 21034212..d672bf53 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -4,5 +4,5 @@ contact_links: url: https://github.com/Requarks/wiki/discussions?discussions_q=category%3A%22Help+%2F+Questions%22 about: Please ask and answer questions here. - name: Request a new feature / improvement - url: https://wiki.js.org/feedback + url: https://requarks.canny.io/wiki about: Submit ideas for new features or improvements. From d7d00b44f63899ece1171158e8386b0045303d41 Mon Sep 17 00:00:00 2001 From: scienceasdf Date: Mon, 14 Dec 2020 03:51:44 +0800 Subject: [PATCH 10/13] fix: search engine broken when renaming or moving pages (#2815) For building suggest in elasticsearch, the safeContent field will be splitted into arrays. If the page is renamed or moved, the server will throw error: "Cannot read property 'split' of Undefined", and the index will be broken. Here two lines are added to fix this issue. --- server/models/pages.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/models/pages.js b/server/models/pages.js index c452365e..16f5b2f1 100644 --- a/server/models/pages.js +++ b/server/models/pages.js @@ -544,6 +544,8 @@ module.exports = class Page extends Model { await WIKI.models.pages.rebuildTree() // -> Rename in Search Index + const pageContents = await WIKI.models.pages.query().findById(page.id).select('render') + page.safeContent = WIKI.models.pages.cleanHTML(pageContents.render) await WIKI.data.searchEngine.renamed({ ...page, destinationPath: opts.destinationPath, From b5af931f88b0322cb612052c7c08aeb937270b76 Mon Sep 17 00:00:00 2001 From: Marwane Kalam-Alami Date: Sun, 13 Dec 2020 20:56:31 +0100 Subject: [PATCH 11/13] fix: support tags containing special characters (#2743) (#2748) --- client/components/tags.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/components/tags.vue b/client/components/tags.vue index 0a667e7b..b8ed976e 100644 --- a/client/components/tags.vue +++ b/client/components/tags.vue @@ -243,7 +243,7 @@ export default { router, created () { this.$store.commit('page/SET_MODE', 'tags') - this.selection = _.compact(this.$route.path.split('/')) + this.selection = _.compact(decodeURI(this.$route.path).split('/')) }, mounted () { this.locales = _.concat( From 063251248c7a378fe6a8e6e69f47bf55fab88293 Mon Sep 17 00:00:00 2001 From: drewblin Date: Sun, 13 Dec 2020 21:57:20 +0200 Subject: [PATCH 12/13] fix: set autocommit for mysql (#2638) If in server config mysql has autocommit = 0, then wikijs fails with locks like this: ``` 2020-10-30T12:56:51.725Z [JOB] error: Rebuilding page tree: [ FAILED ] 2020-10-30T12:56:51.726Z [JOB] error: truncate `pageTree` - Lock wait timeout exceeded; try restarting transaction ``` --- server/core/db.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/core/db.js b/server/core/db.js index 6ae657a8..f1ac88b3 100644 --- a/server/core/db.js +++ b/server/core/db.js @@ -140,6 +140,10 @@ module.exports = { await conn.query(`set application_name = 'Wiki.js'`) done() break + case 'mysql': + await conn.promise().query(`set autocommit = 1`) + done() + break default: done() break From 59c7226089c02904a0ebefb6890cddb89c2a9861 Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Tue, 22 Dec 2020 11:20:03 -0500 Subject: [PATCH 13/13] docs: update BACKERS ***NO_CI*** --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 118df86f..89185df4 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,7 @@ Support this project by becoming a sponsor. Your name will show up in the Contri - Akira Suenami ([@a-suenami](https://github.com/a-suenami)) - Bryon Vandiver ([@asterick](https://github.com/asterick)) +- Cloud Data Hosting LLC ([@CloudDataHostingLLC](https://github.com/CloudDataHostingLLC)) - CrazyMarvin ([@CrazyMarvin](https://github.com/CrazyMarvin)) - David Christian Holin ([@SirGibihm](https://github.com/SirGibihm)) - Dragan Espenschied ([@despens](https://github.com/despens))