Project 1999

Go Back   Project 1999 > Blue Community > Blue Server Chat

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 08-25-2017, 12:21 AM
steme08 steme08 is offline
Large Rat


Join Date: Oct 2015
Posts: 5
Default P99 wiki bug

Has anyone tried using the p99 wiki for butcherblock mountains recently? It is all messed up. https://wiki.project1999.com/Butcherblock_Mountains
  #2  
Old 08-25-2017, 01:00 AM
loramin loramin is offline
Planar Protector

loramin's Avatar

Join Date: Jul 2013
Posts: 9,343
Default

Yeah that happens from time to time. You might try messaging Rhavin; I'm not sure but I think he might be able to fix it.

OR someone could give me wiki admin access and then I could fix it ... just saying ...
__________________

Loramin Frostseer, Oracle of the Tribunal <Anonymous> and Fan of the "Where To Go For XP/For Treasure?" Guides
Anyone can improve the wiki! If you are new to the Blue server, you can improve the wiki to earn a "welcome package" of up to 2k+ platinum! Message me for details.
  #3  
Old 08-25-2017, 07:36 AM
Rygar Rygar is offline
Planar Protector

Rygar's Avatar

Join Date: Nov 2015
Location: Minnesota
Posts: 1,797
Default

Quote:
Originally Posted by loramin [You must be logged in to view images. Log in or Register.]
Yeah that happens from time to time. You might try messaging Rhavin; I'm not sure but I think he might be able to fix it.

OR someone could give me wiki admin access and then I could fix it ... just saying ...
I had messaged Ravihn about this recently, he told me to check out the custom extensions here for the PHP which includes the Dynamic Zone List and he can incorporate any changes. I need to brush up on my PHP before I dive into this, but you seem pretty knowledgeable.

Here's the link (its just the page add utility, never noticed the 'Custom Extensions Source' link before on it):

http://wiki.project1999.com/utils/wikiUtils.php
__________________
Wedar - Level 60 Grandmaster <Azure Guard>
Check out my Zone Guide to The Hole
The Hole wiki now fully updated and accurate: Hole Wiki Page
  #4  
Old 08-25-2017, 11:05 AM
Lotxi Lotxi is offline
Aviak


Join Date: Apr 2014
Posts: 81
Default

Grobb page has a similar issue
  #5  
Old 08-25-2017, 01:43 PM
Gumbo Gumbo is offline
Fire Giant


Join Date: May 2015
Posts: 672
Default

A few of the zone pages are bugged out like the BB zone page...
  #6  
Old 08-25-2017, 02:08 PM
loramin loramin is offline
Planar Protector

loramin's Avatar

Join Date: Jul 2013
Posts: 9,343
Default

Quote:
Originally Posted by Rygar [You must be logged in to view images. Log in or Register.]
I had messaged Ravihn about this recently, he told me to check out the custom extensions here for the PHP which includes the Dynamic Zone List and he can incorporate any changes. I need to brush up on my PHP before I dive into this, but you seem pretty knowledgeable.

Here's the link (its just the page add utility, never noticed the 'Custom Extensions Source' link before on it):

http://wiki.project1999.com/utils/wikiUtils.php
Sweet! Yeah, I'd seen that page before too, but also never noticed that link.

PHP is like my least favorite language (would have taken Node.js, Python, Java or even Ruby over it), but I have used it in the past, so I'll take a look at the code and see if I can find anything. No promises though since it's a lot harder to debug something when you can't actually test the possible fixes.
__________________

Loramin Frostseer, Oracle of the Tribunal <Anonymous> and Fan of the "Where To Go For XP/For Treasure?" Guides
Anyone can improve the wiki! If you are new to the Blue server, you can improve the wiki to earn a "welcome package" of up to 2k+ platinum! Message me for details.
  #7  
Old 08-25-2017, 03:43 PM
loramin loramin is offline
Planar Protector

loramin's Avatar

Join Date: Jul 2013
Posts: 9,343
Default

Ok, here's what I have so far.

Let's start with the NPC list part, as I'm pretty sure I understand what's happening in it now (just not why). The way the "dynamic zone list" code works is it asks the database for all NPC "articles" related to the zone:

Code:
$catNames = array($zoneName,"NPCs");
$NPCs = DynamicZoneList::getCatIntersection($db,$parser,$catNames);
Then, it parses them:

Code:
$rowVals = DynamicZoneList::parseNPCPage($templateText);
But before it does, it grabs the article's title, and uses that to set the title in the table (ie. it doesn't look in the article's contents to find the title). This explains why all of the NPC names are still working in the list when the rest is broken: the problem is with the article's content but it's DB title still works fine.

Now "parseNPCPage" in turn uses another function, which is used to parse both items and NPCs:

Code:
$parms = DynamicZoneList::parseTemplateParameters($templateText);
When I look at that function ... well it's a bit low-level but I'm pretty sure it's trying to split all the lines in the NPC article that look like:

Code:
| name              = a decaying dwarf skeleton
| race              = Skeleton New
| class             = [[Warrior]]
into separate array items ("parameters"). Then "parseNPCPage" iterates through those parameters, and here's where things get interesting. Inside that loop it tries to extract the parameters that get used in the dynamic list (name, race, class, etc.). Here's the part where it extracts the class:

Code:
if ( strpos($parm,"class") === 0) {
  $ePos = strpos($parm,"=");
  $class = trim(substr($parm,$ePos+1));
}
So in other words, when it finds a line like:
Code:
| class             = [[Warrior]]
it's supposed to use the part after the "=" (ie. "[[Warrior]]").

But it's not doing that. If you look at the Butcherblock page it has:

Code:
NPC Name	Race	Class	...
A Decaying Dwarf Skeleton		"zoneTopTable" ! Level of Monsters:
As I said before the name is coming from the DB, so that makes sense, but it couldn't find a Race, and when it tried to find the class it found ""zoneTopTable" ! Level of Monsters:". Now "zoneTopTable" doesn't even exist in the code, so where is that coming from?

Let's look at the top of a zone (not NPC) page:

Code:
{|
|rowspan="6" valign="top" width="160"| <div style='float:left;'>__TOC__</div>
|valign="top"|
{| class="zoneTopTable"
! ''' Level of Monsters: '''
Doesn't that last part look familiar?

So here's my theory on what's going wrong: the code is trying to grab the NPC pages and parse their content so it can use them in the zone page's dynamic zone list ... but something is going wrong and it's grabbing the zone page (can't tell which zone page it's grabbing, but I'd guess it's the same page the dynamic list is on). When it goes to parse that zone page it doesn't find the (NPC) bits its looking for, but it does find one bit that looks the same as NPC bit ... only it's not the NPC's class, it's the class of the table of the zone page.

I need a break for now (all this PHP is draining [You must be logged in to view images. Log in or Register.]). But, if anyone can figure out why the extension is grabbing the wrong pages (I would guess the issue is somewhere in "getCatIntersection"?) I think we can come up with a fix ... and if no one else does I'll try and figure it out later.
__________________

Loramin Frostseer, Oracle of the Tribunal <Anonymous> and Fan of the "Where To Go For XP/For Treasure?" Guides
Anyone can improve the wiki! If you are new to the Blue server, you can improve the wiki to earn a "welcome package" of up to 2k+ platinum! Message me for details.
Last edited by loramin; 08-25-2017 at 03:45 PM..
  #8  
Old 08-25-2017, 03:55 PM
Baler Baler is offline
Planar Protector

Baler's Avatar

Join Date: Mar 2014
Posts: 9,520
Default

You rock Loramin! Glad to finally see something proactive being done about that problem that has blighted the wiki for too long.

[You must be logged in to view images. Log in or Register.]
__________________
P99 Wiki
No longer active, thank you for the years of fun.
No alt account and I do not post on the P99 forums.
Told this to Rogean, Nilbog & Menden.
  #9  
Old 08-26-2017, 03:26 PM
loramin loramin is offline
Planar Protector

loramin's Avatar

Join Date: Jul 2013
Posts: 9,343
Default

TLDR
I need help to fix this. Just give me one of the following:

1) have someone with access log the variables I mention below, then visit the BB page, then send me the log output
2) give me admin access so I can add those lines and see the output myself
3) give me a DB dump of the wiki (it doesn't have to be a recent one, as long as it has this issue) and I can debug locally

Wall of Text
Good news/bad news time. The good news is that my theory seems to be correct. If you look at Grobb (also broken) you will see that it has a slightly different text for its NPCs' class:

Code:
"zoneTopTable" ! width="150"
and if you look at Grobb's code (at the top of the page) you'll see ...

Code:
{| class="zoneTopTable"
! width="150"
So it seems pretty clear that the NPCs at least (and probably the quests/items) are being pulled from the zone page, instead of from their actual pages.

The bad news is, I can't figure out why it's happening. The problem is definitely with the related pages (the quest/zones/items), because if you change a broken page to use the dynamic list of a working page (ie. change BB's page to use Erudin's list) it works just fine, but if you rename the page and don't change the list it remains broken. The list of broken pages I've found so far is:

Ak'Anon, Burning Wood, Butcherblock Mountains, Crushbone, Eastern Plains of Karana, Frontier Mountains, Grobb

but I don't see any connection between them. There are other (working) zones with apostrophes and spaces in their name, so it's not the zone name. There could be a single quest/item/npc with some bad wiki code that is causing the problem, but I don't see any mobs that share all (or even most) of those zones.

What would REALLY help is if I could get some debugging info. If I could get access, or if someone with access could add some code for me, what I'd really like to see is all of the values (both the query and the response) from this line in "getCatIntersection" when someone hits the Butcherblock page:

Code:
$res = $db->select( $aTables, $aFields, $aWhere, __METHOD__, $aOptions, $aJoin );
In particular I'd like to see "$aJoin", which should be the JOIN clauses of the SELECT, and should be something like:

Code:
INNER JOIN page_id = c{0}.cl_from AND c{0}.cl_to='Butcherblock_Mountains'
INNER JOIN page_id = c{1}.cl_from AND c{1}.cl_to='NPCs'
and then the results ("$res") of that SELECT, which should be:

Code:
page_namespace, page_title
'', 'A Decaying Dwarf Skeleton'
...
but I'm guessing it might actually be '', 'Butcherblock Mountains', and if that's the case the query variables should explain how we got it.

Now the actual fetching of the related pages happens elsewhere, in the assorted parse* methods, but they just fetch whatever title is given to them, and since that title comes from the above SELECT I strongly suspect the issue is happening in that SELECT, not when the code tries to lookup "a decaying skeleton" (or whatnot).

Why Trust a Random Forum Poster With Admin Access?

A) I <3 the wiki and have created several important pages on it: the (GM-requested) installation guide, the various hunting guides, etc. I would never do anything to break or harm it

B) I'm a web developer with 10+ years of experience. I've written a book on it (well, on a Javascript library, same diff), led multiple teams, chaired an industry technology group, etc. I may not be a PHP expert, but this won't be my first rodeo and I won't do anything stupid.

Alternatively if I could just get a DB dump, instead of getting access, I could setup a local media wiki installation (with the dynamic table stuff) and debug without touching the live wiki at all. The only reason I haven't done that yet is that I think that the problem is in the data, and it's not realistic for me to manually copy (page by page) all of the pages in the Butcherblock category.
__________________

Loramin Frostseer, Oracle of the Tribunal <Anonymous> and Fan of the "Where To Go For XP/For Treasure?" Guides
Anyone can improve the wiki! If you are new to the Blue server, you can improve the wiki to earn a "welcome package" of up to 2k+ platinum! Message me for details.
Last edited by loramin; 08-26-2017 at 03:45 PM..
  #10  
Old 08-26-2017, 04:43 PM
Rygar Rygar is offline
Planar Protector

Rygar's Avatar

Join Date: Nov 2015
Location: Minnesota
Posts: 1,797
Default

You definitely would have my vote for an admin, you have proven yourself very worthy. I recommend sending Ravihn a PM here do he gets an email notification, he got back to me quick last time. Mention you think you have a fix for the dynamic zone list or something, and link this thread.

I haven't had any time to investigate your fixes, but I'm curious to see if there is a difference between the syntax of the zone pages, such as someone maybe adding a new line or something, same with first mob on each of those dynamic list pages. My plan was to try and see if I can break a list to figure out the problem, but I believe the list only refreshes weekly. Sometimes I have noticed people list the 'zone' field as {{:Kaladim}} which pulls the entire zone page into the npc page, so I fix to [[Kaladim]].

Recently Ravihn fixed the runnyeye dynamic list for me, he could offer you some technical insight as to what was causing the problem.
__________________
Wedar - Level 60 Grandmaster <Azure Guard>
Check out my Zone Guide to The Hole
The Hole wiki now fully updated and accurate: Hole Wiki Page
Closed Thread


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:49 PM.


Everquest is a registered trademark of Daybreak Game Company LLC.
Project 1999 is not associated or affiliated in any way with Daybreak Game Company LLC.
Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.