Fatal error: in plg Maps 2.0.0

Phoca Maps - displaying maps in Joomla! CMS
marcobro
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 18 Jan 2011, 15:44

Fatal error: in plg Maps 2.0.0

Post by marcobro »

I have just installed the plugin Maps 2.0.0. on Joomla 1.6.0 and have the following error:

Fatal error: Using $this when not in object context in /var/www/vhosts/websitename.com/subdomains/subname/httpdocs/libraries/joomla/plugin/plugin.php on line 102

Please let me know what to do, because the site is now offline. Thanks
jorloji
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 19 Jan 2011, 23:46
Contact:

Re: Fatal error: in plg Maps 2.0.0

Post by jorloji »

I had the same problem. I had to disable the plugin to access the site.
If you try to disable it in the plugin manager, it doesn't work (you get the same error). But you can select the "Phoca Map Plugin" and Edit it. In the new window you can disable it.

It doesn't correct the error, but allow you to put the site online again (without the pluggin active).

Saludos, Jorge.
josenorbey
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 23 Jan 2011, 00:21

Re: Fatal error: in plg Maps 2.0.0

Post by josenorbey »

I have the same problem:

I have just installed the plugin Maps 2.0.0. on Joomla 1.6.0 and have the following error:

Fatal error: Using $this when not in object context in /var/www/vhosts/websitename.com/subdomains/subname/httpdocs/libraries/joomla/plugin/plugin.php on line 102

Please let me know what to do.
christoph.gasser
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 23 Jan 2011, 14:44

Re: Fatal error: in plg Maps 2.0.0

Post by christoph.gasser »

Same for me. Got the same error and don't know what to do.

BR
C
janik.otto
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 01 Feb 2011, 11:32

Re: Fatal error: in plg Maps 2.0.0

Post by janik.otto »

I just installed Joomla 1.6 and tested some extensions... The Maps Component is working fine, but the plugin seems to have some Problems:

Fatal error: Using $this when not in object context in [...] /joomla/plugin/plugin.php on line 102

Would be nice to get some information about this error.

[EDIT]
Okay, this seems to be a language-problem... will try some things.
d2developmentfund
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 02 Feb 2011, 21:49

Re: Fatal error: in plg Maps 2.0.0

Post by d2developmentfund »

I think it's a language problem too, the English bit of my website has no problems but the spanish one is showing errors.

I think this post is relevant, though I have not been able to replicate the solution to fix the issue:

viewtopic.php?f=38&t=12291
d2developmentfund
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 02 Feb 2011, 21:49

Re: Fatal error: in plg Maps 2.0.0

Post by d2developmentfund »

I've figured it out I believe--the plugin fields in the new version are different from those in the old version. So the field names in the language plugin files must be changed.

The new field names are contained in en-GB.plg_content_phocamaps.ini.

Example of modified fields in Spanish file:


PLG_PHOCAMAPS_DISPLAY_MAP_DESCRIPTION_LABEL="Mostrar descripcción del mapa"
PLG_PHOCAMAPS_DISPLAY_MAP_DESCRIPTION_DESC="Parametrizar si se mostrará la descripción del mapa en el plugin"
PLG_PHOCAMAPS_NO="No"
PLG_PHOCAMAPS_YES="Si"
PLG_PHOCAMAPS_DETAIL_WINDOW_LABEL="Ventana de detalles"
PLG_PHOCAMAPS_DETAIL_WINDOW_DESC="Fijar los detalles de la ventana"
PLG_PHOCAMAPS_MODAL_BOX="Caja modal"
PLG_PHOCAMAPS_STANDARD_POPUP_WINDOW="Ventana emergente estandar"
PLG_PHOCAMAPS_MODAL_BOX_OVERLAY_COLOR_LABEL="Color superpuesto de la caja"
PLG_PHOCAMAPS_MODAL_BOX_OVERLAY_COLOR DESC="Fijar el color superpuesto de la caja"
PLG_PHOCAMAPS_MODAL_BOX_OVERLAY_OPACITY_LABEL="Opacidad de la caja superpuesta"
PLG_PHOCAMAPS_MODAL_BOX_OVERLAY_OPACITY DESC="Fijar la opacidad de la caja superpuesta"
PLG_PHOCAMAPS_MODAL_BOX_BORDER_COLOR_LABEL="Color del borde de la caja"
PLG_PHOCAMAPS_MODAL_BOX_BORDER_COLOR_DESC="Fijar el color del borde de la caja"
PLG_PHOCAMAPS_MODAL_BOX_BORDER_WIDTH_LABEL="Ancho del borde de la caja"
PLG_PHOCAMAPS_MODAL_BOX BORDER_WIDTH_DESC="Fijar ancho del borde de la caja"
PLG_PHOCAMAPS_PLUGIN_REQUIRE_COMPONENT="El plugin requiere el componente Phoca Maps"
PLG_PHOCAMAPS_PLUGIN_ERROR="Error del plugin"
PLG_PHOCAMAPS_MAP_NOT_EXISTS="El mapa no existe o no está publicado"
COM_PHOCAMAPS_GOOGLE_MAPS_ERROR_FRONT="Error en Google Maps - Verificar latitud y longitud en la configuración de los mapas"
PLG_PHOCAMAPS_LINK_TO_MAP="Link hacia el Mapa"
PLG_PHOCAMAPS_TO="Hacia"
PLG_PHOCAMAPS_FROM_ADDRESS="Desde (dirección)"
PLG_PHOCAMAPS_GET_ROUTE="Trazar Ruta"
PLG_PHOCAMAPS_GPS="GPS"
d2developmentfund
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 02 Feb 2011, 21:49

Re: Fatal error: in plg Maps 2.0.0

Post by d2developmentfund »

I had this working on my local machine, but I can't get it to work on live site! Same error. Any other thoughts?
d2developmentfund
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 02 Feb 2011, 21:49

Re: Fatal error: in plg Maps 2.0.0

Post by d2developmentfund »

I figured it out again, the configuration files must be saved as UTF-8, not ANSI.
dserre06
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 13 Feb 2011, 20:55

Re: Fatal error: in plg Maps 2.0.0

Post by dserre06 »

Hi,

I had also the same problem.

Yes is it related with language settings.
The plugin works well when no language setting is selected.

Looking at the plugin code (plugin/content/phocamap/phocamap.php) you can see that the JPlugin:loadlanguage function is called at the begining of the file. The problem is that at this moment the plugin object is not yet created, producing the php error.

Solution:
When disabling this line, the page is displayed correctly.

I don't know where to place the call to the fonction Plugin:loadlanguage in the plugin code.
Post Reply