Error in Plugin GeoTag?

Found a bug? Tell us!!
Post Reply
Kneipenfuehrer
Regular
Posts: 9
Joined: Tue Sep 05, 2006 11:24 am
Contact:

Error in Plugin GeoTag?

Post by Kneipenfuehrer »

After installation (and remove) of the GeoTag Plugin, the following error occurs:
Parse error: parse error, unexpected $ in /www/XXXXXXX/htdocs/blog/plugins/serendipity_event_geotag/serendipity_plugin_geotag.php on line 217
Fehler: serendipity_plugin_geotag

Funny thing about is, althoug GeoTag is an event_plugin, the error message occurs only if I search the sidebar_plugins.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Error in Plugin GeoTag?

Post by garvinhicking »

Hi!

The geotag plugin consists of both a sidebar and an event file; as you can see, the sidebar file is also the one that is being thrown with errors.

Can you check if you have the latest version of that plugin? The one in spartacus has no parse errors. Maybe download the ZIP from spartacus.s9y.org and see if the files match?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Kneipenfuehrer
Regular
Posts: 9
Joined: Tue Sep 05, 2006 11:24 am
Contact:

Post by Kneipenfuehrer »

Hmm... both are the current versions - I thought.
geo_tag from the events plugins is version 1.14, the "Geotag Google Map" is version 0.2.

Up to now I thought I won't need the sidebar_plugin as I only wanted to geotag my entries and won't show them on a google map...

Or did I understand here something wrong?

Other sidebar plugins concerning geotags are not on my list of available plugins....
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

That's true, you don't need the geotag sidebar plugin in that case.

It's not in the list of available plugins, because the sidebar plugin part seems to contain an error in your case. Please do not just compare version numbers, please compare the full files!

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Kneipenfuehrer
Regular
Posts: 9
Joined: Tue Sep 05, 2006 11:24 am
Contact:

Post by Kneipenfuehrer »

Ok, forget it!

I deinstalled the plugin and removed the directories. After new reinstallation everything seems ok.
Kneipenfuehrer
Regular
Posts: 9
Joined: Tue Sep 05, 2006 11:24 am
Contact:

Post by Kneipenfuehrer »

Shit! Same problem again. Seems as if it takes a few minutes if the error occours. Perhaps if the smarty caches are refreshed.

Maybe something that may cause the error:

When I look at the cvs-tree:
in serendipity_event_geotag/serendipity_plugin_geotag.php
at line 212 there is a php open-Tag in short form "<?" - perhaps it should changed to the long form "<?php".
I don't understand it completly, but I don't know what the last php code (lines 212-216 will do. At least the closing php tag is missing "?>".

In file serendipity_event_geotag/serendipity_event_geotag.php
the closing php-Tag "?>" at the last line is missing too.

IMHO.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

I changed those Short-tags in CVS as well, thanks for the pointer!

But closing ?> PHP tags are optional, so they can'T cause the error. Short tages might, though!

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Kneipenfuehrer
Regular
Posts: 9
Joined: Tue Sep 05, 2006 11:24 am
Contact:

Post by Kneipenfuehrer »

Sorry for the delay, I was just a few days away.

Now I tested it and it works fine. Now it looks like it should look like :D

Thanks Garvin!!
Kneipenfuehrer
Regular
Posts: 9
Joined: Tue Sep 05, 2006 11:24 am
Contact:

Post by Kneipenfuehrer »

Ok, some error again:

The title of the article isn't escaped. So if there is an ampersand (&) the generated google-maps URL is defective.
Either the "bad" charakters should be stripped or - if possible - escaped.

I think line 263 in the file additional_plugins/serendipity_event_geotag/serendipity_event_geotag.php

Code: Select all

$link = str_replace("%TITLE%", $eventData[$i]["title"], $link);
should be the incorrect line.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Great, thanks a lot! I added a urlencode() for escaping the characters in versio n1.16 of the plugin.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply