CMS MADE SIMPLE FORGE

AComments

 

[#7835] Warning with not mapped Module-Parameter 'cancelcomment'

avatar
Created By: Bernhard Zürn (zuernbernhard)
Date Submitted: Tue Apr 17 14:56:01 -0400 2012

Assigned To: Andi Petzoldt (andiministrator)
Version: AComments 1.1.1
CMSMS Version: 1.10.3
Severity: Minor
Resolution: Accepted
State: Open
Summary:
Warning with not mapped Module-Parameter 'cancelcomment'
Detailed Description:
If i click on "cancel" (Abbrechen) in the add comment form, i get this warning:

Warning: Parameter cancelcomment is not known by module AComments dropped in
/var/www/datingvergleich/lib/misc.functions.php on line 1590
Call Stack
#	Time	Memory	Function	Location
1	0.0022	838400	{main}( )	../index.php:0
2	0.0799	12739720	Smarty->fetch( )	../index.php:269
3	0.0807	12995872	include(
'/var/www/datingvergleich/tmp/templates_c/%%9F^9F5^9F529885%%tpl_body%3A24.php'
)	../Smarty.class.php:1263
4	0.2340	18162056	smarty_cms_function_content( )
../%%9F^9F5^9F529885%%tpl_body%3A24.php:71
5	0.2343	18211304	CMSModule->DoActionBase( )	../function.content.php:100
6	0.2343	18211672	cleanParamHash( )	../class.CMSModule.php:1612
7	0.2349	18218240	trigger_error ( )	../misc.functions.php:1590
Variables in local scope (#6)

$allow_unknown =

	

boolean false

$clean_keys =

	

boolean true

$data =

	

array
  'returnid' => int 63
'redirecturl' => string
'http://paulut64.local/datingvergleich/datingvergleich/datingvergleich/singleboersen/dating-cafe/'
(length=96)
  'pageid' => string '63' (length=2)
  'modulename' => string '' (length=0)
  'emailfield' => string '' (length=0)
  'websitefield' => string '' (length=0)
  'image' => string '' (length=0)
  'title' => string '' (length=0)
  'author' => string '' (length=0)
  'email' => string '' (length=0)
  'website' => string '' (length=0)
  'content' => string '' (length=0)
  'captcha_phrase' => string '' (length=0)
  'cancelcomment' => string 'Abbrechen' (length=9)

$key =

	

string 'cancelcomment' (length=13)

$map =

	

array
  'assign' => string 'CLEAN_STRING' (length=12)
  'module' => string 'CLEAN_STRING' (length=12)
  'lang' => string 'CLEAN_STRING' (length=12)
  'returnid' => string 'CLEAN_INT' (length=9)
  'action' => string 'CLEAN_STRING' (length=12)
  'showtemplate' => string 'CLEAN_STRING' (length=12)
  'inline' => string 'CLEAN_INT' (length=9)
  'pageid' => string 'CLEAN_INT' (length=9)
  'modulename' => string 'CLEAN_STRING' (length=12)
  'number' => string 'CLEAN_INT' (length=9)
  'dateformat' => string 'CLEAN_STRING' (length=12)
  'localedateformat' => string 'CLEAN_STRING' (length=12)
  'email' => string 'CLEAN_STRING' (length=12)
  'website' => string 'CLEAN_STRING' (length=12)
  'emailfield' => string 'CLEAN_STRING' (length=12)
  'websitefield' => string 'CLEAN_STRING' (length=12)
  'author' => string 'CLEAN_STRING' (length=12)
  'authornotify' => string 'CLEAN_NONE' (length=10)
  'title' => string 'CLEAN_STRING' (length=12)
  'content' => string 'CLEAN_NONE' (length=10)
  'image' => string 'CLEAN_NONE' (length=10)
  'redirecturl' => string 'CLEAN_NONE' (length=10)
  'captcha_phrase' => string 'CLEAN_STRING' (length=12)
  'submitcomment' => string 'CLEAN_NONE' (length=10)

$mapped =

	

boolean false

$mappedcount =

	

int 13

$mk =

	

string 'submitcomment' (length=13)

$modulename =

	

string 'AComments' (length=9)

$mv =

	

string 'CLEAN_NONE' (length=10)

$paramtype =

	

string '' (length=0)

$result =

	

array
  'returnid' => int 63
'redirecturl' => string
'http://paulut64.local/datingvergleich/datingvergleich/datingvergleich/singleboersen/dating-cafe/'
(length=96)
  'pageid' => int 63
  'modulename' => string '' (length=0)
  'emailfield' => string '' (length=0)
  'websitefield' => string '' (length=0)
  'image' => string '' (length=0)
  'title' => string '' (length=0)
  'author' => string '' (length=0)
  'email' => string '' (length=0)
  'website' => string '' (length=0)
  'content' => string '' (length=0)
  'captcha_phrase' => string '' (length=0)

$ss =

	Undefined

$value =

	

string 'Abbrechen' (length=9)


History

Comments
avatar
Date: 2012-04-17 14:57
Posted By: Bernhard Zürn (zuernbernhard)

The Warning can be solved by editing the Method SetParameters in
AComments.module.php  so that the parameter is known:

/**
	* Set parameters for this module.
	* @return string
	*/
	function SetParameters() {

		$this->RegisterModulePlugin();
		#$this->RegisterEvents();

		$this->RestrictUnknownParams();
		#$this->RegisterRoute('/[sS]itemap.xml\/(?P<mode>[0-9]+)$/');

		// Module params
		// $this->CreateParameter('paramName','defaultValue','HelpDescription');
		$this->CreateParameter('dateformat', '', $this->lang('helpdateformat'));
$this->CreateParameter('localedateformat', '',
$this->lang('helplocaledateformat'));
		$this->CreateParameter('number', '5', $this->lang('helpnumber'));
		$this->CreateParameter('modulename', '', $this->lang('modulename'));
		$this->CreateParameter('websitefield', '', $this->lang('websitefield'));
		$this->CreateParameter('emailfield', '', $this->lang('emailfield'));
		$this->CreateParameter('pageid', '0', $this->lang('pageid'));
		$this->CreateParameter('returnid', '0', $this->lang('returnid'));
		$this->CreateParameter('submitcomment', '1', $this->lang('submitcomment'));
$this->CreateParameter('cancelcomment', '',
$this->lang('cancelcomment'));

		// Form params
		// $this->SetParameterType('paramName',CLEAN_TYPE);
// CLEAN_TYPE could be CLEAN_NONE / CLEAN_STRING / CLEAN_INT / CLEAN_FLOAT /
CLEAN_FILE
		$this->SetParameterType('pageid',CLEAN_INT);
		$this->SetParameterType('returnid',CLEAN_INT);
		$this->SetParameterType('modulename',CLEAN_STRING);
		$this->SetParameterType('number',CLEAN_INT);
		$this->SetParameterType('dateformat',CLEAN_STRING);
		$this->SetParameterType('localedateformat',CLEAN_STRING);
		$this->SetParameterType('email', CLEAN_STRING);
		$this->SetParameterType('website', CLEAN_STRING);
		$this->SetParameterType('emailfield', CLEAN_STRING);
		$this->SetParameterType('websitefield', CLEAN_STRING);
		$this->SetParameterType('author', CLEAN_STRING);
		$this->SetParameterType('authornotify', CLEAN_NONE);
		$this->SetParameterType('title', CLEAN_STRING);
		$this->SetParameterType('content', CLEAN_NONE);
		$this->SetParameterType('image', CLEAN_NONE);
		$this->SetParameterType('redirecturl',CLEAN_NONE);
		$this->SetParameterType('captcha_phrase',CLEAN_STRING);
		$this->SetParameterType('submitcomment',CLEAN_NONE);
        $this->SetParameterType('cancelcomment',CLEAN_STRING);
	}
      
Updates

Updated: 2012-04-18 12:32
resolution_id: 5 => 6

Updated: 2012-04-17 14:57
resolution_id: => 5