Jump to content
TNG Community
BobP45

OpenStreetMap v13.0.0.7b mod install failure

Recommended Posts

BobP45

Hi, I just upgraded from TNG 12.3 to 13.0.2, using Windows 10 and Firefox 85.0.2. The OSM mod 12.3.0.6a was working fine in the old TNG version. After I downloaded OpenStreetMap_v13.0.0.7b.zip, extracted and FTP'd the .cfg file and the openstreetmap_v13.0.0.7b folder to my TNG mods folder on my website and tried to install the mod, I got 4 bad target errors, not in the language files, but here:

line 736: %target:placesearch.php% verified
line 744: %location:% #1 Bad target
line 767: %location:% #2 Bad target
line 792: %target:headstones.php% verified
line 799: %location:% #1 Bad target
line 827: %target:showmap.php% verified
line 835: %location:% #1 Bad target
line 863: %target:heatmap.php% verified
 
I have attached screenshots. As far as I can tell, the TNG 13.0.2 upgrade is working fine otherwise. Any ideas or help would be appreciated.
Thanks, Bob

Mod manager osm screen shot 01.jpg

Mod manager osm screen shot 02.jpg

Share this post


Link to post
Share on other sites
manofmull

Bob

In Admin/Setup/Map Settings, have you entered OSM in the Map Key field?

Share this post


Link to post
Share on other sites
BobP45
6 minutes ago, manofmull said:

Bob

In Admin/Setup/Map Settings, have you entered OSM in the Map Key field?

Yes, thanks, I have. As Ken pointed out in another thread, the "Requires OSM in the beginning of the map key in Map Settings" note is just informational. The "Cannot install" means there is some other error.

Share this post


Link to post
Share on other sites
tngrlkrz

Did you try uninstalling all the other mods?  You could try using the 'Analyze TNG Files' tab and see what other mods in your mods folder that are modifying placesearch.php and the other two files. This will narrow it down for you.  

Share this post


Link to post
Share on other sites
XerxX

Hi Bob,

Do you have any other mods installed?

If so: Plese uninstall them one by one and see which one changes the status of OSM. Then try to install OSM before that mod. Also: Please tell us which mod.

If not: Please zip and PM me your placesearch.php file and I'll try to see what's wrong.

Regards,

Erik

EDIT: Thanks Ron ;-)

Share this post


Link to post
Share on other sites
BobP45
58 minutes ago, tngrlkrz said:

Did you try uninstalling all the other mods?  You could try using the 'Analyze TNG Files' tab and see what other mods in your mods folder that are modifying placesearch.php and the other two files. This will narrow it down for you.  

Thanks Ron and Erik. No other mods are installed. According to the "Analyze TNG Files" tab, the only mod which is modifying the three files indicated in my op is openstreetmap_v13.0.0.7b.cfg

The only other mod I had been using in the past was unused media v12.0.0.2. After upgrading to TNG v13.0.2, I did not re-install it. And now I have deleted it just to be sure, so the only mod which shows up in the Mod list for "All" is OSM v13.0.0.7b. And under the "Analyze TNG Files" tab, it shows only openstreetmap_v13.0.0.7b.cfg for each of the 18 files shown below in the screenshot.

I'll now upload the files to Erik as requested.

Mod manager osm screen shot 03.jpg

Share this post


Link to post
Share on other sites
BobP45
1 hour ago, XerxX said:

If not: Please zip and PM me your placesearch.php file and I'll try to see what's wrong. 

Done. Thanks Erik.

- Bob

Share this post


Link to post
Share on other sites
Ken Roy

You may need to copy the three TNG modules to your site that show a Bad Target since evidently, something is causing a problem if you have no mods installed.

Share this post


Link to post
Share on other sites
BobP45

Here is the list of mods in placesearch.php from the  "Analyze TNG Files" tab if this helps:

File placesearch.php is modified by:

openstreetmap_v13.0.0.7b.cfg   Hide modifications


// Location 1
%location:%
if( $map['key'] && $isConnected) {
if( !isset($flags['scripting']) ) $flags['scripting'] = "";
$flags['scripting'] .= "<script type=\"text/javascript\" src=\"{$http}://maps.googleapis.com/maps/api/js?language={$text['glang']}$mapkeystr\"></script>\n";
}

%end:%
%replace:%

/* Start OpenStreetMap mod v13.0.0.7b (1/2) */

if( $map['key'] && substr($map['key'],0,3)!='OSM' && $isConnected) {
if( !isset($flags['scripting']) ) $flags['scripting'] = "";
$flags['scripting'] .= "<script type=\"text/javascript\" src=\"{$http}://maps.googleapis.com/maps/api/js?language={$text['glang']}$mapkeystr\"></script>\n";
}

/* End OpenStreetMap mod v13.0.0.7b (1/2) */

%end:%
// Location 2
%location:%
echo "<br /><div id=\"map\" style=\"width: {$map['indw']}; height: {$map['indh']}; margin-bottom:20px;\" class=\"rounded10\"></div>\n";
%end:%
%insert:before%

/* Start OpenStreetMap mod v13.0.0.7b (2/2) */

if (substr($map['key'],0,3) == 'OSM') {
echo "<div style='position:relative; top:0px; left:0px; display:block; width:100%;'>\n";
echo "<br /><div id=\"map\" style=\"width: {$map['indw']}; height: {$map['indh']}; margin-bottom:20px;\" class=\"rounded10\"></div>\n";
echo "<div id='infodiv' style='position:absolute; top:0px; left:0px; background-color:white; display:none; border:1px solid #ccc; padding:8px; z-index:100;' class='mapballoon normal'></div>\n<div id='osmmapsat' style='position:absolute; top:18px; right:6px; z-index:50;' class='rounded4' onmouseover=\"this.style.backgroundColor='#eeeeee';\" onmouseout=\"this.style.backgroundColor='#dddddd';\"></div></div>\n";
} else

/* End OpenStreetMap mod v13.0.0.7b (2/2) */

%end:%

Share this post


Link to post
Share on other sites
BobP45
5 minutes ago, Ken Roy said:

You may need to copy the three TNG modules to your site that show a Bad Target since evidently, something is causing a problem if you have no mods installed.

Thanks Ken - I sent all three to Erik in a PM.

Share this post


Link to post
Share on other sites
XerxX
36 minutes ago, BobP45 said:

I sent all three to Erik in a PM.

Got them. Checking now...

/Erik

Share this post


Link to post
Share on other sites
XerxX

Bob,

Please uninstall any mod you may have installed now, and replace the three files with the originals from the 13.0.2 distribution package.

Something is absolutely wrong - look here:
The original TNG 13.0.2 placesearch.php file looks like this at mod-place #1

if( $map['key'] && $isConnected) {
    if( !isset($flags['scripting']) ) $flags['scripting'] = "";
    $flags['scripting'] .= "<script type=\"text/javascript\" src=\"{$http}://maps.googleapis.com/maps/api/js?language={$text['glang']}$mapkeystr\"></script>\n";
}

Your file looks like this:

if( $map['key'] && $isConnected)
    $flags['scripting'] .= "<script type=\"text/javascript\" src=\"{$http}://maps.googleapis.com/maps/api/js?language={$text['glang']}$mapkeystr\"></script>\n";

Obviously not the same. It seems to me that someone or some mod has edited this part. I haven't looked at the rest...

HTH

Erik

Share this post


Link to post
Share on other sites
BobP45
1 hour ago, XerxX said:

Please uninstall any mod you may have installed now, and replace the three files with the originals from the 13.0.2 distribution package. 

Thanks Erik,

