1
0
Fork 0
mirror of https://github.com/requarks/wiki.git synced 2026-03-02 22:06:55 -05:00

Navigation menu breaks when reach 88 pages #2129

Closed
opened 2026-02-20 18:28:46 -05:00 by deekerman · 9 comments
Owner

Originally created by @robertgirhiny on GitHub (Oct 8, 2020).

Originally assigned to: @NGPixel on GitHub.

Describe the bug
If I has only 87 page, everything is ok.
But when I create +1 another page (on any path), the navigation is break, and showing an infinite loading in the top.
In the console: Could not find current page in page tree listing!

So when I created the 88. page, the error apperas, when I delete any other page the error is go away.

Just like here: https://github.com/Requarks/wiki/issues/2476

To Reproduce
Steps to reproduce the behavior:

  1. Create 88 page

Expected behavior
Create more than 87 page without crashing the navigation.

Host Info (please complete the following information):

  • OS: Ubuntu 18.04.2 LTS
  • Wiki.js version: 2.5.126
  • Database engine: sqlite

Additional context
When I disabled the navigation, the infinite loading and the problem solved, but I don't want to create the navigation one by one.
Tryed to fix, with re render the pages and rebuild the page tree, but not helped.

Originally created by @robertgirhiny on GitHub (Oct 8, 2020). Originally assigned to: @NGPixel on GitHub. **Describe the bug** If I has only 87 page, everything is ok. But when I create +1 another page (on any path), the navigation is break, and showing an infinite loading in the top. In the console: `Could not find current page in page tree listing!` So when I created the 88. page, the error apperas, when I delete any other page the error is go away. Just like here: https://github.com/Requarks/wiki/issues/2476 **To Reproduce** Steps to reproduce the behavior: 1. Create 88 page **Expected behavior** Create more than 87 page without crashing the navigation. **Host Info (please complete the following information):** - OS: Ubuntu 18.04.2 LTS - Wiki.js version: 2.5.126 - Database engine: sqlite **Additional context** When I disabled the navigation, the infinite loading and the problem solved, but I don't want to create the navigation one by one. Tryed to fix, with re render the pages and rebuild the page tree, but not helped.
deekerman 2026-02-20 18:28:46 -05:00
  • closed this issue
  • added the
    migrate
    label
Author
Owner

@pchinery commented on GitHub (Oct 13, 2020):

I just ran into the same problem. In the console logs, I see that SQLite reports too many parameters. I have used the requarks alpine docker image and I have the impression that the SQLite parameter limit is set to 100 instead of 1000 for some reason. I think that it would help to reduce the batch size to 50. I'll try to validate that tonight.

As a hot fix, it should be enough to patch this line and try 50 instead of 100:
https://github.com/Requarks/wiki/blob/dev/server/jobs/rebuild-tree.js#L60

@pchinery commented on GitHub (Oct 13, 2020): I just ran into the same problem. In the console logs, I see that SQLite reports too many parameters. I have used the requarks alpine docker image and I have the impression that the SQLite parameter limit is set to 100 instead of 1000 for some reason. I think that it would help to reduce the batch size to 50. I'll try to validate that tonight. As a hot fix, it should be enough to patch this line and try 50 instead of 100: https://github.com/Requarks/wiki/blob/dev/server/jobs/rebuild-tree.js#L60
Author
Owner

@pchinery commented on GitHub (Oct 13, 2020):

Sorry, I just saw that there is another issue on this here: #1503

@pchinery commented on GitHub (Oct 13, 2020): Sorry, I just saw that there is another issue on this here: #1503
Author
Owner

@robertgirhiny commented on GitHub (Oct 13, 2020):

I don't have any sql error. Only the Could not find current page in page tree listing! message in console.

When I rebuild the page tree there is no error. I got 200 http code.

@robertgirhiny commented on GitHub (Oct 13, 2020): I don't have any sql error. Only the `Could not find current page in page tree listing!` message in console. When I `rebuild the page tree` there is no error. I got 200 http code.
Author
Owner

@pchinery commented on GitHub (Oct 13, 2020):

did you look into the console output of the node process? I have received a success as well when rebuilding the page tree, but in the console/log, there was the SQL error. In the UI, I have seen the infinite loading, a missing page tree and the js console output you have mentioned. I will try reducing the number of files tonight, maybe you can try the same and rebuild the page tree, if you have access to the instance now.

@pchinery commented on GitHub (Oct 13, 2020): did you look into the console output of the node process? I have received a success as well when rebuilding the page tree, but in the console/log, there was the SQL error. In the UI, I have seen the infinite loading, a missing page tree and the js console output you have mentioned. I will try reducing the number of files tonight, maybe you can try the same and rebuild the page tree, if you have access to the instance now.
Author
Owner

@robertgirhiny commented on GitHub (Oct 13, 2020):

Ahhh, there is the error in the node log. I did not watch this log because the response was ok

Node log:

insert into `pageTree` (`ancestors`, `depth`, `id`, `isFolder`, `isPrivate`, `localeCode`, `pageId`, `parent`, `path`, `privateNS`, `title`) select '[]' as `ancestors`, 1 as `depth`, 1 as `id`, false as `isFolder`, 0 as
...
 - SQLITE_ERROR: too many SQL variables

Browser log: empty
Browser network tab, response body:

errorCode: 0
message: "Page tree rebuilt successfully."
slug: "ok"
succeeded: true
@robertgirhiny commented on GitHub (Oct 13, 2020): Ahhh, there is the error in the node log. I did not watch this log because the response was ok Node log: ``` insert into `pageTree` (`ancestors`, `depth`, `id`, `isFolder`, `isPrivate`, `localeCode`, `pageId`, `parent`, `path`, `privateNS`, `title`) select '[]' as `ancestors`, 1 as `depth`, 1 as `id`, false as `isFolder`, 0 as ... - SQLITE_ERROR: too many SQL variables ``` Browser log: empty Browser network tab, response body: ``` errorCode: 0 message: "Page tree rebuilt successfully." slug: "ok" succeeded: true ```
Author
Owner

@robertgirhiny commented on GitHub (Oct 13, 2020):

@pchinery Your hotfix is working. Thanks.

@robertgirhiny commented on GitHub (Oct 13, 2020): @pchinery Your hotfix is working. Thanks.
Author
Owner

@fdw commented on GitHub (Dec 9, 2020):

Are there plans to merge this hotfix?

@fdw commented on GitHub (Dec 9, 2020): Are there plans to merge this hotfix?
Author
Owner

@thoni56 commented on GitHub (Jan 28, 2021):

Is this problem only related to the sqlite backend?

I'm looking into moving our medium size company wiki to Wiki.js and it would be a huge problem (blocker) if it applies to Postgres too...

@thoni56 commented on GitHub (Jan 28, 2021): Is this problem only related to the `sqlite` backend? I'm looking into moving our medium size company wiki to Wiki.js and it would be a huge problem (blocker) if it applies to Postgres too...
Author
Owner

@pchinery commented on GitHub (Jan 28, 2021):

@thoni56 This is only related to the number of parameters sqlite can handle and should not be an issue on Postgres (and the fix is very easy to apply, so this should not be a blocker)

@pchinery commented on GitHub (Jan 28, 2021): @thoni56 This is only related to the number of parameters sqlite can handle and should not be an issue on Postgres (and the fix is very easy to apply, so this should not be a blocker)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/wiki-requarks#2129
No description provided.