vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Major Additions - VBGooglemap Member Edition (https://vborg.vbsupport.ru/showthread.php?t=123148)

Ronseal 09-12-2007 09:18 PM

Thanks Towermatt for trying to help, but running the markers.xml just brings up my portal page which currently has no link to my map install so I don't see why the markers.xml is of any use here?

towermatt 09-12-2007 09:25 PM

Hmmm, that may be the problem then. Have you checked your server to make sure the markers.xml is in the forums folder?

It really should bring up a page that shows the "entries" on your map

Ronseal 09-12-2007 09:43 PM

Sorry Towermatt, I typed 'forums' instead of 'forum' whilst testing your last instruction.

Right then you're onto something now, I have an error on one of the entry's, it reads:

A semi colon character was expected. Error processing resource 'http://www.ducatisti.co.uk/forum/markers.xml'. Line 29, Po...

And I think I can see what's wrong if I read the markers.xml file....

This is the line with the error:
Quote:

<marker mapid="29" title_map="Fred" lng="-3.5971641540527" lat="50.550280590038" userid="1245" username="Fred" text_map="blah blah blah" type="red" pimage="http://www.mysite.com/forum/vbgooglemapme.php?lat=50.55028059003783&lng=-3.5971641540527343" />
This is the next line and it works:
Quote:

<marker mapid="30" title_map="bob" lng="-2.7019500732422" lat="52.040454864151" userid="2690" username="Fred" text_map="blah blah blah" type="red" pimage="http://www.mysite.com/forum/images/googlemapme/noimage.png" />
For some reason Line 29 has appended the lat and lng to the end of the pimage, not sure why, but I've corrected the line and all works perfect again and my Markers are back on display....... Towermatt, you're a Super Star, thanks a million!

Ronseal 09-12-2007 10:16 PM

Just to add to the above obviously just editting the markers.xml isn't going to fix much so I had to correct the error on line 29 within the database, it all seems to work now..... well at least for the moment!....

towermatt 09-12-2007 11:14 PM

I'm just glad to hear we got someone going. :nanadance:

I may have to come back and find out about that database fix if mine poops out again.

How did you correct the error?

GeekDrew 09-13-2007 02:05 AM

I just installed this a couple of days ago, and the first couple of users that tried to use it (other admins of mine, as I like to do extensive testing) managed to break the pins, because of the XML validation error that others have referenced as "running the XML file".

The cause of the problem is that the pimage link isn't being parsed safely for XML.

Here's a fix that I think will work (at least it works for me -- I do NOT guarantee this, if it causes spontaneous combustion, fire, death, etc., I'm not to blame):

*** I JUST SAID THAT I DO NOT GUARANTEE THIS WILL WORK. I DISCLAIM ALL LIABILITY. YOU MUST BACK UP YOUR DATABASE AND ALL OF THE FILES RELATED TO THIS MODIFICATION, SO THAT YOU CAN RESTORE THEM IF NECESSARY. ***

In /forums/includes/cron/vbgooglemapme_cron.php:

Find:
Quote:

while ($get_xml_marker = $vbulletin->db->fetch_array($get_xml_markers))
Immediately ABOVE the text I have quoted, place the following text:

Quote:

This quote has been removed because I failed to consider HTML rendering. See the text here, so that it is properly parsed: link
In the same file, find this:

Quote:

if ($get_xml_marker["pimage"]!='')
{
$pimage = $get_xml_marker["pimage"];
}
else
{
$pimage = $bburl."/images/googlemapme/noimage.png";
}
Immediately BELOW the text that I have quoted, place this:

Quote:

$pimage = parseToXML($pimage);
That should render all entities in the 'pimage' field safe for XML, so it will validate. However, that script is only called when the CRON job is executed... when someone edits their entry online, a different copy of that same script is called (which is really bad form, in my opinion, but hey, I didn't develop this...). That second copy is located at /forums/includes/functions_vbgooglemapme.php. You need to make the exact same changes in that file as I have mentioned above.

Now... I am not claiming that this will solve everyone's issues. It more than likely will not. It will, however, fix problems with 'pimage' being the reason that the XML won't validate. I think that this will probably fix the problems that quite a few of you are happening.

msudawgs64 09-13-2007 06:13 AM

ronseal, awesome find. Thanks for that post, I followed your posts and sure enough I had the same thing going on. I was able to edit both the xml file and then edited that entry in the database and now the pins show again. Thanks, I like the map and really did not want to uninstall it.

Ronseal 09-13-2007 08:35 AM

msudawgs64, It's not all good news I'm afriad!!!!
Although my old pins show any new pins added/edited are not showing even after I run the cron job. So maybe it's time to try GeekDrew's '$pimage = parseToXML($pimage);' fix?

Julrou 09-13-2007 09:04 AM

Quote:

Originally Posted by towermatt (Post 1337837)
All you have to do is browse out to http://www.yoursite.com/forums/markers.xml

It is a file that came with the download for this mod and it should show any errors for links in read. Edit that entry on your map and it may bring the markers back.


Hum, when i go to http://www.informatiquefacile.eu/forums/markers.xml

i got a blank page... :confused:
Did i miss something ?

Ronseal 09-13-2007 09:05 AM

Just got the following error with your fix Geekdrew, any ideas?

Quote:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/my_site/public_html/forum/includes/cron/vbgooglemapme_cron.php on line 39
and line 39 was one of your additions: $xmlStr=str_replace("&",'&amp;',$xmlStr);


All times are GMT. The time now is 11:10 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01782 seconds
  • Memory Usage 1,751KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete