Jump to content
TNG Community

Census Mod - Image URL Mismatch


majdan

Recommended Posts

I just installed the census mod on my test site so I can start playing around with it. I don't have an Ancestry membership so I know I'm in for a lot of data entry, which makes me nervous. Anyway, I got the mod installed without a hitch. I created my first record, a bit of a chore, but I got it.

When I was looking at the resulting changes to my site, I noticed an issue. If you go to this person's main page, you'll see the census entry. If you click "Image", it successfully loads the Census image, using the "m-t###" format from the National Archives. (I did have to rename my existing census image and move to the new census folder.) However, if you click "Transcript" from that person's main page, it loads the text transcript. There is a link on that page that says "IMAGE". Clicking that fails to load the image because it is looking for the image with the dbid filename. Also, the "Back" link on that page also does not work.

I have no problems renaming my census images to fit this new format, but these two image links should be the same as I do have a problem storing the same image twice. Is something not configured correctly on my end? Did I not follow the steps correctly? In my research of this new mod on this board and the wiki, I do feel that there is sparse documentation on using it without an Ancestry login. Nevertheless, it is a very promising feature for something I have been wanting for a long time. I'm really excited for these bugs to get worked out so I can make full use of it.

Link to comment
Share on other sites

Well, crap. I haven't done much with my site in a while so I was devoting a bit of time today to testing out this mod and upgrading from 9.0.1 to the latest, 9.2.1. However, after upgrading my test site to 9.2.1, I now see that the census mod is not yet compatible with this latest version, just 9.2.0. Therefore, my example no longer works. Hopefully my description allows someone else to attempt to reproduce it. If not, then as soon as the mod is compatible with 9.2.1, I will reinstall and check this bug again.

Link to comment
Share on other sites

Well, crap. I haven't done much with my site in a while so I was devoting a bit of time today to testing out this mod and upgrading from 9.0.1 to the latest, 9.2.1. However, after upgrading my test site to 9.2.1, I now see that the census mod is not yet compatible with this latest version, just 9.2.0. Therefore, my example no longer works. Hopefully my description allows someone else to attempt to reproduce it. If not, then as soon as the mod is compatible with 9.2.1, I will reinstall and check this bug again.

The Census Feature mod is compatible with TNG 9.2.1. The TNG Wiki article was not updated to show the latest TNG version.

Link to comment
Share on other sites

The Census Feature mod is compatible with TNG 9.2.1. The TNG Wiki article was not updated to show the latest TNG version.

I had the census mod installed, then upgraded from 9.0.1 to 9.2.1 and now I get the "Mod updates are required" message in Mod Mgr. Also, I have this error: "personlib.php: Location2: Bad target"

Link to comment
Share on other sites

IPB Image

The image above is from personlib.php in my test installation. Lines 575 and 576 are from the actual personlib file. Line 577 is me copy/pasting the code from the mod that it is looking for. I added spacing in line 577 to display the difference. Line 576 in the actual php file has the additional code && $data['event'] != "NAME" that is throwing off the mod. At least, that's what I see.

mod code:

$editicon = $tentative_edit && $data['event'] && $data['event'] != "NAME" ? "<img src=\"{$cms['tngpath']}img/tng_edit.gif\" width=\"16\" height=\"15\" border=\"0\" alt=\"{$text['editevent']}\" title=\"{$text['editevent']}\" align=\"absmiddle\" onclick=\"tnglitbox = new LITBox('$tentedit_url" . "tree=$tree&persfamID={$data['entity']}&type={$data['type']}&event={$data['event']}&title={$data['text']}',{width:500,height:500});\" class=\"fakelink\" />" : "";
personlib code:
$editicon = $tentative_edit && $data['event'] && $data['event'] != "NAME" ? "<img src=\"{$cms['tngpath']}img/tng_edit.gif\" width=\"16\" height=\"15\" border=\"0\" alt=\"{$text['editevent']}\" title=\"{$text['editevent']}\" align=\"absmiddle\" onclick=\"tnglitbox = new LITBox('$tentedit_url" . "tree=$tree&amp;persfamID={$data['entity']}&amp;type={$data['type']}&amp;event={$data['event']}&amp;title={$data['text']}',{width:500,height:500});\" class=\"fakelink\" />" : "";

Link to comment
Share on other sites

IPB Image

The image above is from personlib.php in my test installation. Lines 575 and 576 are from the actual personlib file. Line 577 is me copy/pasting the code from the mod that it is looking for. I added spacing in line 577 to display the difference. Line 576 in the actual php file has the additional code && $data['event'] != "NAME" that is throwing off the mod. At least, that's what I see.

Sounds like you have another mod installed that is conflicting with this mod. I don't believe TNG uses

Please use the # or Code button in the TNG Forum to post the lines of code. It is awefully hard to decipher from an image file.

Also provide a list of mod that change code in personlib.php that you have installed.

Link to comment
Share on other sites

Sounds like you have another mod installed that is conflicting with this mod. I don't believe TNG uses

Please use the # or Code button in the TNG Forum to post the lines of code. It is awefully hard to decipher from an image file.

Also provide a list of mod that change code in personlib.php that you have installed.

Looks like a change to personlib.php was included in the upgrade file after it was initially released. Since the mod installed clean on my desktop on Monday.

Link to comment
Share on other sites

Looks like a change to personlib.php was included in the upgrade file after it was initially released. Since the mod installed clean on my desktop on Monday.

Interesting. Well, an easy code fix that i went ahead and made on my side. I did look for any other mods that i have that edit the personlib and the only other one was the Google Maps 15 mod, which I confirmed is modifying a different part of the file.

The census mod has been reinstalled on my test site which means the link in my first post now works again. Back to the issue at hand!

Link to comment
Share on other sites

Just following up. The responses above were regarding a different issue I experiences after upgrading to 9.2.1. Please review my first post as it is still a problem.

Thanks!

Link to comment
Share on other sites

Just following up. The responses above were regarding a different issue I experiences after upgrading to 9.2.1. Please review my first post as it is still a problem.

Thanks!

That is fixed in the next version of the mod, which is currently in beta testing. The URL link is incorrectly using "Census" instead of "census" for the image folder.

Link to comment
Share on other sites

That is fixed in the next version of the mod, which is currently in beta testing. The URL link is incorrectly using "Census" instead of "census" for the image folder.

Thanks for the reply. I'll test out the new version when it is ready.

Link to comment
Share on other sites

Thanks for the reply. I'll test out the new version when it is ready.

It should be posted later today (Central Time)

Link to comment
Share on other sites

Thanks for the reply. I'll test out the new version when it is ready.

The new version of the mod was posted last night but not publicized.

Not shown as a feature in the new mod, is the capability to display an image from a TNG User media collection because it is not fully implemented. You would have to edit the cen_transhead record in phpMyAdmin and add the showmedia URL to the imageurl field for example showmedia.php?mediaID=253&medialinkID=426 as I did on my great-great-grandfather's page for the 1870 and 1880 census

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...