Page 1 of 1

Error in Plugin GeoTag?

Posted: Tue Sep 05, 2006 11:31 am
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.

Re: Error in Plugin GeoTag?

Posted: Tue Sep 05, 2006 11:57 am
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

Posted: Tue Sep 05, 2006 12:16 pm
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....

Posted: Tue Sep 05, 2006 12:24 pm
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

Posted: Tue Sep 05, 2006 1:38 pm
by Kneipenfuehrer
Ok, forget it!

I deinstalled the plugin and removed the directories. After new reinstallation everything seems ok.

Posted: Wed Sep 06, 2006 9:11 am
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.

Posted: Wed Sep 06, 2006 9:26 am
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

Posted: Mon Sep 11, 2006 6:02 pm
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!!

Posted: Mon Oct 09, 2006 8:45 am
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.

Posted: Mon Oct 09, 2006 12:49 pm
by garvinhicking
Hi!

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

Regards,
Garvin