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

Do something cool with CMS? Show us ...
This board is for 'Answers', and the discussion of answers... Not for questions.
vilkis

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

Post 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.
Last edited by vilkis on Tue Jun 23, 2009 8:11 pm, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

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

Post 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...
vilkis

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

Post by vilkis »

So? Do you recommend to not post such information in this forum?


Vilkis
vilkis

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

Post 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
tyman00
Power Poster
Power Poster
Posts: 906
Joined: Tue Oct 24, 2006 5:59 pm

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

Post by tyman00 »

It is part of 1.6, you should be able to test it once it is released to the public.
If all else fails, use a bigger hammer.
M@rtijn wrote: This is a community. This means that we work together and have the same goal (a beautiful CMS), not that we try to put people down and make their (voluntary) job as difficult as can be.
vilkis

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

Post by vilkis »

Thank you.

Vilkis

PS I can not understand such an "open" policy of the open source community.
tyman00
Power Poster
Power Poster
Posts: 906
Joined: Tue Oct 24, 2006 5:59 pm

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

Post 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.
If all else fails, use a bigger hammer.
M@rtijn wrote: This is a community. This means that we work together and have the same goal (a beautiful CMS), not that we try to put people down and make their (voluntary) job as difficult as can be.
vilkis

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

Post by vilkis »

Maybe. The future will show rightness of this way.
Thanks again for explanation.

Vilkis
vilkis

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

Post by vilkis »

It's pity to say, but this problem is not solved in 1.6.0 version of CMSMS.
vilkis
vilkis

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

Post by vilkis »

I attach patches for two files of CMSMS v1.6.0.
vilkis
Attachments

[The extension txt has been deactivated and can no longer be displayed.]

[The extension txt has been deactivated and can no longer be displayed.]

tyman00
Power Poster
Power Poster
Posts: 906
Joined: Tue Oct 24, 2006 5:59 pm

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

Post by tyman00 »

Can you please indicate how it is not working. It was tested ok when patched.
If all else fails, use a bigger hammer.
M@rtijn wrote: This is a community. This means that we work together and have the same goal (a beautiful CMS), not that we try to put people down and make their (voluntary) job as difficult as can be.
vilkis

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

Post 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
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

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

Post 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.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
tyman00
Power Poster
Power Poster
Posts: 906
Joined: Tue Oct 24, 2006 5:59 pm

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

Post 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
If all else fails, use a bigger hammer.
M@rtijn wrote: This is a community. This means that we work together and have the same goal (a beautiful CMS), not that we try to put people down and make their (voluntary) job as difficult as can be.
vilkis

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

Post 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
Locked

Return to “Tips and Tricks”