• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Front End to edit items
PostPosted: Sat May 06, 2017 1:01 am 
Offline
Forum Members
Forum Members
User avatar

Joined: Thu Mar 24, 2011 12:37 am
Posts: 83
Hi Guys, i'm kind of stuck.
I created a module following the Holidays tutorial but i'm trying to have both admins and FEU edit the items.

Everything works well in the admin section but FEU submission returns errors.

It looks like the form is submitting elsewhere and can't find the parameters.
The url goes back to the original url (without variables) and here is the following error:

Warning: Parameter starting_price is not known by module BTG_AdmissionConsulting dropped in /home/xxxxx..../lib/classes/class.CMSModule.php on line 653

Thanks for the help


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Front End to edit items
PostPosted: Sat May 06, 2017 11:14 am 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Mon Jan 29, 2007 4:47 pm
Posts: 1737
magallo wrote:
It looks like the form is submitting elsewhere and can't find the parameters.
The url goes back to the original url (without variables) and here is the following error:

Warning: Parameter starting_price is not known by module BTG_AdmissionConsulting dropped in /home/xxxxx..../lib/classes/class.CMSModule.php on line 653

Check: http://www.cmsmadesimple.org/APIDOC2_0/ ... odule.html
For security reasons there is a mechanism implemented in the CMSModule API to prevent unknown parameters to be accidentally handled by the modules: http://www.cmsmadesimple.org/APIDOC2_0/ ... nownParams
Code:
RestrictUnknownParams(bool $flag = true)
This call makes sure the module drops any parameter not registered by
Code:
SetParameterType(string $param, \define $type)

See: http://www.cmsmadesimple.org/APIDOC2_0/ ... ameterType
If you look at the method InitializeFrontend() of the module you'll probably see some parameters already initialized and the $this->RestrictUnknownParams(); already called...

So you'll have to use $this->SetParameterType(...) for each frontend parameter you want your module to handle.

_________________
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).


Code of Conduit | CMSMS Docs
Help Support CMSMS
My developer Page on the Forge | Yet another blog about CMSMS

GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!



Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Front End to edit items
PostPosted: Tue May 09, 2017 3:30 am 
Offline
Forum Members
Forum Members
User avatar

Joined: Thu Mar 24, 2011 12:37 am
Posts: 83
Jo Morg wrote:
So you'll have to use $this->SetParameterType(...) for each frontend parameter you want your module to handle.


thanks @Jo Morg, that's exactly what I needed. I manually added all the parameters posted from the form including submit and cancel.

I also implemented the pretty url settings as described in the guide.
I'm now facing some Upload file challenges, but will dig the form for some more info as I think I saw it somewhere.

Thanks again,.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
A2 Hosting