Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

Fatal Error - Call to undefined method. - Hyphen in Param Name

Fatal Error - Call to undefined method. - Hyphen in Param Name

Hi -
I'm still trying to chase the issue in
http://www.metamodpro.com/forums/topic?id=629#p3085
and would love any suggestions.

Meanwhile, I am hitting the error ...

Code:

Fatal error: Call to undefined method MMIndividualChangeCache::folder() in /home/turn/public_html/modules/mod_metamod/helper.php(539) : eval()'d code on line 2

For the recipe ...

Code:

$changes->mod(32)

   ->folder-folder("slideset2");
return 32;

Where 32 is JA-Flowlist that has a param in the XML:

Code:

<param name="folder-folder" type="text" size="53" default="" label="FROM FOLDER" description="FROM FOLDER DESC" />


Is it the hyphen in the folder parameter's name that's not parsing correctly?

In the database, the params column has an attribute value array of:
type=folder
autoresize=1
folder-folder=slideset1
fo...

Any way around this? 
Thanks.

Edited By: Duke
08-May-11 19:41:12

Duke
Beginner Modder
ranks
useravatar
Offline
18 Posts
Administrator has disabled public posting

Re: Fatal Error - Call to undefined method. - Hyphen in Param Name

Tried hacking this by:
1 - editing the module's XML line above to remove the hyphen ...
<param name="folderfolder" type="text" size="53" default="" label="FROM FOLDER" description="FROM FOLDER DESC" />

2 - editing the params in the database so they read ...
type=folder
autoresize=1
folderfolder=slideset1
fo...

3 - editing the module's helper.php to read ...
$folder = trim( $params->get( 'folderfolder' ));

These were the only two instances where a full text search of the modules folder located "folder-folder".

After editing, the module worked - images from slideset1 display.

Re-enabling the recipe:

Code:

$changes->mod(32)

   ->[b]folderfolder[/b]("slideset2");
return 32;

produced the error:
Call to undefined method MMIndividualChangeCache::folderfolder()

On the other hand, this recipe works:

Code:

$changes->mod(32)

   ->title("slideset2");
return 32;

which suggests everything is installed correctly - narrows down the issue to just "right-side" parameters.

Any ideas?

Duke
Beginner Modder
ranks
useravatar
Offline
18 Posts
Administrator has disabled public posting

Re: Fatal Error - Call to undefined method. - Hyphen in Param Name

Hi Duke,

if you want to set the parameters for arbitrary parameters in a module, you need to use this syntax:

$changes->mod(32)->setParam("paramname", "value");

There are some special cases like enable(), disable() and title() that you can call directly, but for any other parameter in the module you have to use the setParam("paramname","value") syntax.

e.g. $changes->mod(32)->setParam("folder-folder","slideset2");


Cheers,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3312 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1666
Total Polls:
6
Total Posts:
5909
Dormant:
User Info:
 
Total Users:
10093
Newest User:
lamanaudio
Members Online:
0
Guests Online:
256

Online: 
There are no members online

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked