Page 1 of 3

To avoid "Warning: Parameter x is not known by module y" - CMSMS up to v.1.6.0

Posted: Thu Apr 09, 2009 9:30 pm
by vilkis
See in comments of  http://dev.cmsmadesimple.org/bug/view/3138 how to reproduce the bug.  See the topic http://forum.cmsmadesimple.org/index.ph ... 50024.html for more examples. I treat it as the bug of CMSMS core.

My approach:

place lines in file plugins/function.content.php

Code: Select all

//Vilkis BEGIN
	
			 $smarty->calculate=1;
			$oldvalue = $smarty->caching;
			$smarty->caching = false;
			$result = $smarty->fetch(str_replace(' ', '_', 'content:' . (isset($params['block'])?$params['block']:'content_en')), '', $pageinfo->content_id);
			$smarty->caching = $oldvalue;
			$smarty->calculate=0; 
	//Vilkis END 
after lines

Code: Select all

						$returnid = '';
							if (isset($params['returnid']))
							{
								$returnid = $params['returnid'];
							}
else
{
	$returnid = $pageinfo->content_id;
}
$result = $cmsmodules[$modulename]['object']->DoActionBase($action, $id, $params, $returnid);
if ($result !== FALSE)
{
  echo $result;
}

$modresult = @ob_get_contents();
@ob_end_clean();

AND modify the file lib/module.functions.php :

place a line

Code: Select all

if ($smarty->calculate==1) return;
after lines

Code: Select all

function cms_module_plugin($params,&$smarty)
{
	global $gCms;
	$cmsmodules = &$gCms->modules;

	$id = 'm' . ++$gCms->variables["modulenum"];

I hope it will help somebody.

Vilkis



EDIT: As Mark reminded me.

WARNING Before you make any modification read this topic and make a backup of files.

Re: To avoid "Warning: Parameter x is not known by module y" - CMSMS 1.5.4

Posted: Thu Apr 09, 2009 9:35 pm
by Dr.CSS
You have to understand that if you or anyone else does any hacks to core functions we can't support them, just fyi...

Re: To avoid "Warning: Parameter x is not known by module y" - CMSMS 1.5.4

Posted: Thu Apr 09, 2009 9:40 pm
by vilkis
So? Do you recommend to not post such information in this forum?


Vilkis

Re: To avoid "Warning: Parameter x is not known by module y" - CMSMS 1.5.4

Posted: Mon Apr 27, 2009 10:42 am
by vilkis
Hi,
It seems that this bug was fixed (http://dev.cmsmadesimple.org/bug/view/3138), but I do not know where to get the fix, so I can not to test it.

Vilkis

Re: To avoid "Warning: Parameter x is not known by module y" - CMSMS 1.5.4

Posted: Tue Apr 28, 2009 5:53 pm
by tyman00
It is part of 1.6, you should be able to test it once it is released to the public.

Re: To avoid "Warning: Parameter x is not known by module y" - CMSMS 1.5.4

Posted: Tue Apr 28, 2009 6:03 pm
by vilkis
Thank you.

Vilkis

PS I can not understand such an "open" policy of the open source community.

Re: To avoid "Warning: Parameter x is not known by module y" - CMSMS 1.5.4

Posted: Tue Apr 28, 2009 6:12 pm
by tyman00
I am not sure I understand.

If you are referring to the closed beta, it is explained why they are trying it this way this time. I think it makes sense because public beta cycles have not proven to be very efficient in the past. This way there is better communication and a sense of responsibility so the testing is actually completed properly.

Re: To avoid "Warning: Parameter x is not known by module y" - CMSMS 1.5.4

Posted: Tue Apr 28, 2009 6:37 pm
by vilkis
Maybe. The future will show rightness of this way.
Thanks again for explanation.

Vilkis

Re: To avoid "Warning: Parameter x is not known by module y" - CMSMS 1.5.4

Posted: Tue Jun 23, 2009 6:01 am
by vilkis
It's pity to say, but this problem is not solved in 1.6.0 version of CMSMS.
vilkis

Re: To avoid "Warning: Parameter x is not known by module y" - CMSMS 1.5.4

Posted: Tue Jun 23, 2009 6:35 am
by vilkis
I attach patches for two files of CMSMS v1.6.0.
vilkis

Re: To avoid "Warning: Parameter x is not known by module y" - CMSMS 1.5.4

Posted: Tue Jun 23, 2009 2:28 pm
by tyman00
Can you please indicate how it is not working. It was tested ok when patched.

Re: To avoid "Warning: Parameter x is not known by module y" - CMSMS 1.5.4

Posted: Tue Jun 23, 2009 3:52 pm
by vilkis
Ok, but later. Actually message "Warning: Parameter x is not..." does not appear, now, but modules in content is not counted in right way.
vilkis

Re: To avoid "Warning: Parameter x is not known by module y" - CMSMS 1.5.4

Posted: Tue Jun 23, 2009 4:17 pm
by calguy1000
vilkis wrote: It's pity to say, but this problem is not solved in 1.6.0 version of CMSMS.
vilkis
Three more man hours of testing have proved that this issue is solved in 1.6... by myself, and two other dev team members on seperate installs.

Re: To avoid "Warning: Parameter x is not known by module y" - CMSMS 1.5.4

Posted: Tue Jun 23, 2009 4:18 pm
by tyman00
Can you please provide a link and/or screenshots and/or screencast videos? We are trying to replicate this issue but are not able to replicate it. We are not getting those error messages or behaviors with your past FEU or News/Printing examples. Thanks

Re: To avoid "Warning: Parameter x is not known by module y" - CMSMS 1.5.4

Posted: Tue Jun 23, 2009 4:38 pm
by vilkis
Later. I'm sorry, I am very busy now. Thanks for your efforts. It could be that I am doing something wrong, but I see in code that modules is not counted in content...
vilkis