Jump to content
TNG Community

MediaWiki Integration - So Close to Working with TNG/Joomla


dcosten

Recommended Posts

I am so close to having MediaWiki integration working.

Software/settings:

- TNG 7.1.3

- TNG Mod Manager (latest)

- MediaWiki 1.15.2 (using the TNG database, and both see each other just fine)

- Integrated with Joomla 1.5.15

What works:

- If I uninstall the mod, everything works great (other than no MediaWiki integration)

- When the mod is installed, I can go back and forth between the wiki and TNG, even within Joomla - not a problem. If I click on the Wiki document icon next to somebody's name, it takes me straight to their wiki entry. If I have edited their entry and I add<tng i=12345>Their Name (1903 - 1980)</tng> to the Wiki entry, and I click on that link, it takes me right back to their TNG entry.

- It also works for placenames, etc. - I have absolutely no problem bouncing back and forth between MediaWiki and TNG.

Symptom/Problem:

The problem is that when I look at an individual entry inside of TNG, I get this:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/familysite/public_html/tree/link_wiki.php on line 102

These are the relevant lines:

$dbw_query = "SELECT page_title FROM " . $wiki_prefix . "page WHERE page_title=\"$search_string\"";

$therows = mysql_query($dbw_query);

if(mysql_num_rows($therows) > 0 ){

$match_string = $search_string;

$match_display_string = $display_string;

$remaining_segs = $i+1;

}

if ($therows) mysql_free_result($therows);

}

It repeats a lot down the page and then I see the normal born/died/buried/entry and then it gets into the parents and family, the events/Google Map stuff, etc. The problem is only at the beginning of the individual entry - nowhere else. It happens if I look at it outside of Joomla as well.

Things I've tried:

- Replacing getperson.php with a pristine copy from a TNG 7.1.3 archive

- Regenerating the MediaWiki configuration (long shot)

- Uninstalling/Installing/Reinstalling the link_wiki.php, etc. through the mod manager

- Manually editing link_wiki.php, etc.

- Using both the #1 and #2 integrations

- Using different versions of the #1 and #2 integrations - there is kind of a mish-mash of instructions and versions floating around between the TNG Wiki and genwiki.mcfadyen.ca - I could see how other people are getting confused by it.

What I have not tried:

- Removing the relevant lines around 102 since everything else appears normally