did that and it seems to work fine now. I have no idea how that happened, I certainly didn't knowingly change anything and I hadn't installed any mods. Makes me wonder if anythng else with the TNG upgrade is amiss.

Thanks so much for your time and help, much appreciated!

Take care, Bob

Share this post


Link to post
Share on other sites
XerxX

Bob,

A not-too-close comparison w/ the v12.3 placesearch.php suggests your file to be that version.

That is also suggested by your screen shot above where the v12 of OSM shows "OK to install" which it shouldn't. And it doesn't now, I think.

Glad it worked.

Erik

 

Share this post


Link to post
Share on other sites
BobP45

Hi Erik,

interesting and very strange, as I know I uninstalled all mods (there were only 2) on TNG 12.3 before I uploaded the 13.0.2 files. The only thing I forgot to do before uploading the TNG v13.0.2 files was to turn Maintenance Mode on, but that should only affect the TNG database, and I turned it on after the upload was finished and before I switched to the readme12x-13x.html on the site.

Hmm, with the upload of the TNG 13.0.2 files, I may have told FileZilla to only overwrite older files (which I do by habit for my media files). I notice the date of placesearch.php in the TNG 13 distribution package is 8 Dec 2020. And I see from the Mod Manager log that the last time I had installed OSM, and any add on for that matter, was OSM v12.3.0.6a on 30 Mar 2020 when I had updated TNG from 12.2 to 12.3. The next two more recent entries are from today and are the uninstall of OSM v12.3.0.6a and Unused Media 12.0.0.2, both at 1:47 pm today. The uploaded files from the TNG 13 update on my site all have a time stamp of today starting after 1:48 pm.

I've long since deleted the v12 OSM and Unused Media .cfg files from the mods folder, so they no longer show up in the list.

Whatever. I'm glad it works now. I'll be sure to upload files with general overwrite in the future, in case that was the culprit.

Thanks and regards, Bob

EDIT: Ahh, but uninstalling the old OSM mod today restored the placesearch.php to its original content and I imagine the file then would have a time stamp of today. That must have been what happened and why it and the other 2 (hopefully only those) were still the 12.3 files after the 13.0.2 upgrade, because I uploaded the files with "Overwrite only if newer". Oops. Sorry about that. And thanks again.

Share this post


Link to post
Share on other sites
Reventlow

I have - unfortunately - exactly the same issue after I have upgraded TNG from v. 13.0.2 => 13.0.3. In my 13.0.2 version I had no problems using OSM, but after my upgrade my mod manager shows this:

linje 74: %copyfile: osmmaplib.php  kilde mangler
Kilde: mods/openstreetmap_v13.0.0.7b/osmmaplib.php
linje 75: %copyfile: osmmaplib2.php  kilde mangler
Kilde: mods/openstreetmap_v13.0.0.7b/osmmaplib2.php
linje 76: %copyfile: osmmapdrawthemap.php  kilde mangler
Kilde: mods/openstreetmap_v13.0.0.7b/osmmapdrawthemap.php
linje 77: %copyfile: heatmap_OSM.php  kilde mangler
Kilde: mods/openstreetmap_v13.0.0.7b/heatmap_OSM.php
linje 78: %copyfile: osm_settings.php  kilde mangler
Kilde: mods/openstreetmap_v13.0.0.7b/osm_settings.php
linje 79: %copyfile: osmmapswitch.js  kilde mangler
Kilde: mods/openstreetmap_v13.0.0.7b/osmmapswitch.js
linje 80: %copyfile2: css/ol.css  kilde mangler
Kilde: mods/openstreetmap_v13.0.0.7b/ol.css
linje 81: %copyfile2: css/ol-geocoder.min.css  kilde mangler
Kilde: mods/openstreetmap_v13.0.0.7b/ol-geocoder.min.css
linje 82: %copyfile2: css/ol-popup.css  kilde mangler
Kilde: mods/openstreetmap_v13.0.0.7b/ol-popup.css
linje 83: %copyfile2: js/ol.js  kilde mangler
Kilde: mods/openstreetmap_v13.0.0.7b/ol.js
linje 84: %copyfile2: js/ol-geocoder.js  kilde mangler
Kilde: mods/openstreetmap_v13.0.0.7b/ol-geocoder.js
linje 85: %copyfile2: js/ol-popup.js  kilde mangler
Kilde: mods/openstreetmap_v13.0.0.7b/ol-popup.js
linje 86: %copyfile2: img/osmpin.png  kilde mangler
Kilde: mods/openstreetmap_v13.0.0.7b/osmpin.png
linje 87: %copyfile2: img/osmmap.gif  kilde mangler
Kilde: mods/openstreetmap_v13.0.0.7b/osmmap.gif
linje 88: %copyfile2: img/osmsatel.gif  kilde mangler
Kilde: mods/openstreetmap_v13.0.0.7b/osmsatel.gif


