Undefined property: LinkablesController::$Text
hi, i wanna use striplinks from Text helper but cake gives me this error Notice (8): Undefined property: LinksController::$Text [APP\controllers \links_controller.php, line 1480] Fatal error: Call to a member function stripLinks() on a non-object in blabla on line 1480 CODE in my controller - I used it in a function: $input_desc = $this-Text-stripLinks($_POST['data']); and declared the helper var $helpers = array('Login', 'Html', 'Form', 'Ajax', 'Js', 'Text', 'Mailto', 'Time'); -- I am using Mailto e.g. the same way and I dont get that error. I have a feeling I should know this one lol. appreciate it ;) thank you! -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Undefined property: LinksController::$Text
hi, i wanna use striplinks from Text helper but cake gives me this error Notice (8): Undefined property: LinksController::$Text [APP \controllers \links_controller.php, line 1480] Fatal error: Call to a member function stripLinks() on a non-object in blabla on line 1480 CODE in my controller - I used it in a function: $input_desc = $this-Text-stripLinks($_POST['data']); and declared the helper var $helpers = array('Login', 'Html', 'Form', 'Ajax', 'Js', 'Text', 'Mailto', 'Time'); -- I am using Mailto e.g. the same way and I dont get that error. I have a feeling I should know this one lol. appreciate it ;) thank you! -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Is session variable a good place to store authorization info?
By saving into the session it means that you would not need to call the method that sets the values on each page load, as the data is save between page loads. If you need to call the method to check the values are updated on each page load then perhaps it might be better to save them as a controller property use Controller::set to pass them to the view, if needed there as well? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Calling a plugins controller from within the main applications controller
I am trying to construct an application from various plugins. I would like to call a particular function that resides within a plugin from a main application controller. My plugin controller looks like this: ?php class PluginexampleAppController extends AppController { public function blaablaaBingBing(){ return unite the factions; } } ? My application controller looks like this (I am calling it from within the index just to get the concept working): ?php App::uses('AppController', 'Controller'); App::import('Controller', 'Pluginexample'); class PeopleController extends AppController { public function index() { $Example = new PluginexampleAppController(); $Example-constructClasses(); $returnedValue = $Example-blaablaaBingBing(); debug($returnedValue); $this-Person-recursive = 0; $this-set('people', $this-paginate()); } I have included CakePlugin::loadAll(); in my bootstrap.php And I am getting this error: //Fatal error: Class 'PluginexampleAppController' not found in /home/gardiner/projectsPHP/ farmersBarn/app/Controller/PeopleController.php on line 20// In an effort to get the People controller to call a function in the Pluginexample controller I sourced the following questions: 1. Am I loading the plugin controller correctly? 2. Am I calling the plugin controllers function correctly? 3. I have tried to use the request action, it also gives me an error - is there a better way to call the plugins controller function? Thank you in advance for your input and help with this problem. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Change model alias when using plugin models
Hi, Let's say I am using a plugin called MyPlugin that provides a model called MyPluginCoolModel. If I want to attach that model to a controller I have to use the $uses property: public $uses = array('MyPlugin.MyPluginCoolModel'); Then I can access the model with $this-MyPluginCoolModel. What if I wanted to change the alias and use $this-CoolModel instead of MyPluginCoolModelin my controllers? Is this possible with the actual class construction process in CakePHP controllers? Thanks!! -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
optional routing elements
Hi, I'm reading the routing docs here: http://book.cakephp.org/2.0/en/development/routing.html Basically what it says is that the following route config: Router::connect('/foo/bar/:year/:month/:day', array('controller' = 'foo', 'action' = 'bar', 'day' = null)); would treat the last element as optional, and would therefore also match this URL: /foo/bar/1/2 yet it doesn't. It does match /foo/bar/1/2/3 CakePHP 2.1.2 -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Calling a plugins controller from within the main applications controller
1. Am I loading the plugin controller correctly? No. App::uses('PluginexampleAppController', 'Pluginexample.Controller'); 2. Am I calling the plugin controllers function correctly? 3. I have tried to use the request action, it also gives me an error - is there a better way to call the plugins controller function? You should have much better reason to create instance of plugin's AppController. You can not use requestAction(), because plugin's AppController couldn't be target of route. Create component in your plugin http://book.cakephp.org/2.0/en/controllers/components.html and then class PeopleController extends AppController { public $components = array('Pluginexample.Factions'); public function index() { $returnedValue = $this-Factions-unite(); -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Can't call Auth component from controller
I wrote an Auth Component. It gets a bunch of permission information about the current user. How can I pass this information back to the controller? In AppContoller.php nbsp;nbsp;nbsp; public $components = array( nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; 'Auth' =gt; array( nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; 'loginRedirect' =gt; array('controller' =gt; 'users', 'action' =gt; 'index'), nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; 'logoutRedirect' =gt; array('controller' =gt; 'users', 'action' =gt; 'index'), nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; 'authError' =gt; You can't access that page, nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; 'authorize' =gt; array('Org','Controller')nbsp; nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; ), nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; 'Session' nbsp;nbsp;nbsp; );nbsp;nbsp;nbsp; Everything is working, but I can't call any functions in my nbsp;nbsp; Controller/Component/Auth/OrgAuthorize.php like... nbsp; nbsp;nbsp; $this-gt;Auth-gt;Org-gt;check(); I get Fatal error: Call to a member function getPerms() on a non-object How can I get this to work?nbsp; I don't want to replace the current Auth Component with myAuth. Thanks, bill -- View this message in context: http://cakephp.1045679.n5.nabble.com/Can-t-call-Auth-component-from-controller-tp5707908.html Sent from the CakePHP mailing list archive at Nabble.com. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Login / idle timeout
Is a user's login controlled by session timeout? What is the default session timeout if not set in configuration? In my testing, a user logins, and things work for several hours, but even if active, the account seems to timeout and I have to login. Is this normal? So this is not an 'idle timeout' This is just timeout after XXX minutes. If so, how do you update this based on activity, and make this an idle timeout? Thanks, bill -- View this message in context: http://cakephp.1045679.n5.nabble.com/Login-idle-timeout-tp5707909.html Sent from the CakePHP mailing list archive at Nabble.com. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Login / idle timeout
Might it be because you are not touching the session after the initial login? Not sure if cake touches the session for you on each page load, to prevent it from expiring? On Monday, 14 May 2012 03:04:10 UTC+1, bs28723 wrote: Is a user's login controlled by session timeout? What is the default session timeout if not set in configuration? In my testing, a user logins, and things work for several hours, but even if active, the account seems to timeout and I have to login. Is this normal? So this is not an 'idle timeout' This is just timeout after XXX minutes. If so, how do you update this based on activity, and make this an idle timeout? Thanks, bill -- View this message in context: Login / idle timeouthttp://cakephp.1045679.n5.nabble.com/Login-idle-timeout-tp5707909.html Sent from the CakePHP mailing list archivehttp://cakephp.1045679.n5.nabble.com/at Nabble.com. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: CakePHP 2.1.2 2.2.0-beta released
Great to see Cake continues to get better. On Monday, 30 April 2012 04:12:50 UTC+1, mark_story wrote: The CakePHP core team is proud to announce the immediate availability of both CakePHP 2.1.2 [1], and 2.2.0-beta [2]. 2.1.2 is a bugfix release for the 2.1.x branch, while 2.2.0-beta is the first release for 2.2.x. ## CakePHP 2.1.2 ## There are a number of bugfixes in 2.1.2, the most notable of those changes is: * `Set::insert()` now overwrites values that were previously string values. * AuthComponent now uses `loginRedirect` as the default redirect location, should the session be empty. * `CakeNumber::format()` now supports multiple bytes for thousands/decimals when using PHP lower than PHP 5.4 * A change to CakeSession was reverted to help solve issues with IE8 and sessions being lost. * Fixed an issue with SQLServer + boolean columns. * `DboSource::buildJoinStatement()` does not add the schema when the table is a subquery. * SessionComponent::id() always returns the sessionid. It will auto-start the session if necessary. * Method checking in Model for `expression()` and `calculate()` is only done when required now. * The testsuite now always uses the `test` datasource. Previously, if you did not include any fixtures and ran tests that required the database, the default connection was used. * URL fragments are no longer urlencoded. This caused issues with client side frameworks like backbone. * The return of L10n::get() consistently returns the language. * HTML escaping for string urls on `css()` and `script()` was fixed. * Warnings from saveAll() with an empty hasMany data set are fixed. * Validation::decimal() accepts values like `10` and `10.0`. * FormHelper::postButton() no longer makes invisible buttons. * The `$_FILES` array is now recursively reformatted. This fixes issues when file inputs are deeply nested. * EmailComponent no longer double encodes addresses containing UTF-8 characters. * `File::create()` no longer juggles umask. This was a workaround for file caching which is no longer needed. ## CakePHP 2.2.0-beta ## Following hot on the heels of 2.1.0, the CakePHP team is proud to announce the beta release for 2.2.0. 2.2.x will be an API compatible release with 2.0.x, and 2.1.x. All of the changes mentioned in the 2.1.2 release, are also be present in 2.2.0-beta. We've decided to skip the standard `-dev` and `-alpha` releases, as we think the new features are relatively stable, and should be generally transparent when upgrading. A quick list of new features added in 2.2.0-beta: ### Timezone support for CakeTime utility * Added Config.timezone param to configure global timezone for the application. * CakeTime functions can now use timezone string or DateTimeZone object for user offsets * The $userOffset parameter has been replaced with $timezone parameter in all relevant functions. * Passing numeric offsets for $timezone parameter is still possible for backwards compatibility. * New methods added: `CakeTime::toServer()` and CakeTime::timezone()` ### Support pagination for complex custom finders Model `findCount()` will now pass `$query['operation'] = 'count'` for more flexibility. In many cases custom finds already return correct counts for pagination, but 'operation' key allows more flexibility to build other queries, or drop joins which are required for the custom finder itself. As the pagination of custom find methods never worked quite well it required workarounds for this in the model level, which are now no longer needed ### ACL methods now part of Permission model Now the Permission model has available all methods exposed in the AclComponent for easier permissions check in the model layer. ### New Hash class A new utility library `Hash` was added. It is intended as a replacement for the Set class featuring improved performance, and a more consistent API. All internal calls to Set were replaced and Set has been deprecated and will be removed in the next major version. Also added were Set::expand() and Hash::expand() to convert a plain list of dot separated keys into a nested array. ### Helper Lazy Loading Helpers located in the app folder can now be lazy loaded, there is no need to declare helpers anymore in the `$helpers` controller property if they are located in the app folder and you do not rely on them triggering any callback. ### Redis cache engine A new cache engine was added to interface with a Redis server, which is similar to Memcache ### Cache groups It is now possible to tag or label cache keys under groups. This makes it simpler to mass-delete cache entries associated to the same label. Groups are declared at configuration time when creating the cache engine ### Fatal error console error handlers You can now configure separate error handlers for console and fatal errors. If you leave these configurations undefined
Re: CakePHP 2.1.2 2.2.0-beta released
Great to see Cake continues to get better. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Undefined property: LinksController::$Text
What version of Cake are you using? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php