[ Disclaimer, Create new user --- Wiki markup help, Install P99 ]
Difference between revisions of "Dynamic Zone Lists"
(→How They Break) |
(→How They Break) |
Latest revision as of 16:24, 19 July 2025
Dynamic Zone Lists are a special feature of the Project 1999 wiki which displays tables of information at the bottom of each zone page. Those pages include data collected from other pages related to those zones: NPCs, quests, or items from that zone.
Contents |
How They Work
Because they are based on data from a large number of other pages, the dynamic zone tables are not updated immediately when one of those pages changes. Instead, every (other?) night (day?) the wiki updates all of the dynamic zone tables.
This means you may see a lag when you edit a page, before that edit is reflected in the related zone's table.
How They Break
When the code for the dynamic zone lists comes across some "bad code" in any of the related wiki pages, it can corrupt the entire page's table, breaking it. This situation can be frustrating, because while the table will be obviously broken on the zone page, the cause of the problem could be any of the related wiki pages for that zone's category.
For instance, if the NPCs table on the Halas page broke, it could be from code in the A Sled Dog page, the Brin McQuaid page, or any other page that's in the Category:NPCs and the Category:Halas.
The only way to fix the page is to go through all Halas NPC pages, and check them for recent edits (on their History page). If they have any, check them carefully for code that could be invalid, such as opening brackets without matching closing brackets, or foreign language characters, or anything else out of the ordinary.
Previous Breakage Examples
To help debug future breakages, he's a list (not comprehensive) of things that have broken the dynamic zone list in the past.
- Pages with unicode characters such as the "approximately equal" symbol (which looks like a "=", but wavier)
- Pages with links that include slashes (eg. 'some page/some subpage")
- Pages with incomplete wiki text (eg "[[" without "]]") (NOTE: this happened awhile ago and I'm not certain whether it was found to cause a breakage or not; this one's a maybe)
Helper Bookmarklet
Clicking through every linked page is a real hassle, but the following bookmarklet can make it slightly easier.
To use it, simply copy/paste the code into your browser's URL bar (or, to re-use it, make a bookmark and replace the location with that code). When you use it, it will make every link on the page take you directly to the page's history, instead of the main page. To disable the code, simply refresh the page.
Regular version:
[FONT="Courier New"]javascript:$('a').click(e=>{window.location = 'https://wiki.project1999.com/index.php?action=history&title=' +e.target.href.split('/').at(-1); e.preventDefault()})[/FONT]
Alternate version that opens links in a new tab:
[FONT="Courier New"]javascript:$('a').click(e=>{window.open('https://wiki.project1999.com/index.php?action=history&title=' +e.target.href.split('/').at(-1),'_blank'); e.preventDefault()})[/FONT]
Helper Function
IMPORTANT WARNING:This function makes mass requests to the wiki, to check the history of potentially 100+ pages that are related to a zone. It throttles those requests to one per second, but still, excessive use could impact the wiki for everyone. Please do not over-use this function or use it at busy times, and if you notice (in another tab) that the wiki is slowing significantly, cancel it (refresh the page; you can try again later when the wiki is less busy).
To resolve dynamic zone issues, you really need a list of recently edited pages (for that zone). Power users can use their browser's developer console to do exactly this.
- Hit F12 to open the developer tools in most browsers (smaller browsers may not have this feature)
- Click on the "Console" tab, and then into the text entry area
- (Optional) Type "1 + 1" and hit enter; you should see "2" appear if you are in the right spot
- Type "checkForDynamicZonePagesEditedRecently(6)" and hit enter
- (6 = check for pages edited in the last six months; change this if needed, but 6 months is a good place to start since most pages aren't that active)
- Scroll to the bottom of the page. A countdown will appear telling you how many pages are left to scan
- Once the countdown finishes, you will have a list of all related pages edited recently
- NOTE: The links to these pages open up new tabs/windows on purpose; as soon as you leave this page you'll lose the list, and have to scan all over again