There are no "Bad Targets" as in BoBP45 example above.
I have cleared all other mods - and written OSM in the proper place in Map Settings + uploaded fresh copies of these files:

  • admin_editcemetery.php
  • admin_editmedia.php
  • admin_editplace.php
  • admin_main.php (TNG 12)
  • admin_newcemetery.php
  • admin_newplace.php
  • admin_places.php
  • genlib.php
  • getperson.php
  • headstones.php
  • heatmap.php // Not v10
  • personlib.php
  • placesearch.php
  • showmap.php

Any clues as what I might have done wrong or what to do 

Christian.

Share this post


Link to post
Share on other sites
Leif Sweden

Hi,
I have upgrade TNG from v13.0.2 up to v13.0.3. Before that I deleted OSM v13.0.0.7 and v13.0.0.7a and saw that v13.0.0.7b was available which I installed after upgrading TNG.

 

It works fine with OSM. My question is; am I supposted to uninstall OSM v13.0.0.7 and n13.0.0.7a?

Leif

Screenshot Mods 2021-03-31.jpg

Share this post


Link to post
Share on other sites
XerxX

Hi Christian,

Modmanager lists the files in the folder openstreetmap_v13.0.0.7b as missing ("kilde mangler" = "source missing"?).

Either you haven't copied the folder itself to the mods folder, or it is empty.

Either way: FTP the folder into your mods folder and refresh Modmanager.

HTH

Erik

Share this post


Link to post
Share on other sites
XerxX

Hi Leif,

Well, they are not installed but you have no use for them so you can remove them.

After that it's safe to install v7b.HTH

Erik

Share this post


Link to post
Share on other sites
Reventlow

My upload of the openstreetmap_v13.0.0.7b mod includes the cfg.file, the folder openstreetmap_v13.0.0.7b containing 15 files - but it is still not working. I have noticed that Leif Sweden did accomplish installation.

To see if I had done anything wrong I have completely reinstalled my v 13.0.3 from the full install package and have not installed any other mods - but without any change. One thing I did notice was that there is a conflict with the mod placesearchmoreinfo. I have used this mod previously - but it has now been removed and I have cleared the cache too. Can there still be any remnants of that conflict as an answer to why the mod cannot be installed?

Christian.

Skærmbillede 2021-04-05 kl. 22.26.07.png

Share this post


Link to post
Share on other sites
Leif Sweden

Hi Erik,

I have now removed OSM v13.0.0.7 and 7a and after that I can´t see the map in TNG. In Mod-Handler is says that OSM shall be in the beginnig and it is.
I have enclosed three screenshots, in FTP you see what in installed in Mod file, in Mod-Handler what is wrong and in TNG missing map.

I guess I have to reinstall OSM v13.0.0.7b, I have it to the left in FTP as you can see. How do I act now, shall I remove all OSM files to the right (my site) and reinstall from my PC?
Shall I move complete folder OpenStreetMap including MACOXS and folder in that?
What about file index.html in FTP to the right?

