What is a recursion limit?
Recursion limits are set to protect your users from seeing long page load times, keep your page from getting dinged by Google for poor performance, and to allow us to protect our own parser processing performance. This usually appears when reusing content between two articles. Below are some common circumstances along with options for resolving the issues.
Resolve recursion limit error
- Discover the details of the error. Recursive DekiScript errors will display the following error: "SecurityError: Recursion limit exceeded 2 pages." Click the link inside to get more details.
You will see something like this:
- Determine the page where the error starts. The detailed error message will tell you where the DekiScript error starts. If it's a loop between two pages it will always point to the page you're not on as the start of the recursive loop. Our parser will run through it twice to confirm that there is indeed a recursive loop which is why you will see it display the pages twice.
- Diagnose the type of recursive loop error. Once you know which page the error is on, you can start fixing the problem. The way you're reusing content, either through "wiki.page" or "template" calls, is causing a recursive loop which can cause long page loads and cause parsing errors. There are two common reasons why this occurs.
Bi-directional reused content
This error is caused by reusing content between two pages going in both directions.
To solve the issue you will need to create a single source page to share your content from. This will also make managing content easier.
Reusing content from the same page
This error is caused by reusing content from a section of the same page it already exists on.
You cannot reuse a content block within the same page as itself. You'll either need to copy/paste the content within that page or if you find you or your peers reusing a block across multiple pages you can create a snippet template to reuse that content.
Resolve the recursive loop error
After you diagnose what type of error it is and which page it exists on, make the appropriate changes to fix the problem.