Page 1 of 2
Bug: Map Plugin not working in 2.5.0 Stable
Posted: 25 Jan 2012, 16:01
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
Re: Bug: Map Plugin not working in 2.5.0 Stable
Posted: 25 Jan 2012, 17:58
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.
Re: Bug: Map Plugin not working in 2.5.0 Stable
Posted: 25 Jan 2012, 19:30
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)
Re: Bug: Map Plugin not working in 2.5.0 Stable
Posted: 26 Jan 2012, 01:16
by Jan
Hi, testing now and working OK.
On the line described here, there is standard parameter variable without any specific settings, so really no idea why this should not work
Jan
Re: Bug: Map Plugin not working in 2.5.0 Stable
Posted: 26 Jan 2012, 03:53
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
Re: Bug: Map Plugin not working in 2.5.0 Stable
Posted: 26 Jan 2012, 10:58
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
Re: Bug: Map Plugin not working in 2.5.0 Stable
Posted: 26 Jan 2012, 20:11
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
Re: Bug: Map Plugin not working in 2.5.0 Stable
Posted: 26 Jan 2012, 20:27
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
Re: Bug: Map Plugin not working in 2.5.0 Stable
Posted: 27 Jan 2012, 20:54
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
Re: Bug: Map Plugin not working in 2.5.0 Stable
Posted: 30 Jan 2012, 22:36
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) {
Jan