Bug: Map Plugin not working in 2.5.0 Stable

Phoca Maps - displaying maps in Joomla! CMS
leolam
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 02 Jun 2011, 09:41

Bug: Map Plugin not working in 2.5.0 Stable

Post by leolam »

The Maps Plugin throws a fatal error as I have send you per email (to which you have not replied). The plugin is not compatible on Joomla 2.5.0 Stable as released last night as proven on dozens of sites

The plugin throws a fatal error which gives a white screen:
[24-Jan-2012 23:59:44] PHP Fatal error: Call to a member function get() on a non-object in /home/besdev11/public_html/chelsea/plugins/content/phocamaps/phocamaps.php on line 139
Disabling the plugin resolves the issue

Please attend to this bug urgently? We have 12 sites in trouble because of this?

Leo Lammerink
MD GWS-Group
http://gws-desk.com
SonRiab
Phoca Professional
Phoca Professional
Posts: 258
Joined: 02 Jun 2011, 09:29
Contact:

Re: Bug: Map Plugin not working in 2.5.0 Stable

Post by SonRiab »

Hmm, I could not understand why everybody is upgrading Joomla without checking if anything works correctly before. This is essential as backing up the site and should be communicated even to clients.
leolam
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 02 Jun 2011, 09:41

Re: Bug: Map Plugin not working in 2.5.0 Stable

Post by leolam »

SonRiab wrote:Hmm, I could not understand why everybody is upgrading Joomla without checking if anything works correctly before. This is essential as backing up the site and should be communicated even to clients.
Very smart reply. I am impressed! Do not judge without knowing what we do or don't.

I do not blame anybody but ask Jan to resolve an issue with his plugin......If you can resolve it do so and otherwise refrain from off-track conclusions?

Cheers
Leo L
(Aka leolam with 10.550 support assists on the Joomla forum)
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Bug: Map Plugin not working in 2.5.0 Stable

Post by Jan »

Hi, testing now and working OK. :idea:

On the line described here, there is standard parameter variable without any specific settings, so really no idea why this should not work :-( :idea:

Jan
If you find Phoca extensions useful, please support the project
leolam
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 02 Jun 2011, 09:41

Re: Bug: Map Plugin not working in 2.5.0 Stable

Post by leolam »

That is cool since it does not work when setting back the P-parameter from C. When setting t C the map shows not and setting to P as you want it to be it does not show
leolam
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 02 Jun 2011, 09:41

Re: Bug: Map Plugin not working in 2.5.0 Stable

Post by leolam »

Jan,
You were using pre-Joomla 1.7 code conventions (no offense). You should have used from an instance (Jparameter) to a property i.e $this->params. You are missing that in your code. We have added on line 57 the following code:
"$paramsP = $this->params;"

the block reads now: (line 57-62)

Code: Select all

//modified by Al for GWS-Desk
            $paramsP        = $this->params;
            require_once( JPATH_ROOT.DS.'components'.DS.'com_phocamaps'.DS.'helpers'.DS.'route.php' );
            require_once( JPATH_ADMINISTRATOR.DS.'components'.DS.'com_phocamaps'.DS.'helpers'.DS.'phocamapspath.php' );
            require_once( JPATH_ADMINISTRATOR.DS.'components'.DS.'com_phocamaps'.DS.'helpers'.DS.'phocamaps.php' );
            require_once( JPATH_ADMINISTRATOR.DS.'components'.DS.'com_phocamaps'.DS.'helpers'.DS.'phocamapsmap.php' );
this is logical since you can clearly see that it is a property from the parent class:
abstract class JPlugin extends JEvent
{
/**
* A JRegistry object holding the parameters for the plugin
*
* @var A JRegistry object
* @since 11.1
*/
public $params = null;
Adding the code on Line 57 resolves this for the plugin on Joomla 2.5. You might want to release a new version of the plugin therefor

Leo
Ayamonte1
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 26 Jan 2012, 20:08

Re: Bug: Map Plugin not working in 2.5.0 Stable

Post by Ayamonte1 »

Hi Leo,
Can you tell me where I have to enter the code you just published as i am having the same problem.
Thanks in advance
leolam
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 02 Jun 2011, 09:41

Re: Bug: Map Plugin not working in 2.5.0 Stable

Post by leolam »

You can download the revised Plugin for Joomla 2.5.0 from our site: http://gws-desk.com/joomla/phocamaps_rev1.zip

Just install over the old one and all resolved

Leo 8)
Ayamonte1
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 26 Jan 2012, 20:08

Re: Bug: Map Plugin not working in 2.5.0 Stable

Post by Ayamonte1 »

Thanks for the File Leo,
Only one problem the text that says address and get route has changed, see here
http://flanagansgastropub.com/#rt-mainbody-panel
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Bug: Map Plugin not working in 2.5.0 Stable

Post by Jan »

Hi, I need to do more investigation there, still don't understand why you don't get the parameter "params" on your site:

Joomla.Platform 11.1, JHtmlContent):

Code: Select all

$dispatcher->trigger('onContentPrepare', array($context, &$article, &$params, 0));
==>

(for example all content output in 2.5:

Code: Select all

$results = $dispatcher->trigger('onContentPrepare', array ('com_content.article', &$item, &$this->params, $offset));
)

==>

Code: Select all

public function onContentPrepare($context, &$article, &$params, $page = 0) {
:idea:

Jan
If you find Phoca extensions useful, please support the project
Post Reply