- Changing the Joomla integration code (again doesn't seem to be the problem)

I have it using a slightly older Joomla integration, and while that could be the problem, TNG has no problems within Joomla (or out) as long as the MediaWiki mod is not installed. The moment I have it uninstalled, TNG works normally. Obviously there is no integration with MediaWiki, but it works fine when the mod is uninstalled.

The thing that gets me is that I get that error line repeating down the page and then I get right into the normal born/died, parents, family, Google Maps/Events, Photos, etc. part of the entry. Other people that I've seen here on TNGForum that have gotten that error code, they don't seem to be able to get any further than the error code. That maybe due to them not having MediaWiki setup properly.

The logs are not telling me anything - for all intents and purposes, everything appears fine - all data is present, it's just that between the top of the entry and the born/died/parents/etc. part, it generates a wall of those errors.

I hesitate to call it a MediaWiki mod problem, since it seems to work outside of that error, but it goes away when I uninstall the mod through the Mod Manager

I've attached an image below - sorry for the blurred out stuff, my family is big on privacy. The top half of the image is what you see at the top of the individual entry, the bottom half is after a few dozen of the line 102 errors.

The big black bar in the middle is me cutting up the page in two and cutting out a few dozen of the repeating line 102 errors - I just wanted to show where the line 102 errors start and stop

It's a private site so you couldn't see anything from the outside - I'm not sure you could see a problem anyways since everything seems to be working. I'm open to doing quite a bit though, and I have no problem digging into code, trying new files, etc. I don't want to touch the data obviously, but I'm comfortable replacing everything else.

Link to comment
Share on other sites

These are the file dates I've tried:

link_wiki_strategy_1.php - Feb 17, 2008

link_wiki_strategy_2.php - Feb 18, 2008

This was part of a package, Wiki Packag Rev 5.0, and the instructions mention TNG 7.1.0 and 2009 copyright information.

I have tried the instructions on these pages:

http://genwiki.mcfadyen.ca/index.php/TNG_Integration

---- http://genwiki.mcfadyen.ca/index.php/TNG_Integration_Search1

---- http://genwiki.mcfadyen.ca/index.php/TNG_Integration_Search2

Which led me to what appears to be older versions of the above files (and they didn't work either)

link_wiki_strategy_1.php - Aug 3, 2006

link_wiki.php (strategy 2) - Jul 24, 2006

I've also poked through these threads:

http://www.tngforum.us/index.php?showtopic=5284

http://www.tngforum.us/index.php?showtopic=5027

http://www.tngforum.us/index.php?showtopic=5304

And the TNG Wiki Integration thread:

http://www.tngforum.us/index.php?showtopic=1194

Maybe there are some newer mod files I'm not using (link_wiki) or something?

Link to comment
Share on other sites

These are the file dates I've tried:

link_wiki_strategy_1.php - Feb 17, 2008

link_wiki_strategy_2.php - Feb 18, 2008

This was part of a package, Wiki Packag Rev 5.0, and the instructions mention TNG 7.1.0 and 2009 copyright information.

I have tried the instructions on these pages:

http://genwiki.mcfadyen.ca/index.php/TNG_Integration

---- http://genwiki.mcfadyen.ca/index.php/TNG_Integration_Search1

---- http://genwiki.mcfadyen.ca/index.php/TNG_Integration_Search2

Which led me to what appears to be older versions of the above files (and they didn't work either)

link_wiki_strategy_1.php - Aug 3, 2006

link_wiki.php (strategy 2) - Jul 24, 2006

I've also poked through these threads:

http://www.tngforum.us/index.php?showtopic=5284

http://www.tngforum.us/index.php?showtopic=5027

http://www.tngforum.us/index.php?showtopic=5304

And the TNG Wiki Integration thread:

http://www.tngforum.us/index.php?showtopic=1194

Maybe there are some newer mod files I'm not using (link_wiki) or something?

Did you try to install the TNG Mod for Wiki Integration ?

Link to comment
Share on other sites

Did you try to install the TNG Mod for Wiki Integration ?

Sorry if I wasn't clear, yes, I tried that. Tried multiple versions of those files as well.

In a way, when I install the mod, I wish it would completely break TNG or that the MediaWiki integration wouldn't work. It would help me narrow down the problem.

I'm faced with something in getperson.php, genlib.php, or personlib.php causing a conflict with something in link_wiki.php. I've used clean/new versions of those TNG files from a fresh download of the latest TNG.

Link to comment
Share on other sites

Sorry if I wasn't clear, yes, I tried that. Tried multiple versions of those files as well.

In a way, when I install the mod, I wish it would completely break TNG or that the MediaWiki integration wouldn't work. It would help me narrow down the problem.

I'm faced with something in getperson.php, genlib.php, or personlib.php causing a conflict with something in link_wiki.php. I've used clean/new versions of those TNG files from a fresh download of the latest TNG.

So what is not working? If I am not mistaken, you also have to complete some of the MediaWiki requirements for this to work, like installing the Wiki Language Integration and some other Customization.

If that does not work, try asking your question on the User2 email list. If you are not subscribe, go the TNG Admin and click on the Getting Started link in the top line on the screen, scroll down to Other Resources and use the links in item 2 to subscribe.

Link to comment
Share on other sites

Everything works except I keep getting this line:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/familysite/public_html/tree/link_wiki.php on line 102

Over and over, around 20 times, inserted into the individual entries, in between the bookmark icon and the top of the Tabs - the red line in the image below is where the errors occur when the mod is installed:

That is the only place it occurs - between the bookmark icon and the tabs. The rest of the individual entry works just fine. MediaWiki works just fine regardless of whether the mod is installed in TNG or not - its extensions will take you to the proper TNG entries, etc. When the mod is installed, other than the warning/error message above, everything works inside of TNG.

Link to comment
Share on other sites

Everything works except I keep getting this line:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/familysite/public_html/tree/link_wiki.php on line 102

Over and over, around 20 times, inserted into the individual entries, in between the bookmark icon and the top of the Tabs - the red line in the image below is where the errors occur when the mod is installed:

That is the only place it occurs - between the bookmark icon and the tabs. The rest of the individual entry works just fine. MediaWiki works just fine regardless of whether the mod is installed in TNG or not - its extensions will take you to the proper TNG entries, etc. When the mod is installed, other than the warning/error message above, everything works inside of TNG.

Please understand that I currently do not run this mod. I installed it on a test system to work out what some of the requirements were when people were raising issues, and then I found out the reason they were asking questions was the mod was bundled with the Mod Manager install. (No longer the case)

The TNG mod builds links from the TNG page to your MediaWiki if I remember correctly and the language extension allows links to be created back to TNG individual or place pages.

So I would recommend that you pose the problem on the User2 list, since I think Brian monitors it more frequently than he does the forum. Or try contacting Brian McFadyen from his web site, if there is a Contact link.

Please provide the solution to the problem here when you get an answer.

Link to comment
Share on other sites

  • 2 months later...
John Kleinmann

Hi.. I had the same error message as described above. Brian McFadyen helped by indicating that the wiki table prefix that was setup during installation probably did not match what was in the MOD Manager edit-settings screen. Once it was updated, the TNG site rendered properly.

Thanks.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...