As you know from before I am lousy in these matters, grateful for step by step instructions.

Leif

Screenshot FileZilla after removing v13.0.0.7 and v13.0.0.7a.jpg

Screenshot Mod-Hanterare after removing v13.0.0.7 and v13.0.0.7a.jpg

Screenshot TNG after removing v.13.0.0.7 and v13,0,0,7a.jpg

Share this post


Link to post
Share on other sites
Ken Roy

For those of you are trying to use the Mod Manager and are not familiar how it works, you  should  read the TNG Wiki articles in the Mod Manager category.  Installing Config Files  and Interpreting Status  might be especially helpful.

If you are not comfortable in reading the English language, you should select your language in the Translate pull down selection.  Granted that Google Translate does not always translate everything correctly, the articles with screen captures might help you solve your problems

Share this post


Link to post
Share on other sites
XerxX

Christian and Leif,

In Christian's case, the folder is for some reason named openStreetMap_v13.0.0.7b but contains the correct files. Maybe it should be renamed to openstreetmap_v13.0.0.7b (no caps).

I'm not sure that it will be the solution, but as Modmanager indicates that the files are missing, that is then the problem: The files can't be found. There is no indication that any other files contain conflicting code.

Leif's case seems to be a little bit different. You have an extra file of 303 bytes. I have no idea where it may have come from.

The file openstreetmap_v13.0.0.7b.cfg seems to be totally correct.

However: The folder is named OpenStreetMap_v13.0.0.7b but either that is the complete zip folder containing both the openstreetmap_v13.0.0.7b.cfg file and the folder openstreetmap_v13.0.0.7b that is the correct folder.

From top left part of your FTP screenshot it seems as if the folder OpenStreetMap_v13.0.0.7b contains TWO folders openstreetmap_v13.0.0.7b but no openstreetmap_v13.0.0.7b.cfg file. Maybe I read it wrong.

I can't see which of the two folders is currently listed in the bottom left part, but that is the folder that should be in the mods folder. It contains the files.

If it is the correct folder you should try to rename it from OpenStreetMap_v13.0.0.7b to openstreetmap_v13.0.0.7b (no caps).

 

I can't understand why your (both Christian's and Leif's) folders have got caps in the name. I just now downloaded the mod and un-zipped it. I got a wrapper folder named OpenStreetMap_v13.0.0.7b (with caps and that's okay). When I open it I find the openstreetmap_v13.0.0.7b.cfg file and the folder openstreetmap_v13.0.0.7b - NOTE that none of them has any caps. Those two (without caps) are the ones that should be uploaded (FTPed) to your mods folder.

 

I don't think I can express myself better. I hope this help. I have to sleep now it's soon 1:30 AM.

Erik

PS. Thanks Ken. Yes I agree. Start there guys ;-)

Share this post


Link to post
Share on other sites
Ken Roy
2 hours ago, XerxX said:

I can't understand why your (both Christian's and Leif's) folders have got caps in the name. I just now downloaded the mod and un-zipped it. I got a wrapper folder named OpenStreetMap_v13.0.0.7b (with caps and that's okay).

Christian and Leif,

If you created the folder name as OpenStreetMap_v13.0.0.7b you need to rename it to be all lower case letters.  Unix or Linux is case sensitive.  The Mod Manager is looking for a folder name openstreetmap_v13.0.0.7b which is correct in the zip file.  If you renamed it to use OpenStreetMap, then the Mod Manager is not finding that folder.

if your host supports unzipping files, you should FTP the mod zip files to your TNG mods folder and unzip them directly there;  I know not all hosting service support unzipping files, but you cannot rename folders names.  They must rename what is used in the copyfile or copyfile2 statements in the mod .cfg file.

Share this post


Link to post
Share on other sites
Reventlow

Perfect. That was the obvious solution for me. Everything is ok now, thank you both.

Christian

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×