Re: Form Helper Automatically Inserting the ID of the Node?
This happens when you have $this->data['ModelAlias']['id'] set in your $this->data. If the id is present the helper assumes you're preforming an edit and as such appends the ID to the url as that is the default baked behavior (to receive an ID on edit/delete). To turn this off, make sure to unset $this->data['ModelAlias']['id'] in your controller if you get a fail. Example: function some_action(){ if(!empty($this->data)){ if($this->Model->save($this->data)){ //Hurray, do something like redirect. } else{ /*Boo, we had a validation error, unset the id so the form- >create() doesn't append it to the url, we'll manually add it via a hidden field instead.*/ unset($this->data['Model']['id']); } } } I've had to use this trick many times as I don't like passing IDs in the URL, I prefer to POST them in the data array, but if there is a validation error all of a sudden the form helper wants to "Help" and add the id onto the end of the action url. I hope this helps, Nick On Sep 28, 8:09 am, DragonFlyEye wrote: > Ok, I don't understand this. I'm creating a form which for reasons I > won't go into displays on a page with human-friendly URLs. So, I don't > want to have to use a URL that includes a numeric ID for the database > node I'm working on. I've run into two problems I find exceptionally > odd: > > 1. When creating the action for a form using the "action" element of > the options array, there is no way to specify that the URL should > include the identifier of the node you're working on. It's quite > common to have a url like /stuff/display/thisThing and update the > values for that node. Why does CakePHP not allow us to specify an > action like /display/thisThing? > > 2. Since that doesn't work, I'm using the 'url' element of the options > array. Implicitly, if I'm creating my own URL from whole cloth, I > certainly already know what I want that URL to be. But the Cake form > helper takes it upon itself to prepend the form with ID of the node. > > By way of example: I am creating the form using the following code: > > create(null, array('url' => array('controller' > => > 'charts', > > 'action' => 'display', > > $chart['Chart']['chartid']))); ?> > > On first page load, the output form looks fine: > > > But after hitting the submit button, I get the following: > > > Can anybody tell me why this happens and if there is a way around it? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Re: reporting component
More info please. At least give a link to the bakery article you tried to give us a clue what you're trying to do. Nick On Sep 28, 4:52 am, james wrote: > Are there any up to date reporting components for cake? I tried to add > the one from the bakery but had loads of probelms with it. > > cheers! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Issue getting deeper info
I am trying to get the name of the child Locations from my Domain controller. Here is the domain model: class Domain extends AppModel { var $name = 'Domain'; var $actsAs = array('Tree'); var $displayField = 'name'; var $belongsTo = array( 'ParentDomain' => array( 'className' => 'Domain', 'foreignKey' => 'parent_id' ), 'ConfirmedUser' => array( 'className' => 'User', 'foreignKey' => 'confirmed_id' ), ); var $hasMany = array( 'ChildLocations' => array( 'className' => 'DomainsLocation', 'foreignKey' => 'domain_id' ), 'ChildDomains' => array( 'className' => 'Domain', 'foreignKey' => 'parent_id' ), ); } This is my Location model: class Location extends AppModel { var $name = 'Location'; var $actsAs = array('Tree'); var $displayField = 'name'; var $belongsTo = array( 'ParentLocation' => array( 'className' => 'Location', 'foreignKey' => 'parent_id' ), 'ConfirmedUser' => array( 'className' => 'User', 'foreignKey' => 'confirmed_id' ), ); var $hasMany = array( 'ChildLocation' => array( 'className' => 'Location', 'foreignKey' => 'parent_id' ), 'ParentDomains' => array( 'className' => 'DomainsLocation', 'foreignKey' => 'location_id' ), ); } And this is the Join table for the two: class DomainsLocation extends AppModel { var $name = 'DomainsLocation'; var $belongsTo = array('Domain', 'Location'); } So I am trying to get to the name of the Location that has been assigned to the Domain. This is the find command that I am using in my controller: $domainInfo = $this->Domain->find('first', array( 'conditions'=>array('Domain.id' => $domainId) ) ); This is what I get when I print the results of $domainInfo: Array ( [0] => Array ( [Domain] => Array ( [name] => Prime [parent_id] => [description] => This is the global domain [confirmed_id] => 1 [type] => 0 [modified] => 2010-09-22 15:17:13 [id] => 1 ) [ChildLocations] => Array ( [0] => Array ( [id] => 0 [domain_id] => 1 [location_id] => 2 [created] => 2010-09-28 15:29:33 [modified] => 2010-09-28 15:29:33 ) ) [ChildDomains] => Array ( [0] => Array ( [id] => 6 [parent_id] => 1 [lft] => 2 [rght] => 5 [confirmed_id] => [name] => United Kingdom [type] => 1 [description] => This domain contains all of the United Kingdom. [created] => 2010-09-17 04:21:18 [modified] => 2010-09-22 15:17:13 ) ) [children] => Array ( ) ) ) As you can see, I am getting the location_id but I am not getting the name of that location and I do not want to have to do a separate search for each location. Any idea what I am doing wrong? Thanks. ~Michael Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Re: common value name for all pages
Check for the value in beforeFilter in app_controller...? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 29 Sep 2010, at 01:13, leafchild wrote: > I have to use a value $myvalue for 90% of pages at my site. > > 50% pages has same value (10% of page actually I don't need this value > but since this value is set to layout I have to do something to avoid > showing error ) so I want to set $this->set('myvalue', default) as > default value > but I don't want to set in every controller since there are may. > > Is there any way I can set this value at app_controller.php, > so I don't need to set value to $myvalue at every my controller?? > or is there other way to do it? > > thanks > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > 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?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
common value name for all pages
I have to use a value $myvalue for 90% of pages at my site. 50% pages has same value (10% of page actually I don't need this value but since this value is set to layout I have to do something to avoid showing error ) so I want to set $this->set('myvalue', default) as default value but I don't want to set in every controller since there are may. Is there any way I can set this value at app_controller.php, so I don't need to set value to $myvalue at every my controller?? or is there other way to do it? thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Named parameter issue, or bug in cake
I've got such problem. i have categories controller with 3 methods, index-do nothing, show(id=null), copy id to show.ctp, and last: function badRequest() { $this->cakeError('error404'); } in view file index.ctp i have link to show method: //index.ctp file echo $html->link("Show", array('controller' => 'categories', 'action' => 'show', 'id' => 12, 'bod' => 'zofa')); //end of file i have also coustom routing: //routers.php file Router::connectNamed(array('bod' => '.{4}')); Router::connect('/writings/:id/*', array('controller' => 'categories', 'action' => 'show'), array( 'pass' => array('id'), 'id' => '.{2}' )); Router::connect('/categories',array('controller' => 'categories')); Router::connect('/categories/*',array('controller' => 'categories', 'action' => 'badRequest')); .--end router file And now in my index.ctp. when i click Show link, the browser redirect me to page:http://localhost/kejk-1.3.4-0/writings/12/bod:zofa , and thats ok. When i change the id to 123 in show.ctp file, this cause routing create such link in show link: http://localhost/kejk-1.3.4-0/categories/show/id:123/bod:zofa because the regex 'id'=>'.{2} not match, and when i click it, FF redirect me to method badRequest, and i will se error 404, and thats ok, work fine, Now change id to 12 again in index.ctp file. this will create good link to show link, again:http://localhost/ kejk-1.3.4-0/writings/12/bod:zofa and clicking it redirect to method show, and now change in browser 12 to 123, and there will be error 404 because regex of routing 'id'=>'. {2} will not be matched. (sorry of my english) and thats ok, works fine. And now when i change bod in index.ctp. to zof, cake create link to show like: http://localhost/kejk-1.3.4-0/categories/show/id:12/bod:zof routing not match to writings because zof not match to regex .{4}, and click on it link will cause redirect to method badRequst, and error 404 on screen. and thats ok. but change again bod to zofa, and click in proper link:http:// localhost/kejk-1.3.4-0/writings/12/bod:zofa, page writings is opened And finaly the problem or rather a bug in cakePHP, when I in this good link: http://localhost/kejk-1.3.4-0/writings/12/bod:zofa change zofa to zof in browser, not in show.ctp file, routing will not redirect me to page 404 because the regex fail:Router::connectNamed(array('bod' => '.{4}')); like this has in id situation(changed 12 to 123), but just show normal page with named param bod=>zof is that shoud be or this is a bug. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Issues grabbing $_POST information
Hi All: I'm working on building a REST API for my web service. I'm learning a lot along the way about how API's work and how great CakePHP is to build quick prototypes. My problem comes when i try to make an API call to pull information about a specific UUID. I pass the UUID in a request header on my rest client (tried many of them) but nothing shows in the $_POST variable. I've done a few print_r() calls for that variable in various locations to see what pops up (pre-auth and post-auth) but nothing seems to be passed. Am I looking in the wrong location for information that is passed in the request header? Google searches have returned no results (of course i am going cross- eyed from all this troubleshooting). Thanks in advance. Cheers, David Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Re: htaccess and domain
thanks euromark. Now I know which .htaccess I should edit *It seems like my case is something to do server setting since * *www.mydomain shows a default page server company prepared but linked pages are not working.* * * * * * * * * * * * * On Tue, Sep 28, 2010 at 8:06 PM, euromark wrote: > a) you should redirect the other way around: domain => www.domain > http://www.dereuromark.de/2010/07/13/redirect-root-domain-to-www-subdomain/ > > b) only webroot is relevant. you should therefore connect the apache > to /app/webroot/ (not /app or even worse /) > then you can even delete the other 2 .htaccess > > > On 28 Sep., 03:55, leafchild wrote: > > I set webroot to app/webroot > > Also I edited .htaccess file to redirect user to domain without www > > url, if a user access the site withwww.mydomain, user is redirected > > to > > mydomain.com. > > > > Not sure which .htaccess file I edited but before I set webroot to app/ > > webroot, redirectingwww.mydomainto mydomain > > was working fine but after I set webroot to app/webroot. It seems > > like, .htaccess is not working properly anymore. > > > > I realized that there are couple of .htaccess in cakephp dir. > > - cake dir/.htaccess > > - webroot/.htaccess > > - cake dir/app/.htaccess > > > > Which file I need to edit to set redirect? I edit all of three above > > files but none of it working. > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.comFor > more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Re: can a group act as both an ARO and an ACO?
It doesn't look like what I'm seeking is possible with cake's ACL. Am I wrong? This seems like it should be a common use of ACL: Let's say you work for CRM R Us and have a multi-corporate CRM app: John is a Client Manager who works in Marketing for IBM (usergroup = Manager) Rob is an Artist who works in Marketing for IBM (usergroup = User) Janet is a Parts Manager who works in Parts Warehouse for IBM (usergroup = Manager) Bill is a Client Manager who works in Sales for Coca Cola (usergroup = Manager) Sally is a Client Executive who works in Sales for Coca Cola (usergroup = Manager) Fred is an Executive Travel Assistant who also works in Sales for Coca Cola (usergroup = User) Jennifer works is a Support Technician in IT for CRM R Us (usergroup = Admin) John can create and edit contacts and companies that belong as customers to IBM Rob can only view companies that belong as customers to IBM Janet can view but not edit, only companies and contacts that belong as SUPPLIERS to IBM Bill can create and edit contacts and companies that belong as customers to Coca Cola Sally can also create and edit contacts and companies that belong as customers to Coca Cola Fred can view but not edit contacts and companies that belong as vendors to Coca Cola Jennifer can view but not edit all contacts and companies both suppliers and customers for both IBM and Coca Cola So for ACL to handle this correctly, it would need to support having AROs exist in more than one group (three in this case, Company, Department, and UserGroup) and then it needs support having ACOs exist in more than one group (two in this case: companies and contacts would be categorized under both Company and Department), and then grant access based on examining the permissions for all instances of the ARO. In other words, from the example above: John's user id is found under three separate ARO groups: Company/IBM, Department/Marketing, UserGroup/Manager When pulling up, say, a contact record in the application, in order to determine if John has access, we need to see if the record is also under Company/IBM and Department/Marketing. The final piece of the puzzle then is examining what kind of access UserGroup/Manager has on contact records. >From trying to get ACL working the way I want, it sure doesn't look like it supports something like that. On Sep 28, 2:18 pm, calzone wrote: > So the answer to my first question is that apparently you can't use > actsAs = array('Acl' ...) and define more than one form of 'Acl' -- I > tried every combination of nested arrays I could think of and it never > worked. It looks like I have to choose one (in my case that will be > the ARO table), and then manually update the other (ACO) in the > controller. > > Next up: can I get the groups to work with the departments as AND > permission conditions? If anyone has any insights to share, please > do. > > On Sep 28, 10:14 am, calzone wrote: > > > > > I apologize for asking this before trying. I haven't yet had time to > > get to this and I'm curious if there's a quick answer that will save > > me some time. Otherwise, I will test it out and report back later. > > > Question: > > > A user belongs to one or more departments. > > Projects belong to a department. > > > Any user that belongs to department A should be able to access any > > projects that belong to department A. Conversely, the user should not > > be allowed to access any projects that belong to a department the user > > is not also a part of. I wanted to see if I could define the behavior > > for department to act as both an ACO and an ARO so that it updates the > > ACOs and AROs automatically whenever a department is created or > > updated. > > > *** > > > Bonus points: > > > My ACL is actually more complicated than that. The user belongs to a > > user group as well as a department. The group defines what CRUD > > actions the user can do in absolute terms. For example, admins are > > allowed to create and edit company records, but users can only view > > them. What makes it more complicated is that AMONG those absolute > > permissions, which specific records you are allowed to edit or view > > are filtered by the department criteria above. > > > So the user belongs to one or more departments, and the user belongs > > to a single group. Access is dependent on both department AND group. > > That means in the ARO table, I would see the same user appear under > > two different branches (one branch is for all departments, and the > > other is for all groups). The trouble is that I predict this means ACL > > will see the user in either one OR the other and give much higher > > permission than desired. In short, I'm hoping for an AND link but > > expecting it will only do OR. > > > > > > Super bonus points: > > > My ACL is currently keyed off of just group. I see that ACL queries > > easily outweigh all other queries in terms of time eaten up. I'm > > wondering if, even were I to succeed in
Re: can a group act as both an ARO and an ACO?
So the answer to my first question is that apparently you can't use actsAs = array('Acl' ...) and define more than one form of 'Acl' -- I tried every combination of nested arrays I could think of and it never worked. It looks like I have to choose one (in my case that will be the ARO table), and then manually update the other (ACO) in the controller. Next up: can I get the groups to work with the departments as AND permission conditions? If anyone has any insights to share, please do. On Sep 28, 10:14 am, calzone wrote: > I apologize for asking this before trying. I haven't yet had time to > get to this and I'm curious if there's a quick answer that will save > me some time. Otherwise, I will test it out and report back later. > > Question: > > A user belongs to one or more departments. > Projects belong to a department. > > Any user that belongs to department A should be able to access any > projects that belong to department A. Conversely, the user should not > be allowed to access any projects that belong to a department the user > is not also a part of. I wanted to see if I could define the behavior > for department to act as both an ACO and an ARO so that it updates the > ACOs and AROs automatically whenever a department is created or > updated. > > *** > > Bonus points: > > My ACL is actually more complicated than that. The user belongs to a > user group as well as a department. The group defines what CRUD > actions the user can do in absolute terms. For example, admins are > allowed to create and edit company records, but users can only view > them. What makes it more complicated is that AMONG those absolute > permissions, which specific records you are allowed to edit or view > are filtered by the department criteria above. > > So the user belongs to one or more departments, and the user belongs > to a single group. Access is dependent on both department AND group. > That means in the ARO table, I would see the same user appear under > two different branches (one branch is for all departments, and the > other is for all groups). The trouble is that I predict this means ACL > will see the user in either one OR the other and give much higher > permission than desired. In short, I'm hoping for an AND link but > expecting it will only do OR. > > > > Super bonus points: > > My ACL is currently keyed off of just group. I see that ACL queries > easily outweigh all other queries in terms of time eaten up. I'm > wondering if, even were I to succeed in making my complex ACL tree > above work correctly, would the performance hit make it infeasible? > Should I just hardcode some things instead? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Re: JS helper
for the record: Seems that above function despite having additional class is still bound to the same event executing both open and close. Since I could not find solution to this in reasonable time I've implemented following workaround: $(function() { $('div.Commands a.CmdOpen').click(function(ev) { ev.preventDefault(); var target = $(this).parent('div').next('div.Target'); if ($(this).is('.Active')) { $(this).removeClass('Active'); target.slideUp().html(''); } else { $(this).addClass('Active'); $("#busy-indicator").clone().appendTo(target).show(); $.ajax({ url: $(this).attr('href'), cache: false, success: function(html) { target.slideDown().html(html); }, error: function (XMLHttpRequest, status, errorThrown) { alert('error ...'); } }); } }); }); At present I only experience one problem - indicator is visible only on the first click, following clicks work but do not display busy indicator while awaiting ajax response. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Re: Form Helper Automatically Inserting the ID of the Node?
I've submitted a patch to Lighthouse. Hopefully they adopt it into the core. Meanwhile, I'm using my own patched version http://cakephp.lighthouseapp.com/projects/42648/tickets/1155 On Sep 28, 1:16 pm, DragonFlyEye wrote: > Ok, no one seems interested in biting on this, so I'll just go ahead > and add my own information based on my own research in case someone > else has the same problem: > > Looking at the helper code, it turns out that the array of options is > stitched together with the array_merge() function: > > $actionDefaults = array( > 'plugin' => $this->plugin, > 'controller' => $view->viewPath, > 'action' => $options['action'], > 0 => $id > ); > if (!empty($options['action']) && !isset($options['id'])) { > $options['id'] = $model . > Inflector::camelize($options['action']) . 'Form';} > > $options['action'] = array_merge($actionDefaults, (array) > $options['url']); > > The problem is that, according to the PHP.net website, array_merge() > does not preserve numeric keys, which means that numerically-keyed > array indexes will simply be appended to the end of the array, rather > than overwriting existing values: > > $arr1 = array('one' => 'one', > 'two' => 'two', > 0 => 0, > 1 => 1); > $arr2 = array('one' => 'uno', > 'two' => 'dos', > 0 => 'cero', > 1 => 'uno'); > > $result = array_merge($arr1, $arr2); > ?> > Returns: > Array ( [one] => uno [two] => dos [0] => 0 [1] => 1 [2] => cero [3] => > uno ) > > So the result is that my options array, which has an unindexed > (therefore numerically indexed) value in it will not work once the > Helper has inserted its own value. This is a pretty clear bug in the > code, which sucks because as of this moment, I have no idea what to do > to fix the issue apart from putting in a bug report. Which I guess I > shall do now... > > On Sep 28, 10:09 am, DragonFlyEye wrote: > > > Ok, I don't understand this. I'm creating a form which for reasons I > > won't go into displays on a page with human-friendly URLs. So, I don't > > want to have to use a URL that includes a numeric ID for the database > > node I'm working on. I've run into two problems I find exceptionally > > odd: > > > 1. When creating the action for a form using the "action" element of > > the options array, there is no way to specify that the URL should > > include the identifier of the node you're working on. It's quite > > common to have a url like /stuff/display/thisThing and update the > > values for that node. Why does CakePHP not allow us to specify an > > action like /display/thisThing? > > > 2. Since that doesn't work, I'm using the 'url' element of the options > > array. Implicitly, if I'm creating my own URL from whole cloth, I > > certainly already know what I want that URL to be. But the Cake form > > helper takes it upon itself to prepend the form with ID of the node. > > > By way of example: I am creating the form using the following code: > > > create(null, array('url' => array('controller' > > => > > 'charts', > > > > 'action' => 'display', > > > > $chart['Chart']['chartid']))); ?> > > > On first page load, the output form looks fine: > > > > > But after hitting the submit button, I get the following: > > > > > Can anybody tell me why this happens and if there is a way around it? > > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Re: Form Helper Automatically Inserting the ID of the Node?
Ok, no one seems interested in biting on this, so I'll just go ahead and add my own information based on my own research in case someone else has the same problem: Looking at the helper code, it turns out that the array of options is stitched together with the array_merge() function: $actionDefaults = array( 'plugin' => $this->plugin, 'controller' => $view->viewPath, 'action' => $options['action'], 0 => $id ); if (!empty($options['action']) && !isset($options['id'])) { $options['id'] = $model . Inflector::camelize($options['action']) . 'Form'; } $options['action'] = array_merge($actionDefaults, (array) $options['url']); The problem is that, according to the PHP.net website, array_merge() does not preserve numeric keys, which means that numerically-keyed array indexes will simply be appended to the end of the array, rather than overwriting existing values: 'one', 'two' => 'two', 0 => 0, 1 => 1); $arr2 = array('one' => 'uno', 'two' => 'dos', 0 => 'cero', 1 => 'uno'); $result = array_merge($arr1, $arr2); ?> Returns: Array ( [one] => uno [two] => dos [0] => 0 [1] => 1 [2] => cero [3] => uno ) So the result is that my options array, which has an unindexed (therefore numerically indexed) value in it will not work once the Helper has inserted its own value. This is a pretty clear bug in the code, which sucks because as of this moment, I have no idea what to do to fix the issue apart from putting in a bug report. Which I guess I shall do now... On Sep 28, 10:09 am, DragonFlyEye wrote: > Ok, I don't understand this. I'm creating a form which for reasons I > won't go into displays on a page with human-friendly URLs. So, I don't > want to have to use a URL that includes a numeric ID for the database > node I'm working on. I've run into two problems I find exceptionally > odd: > > 1. When creating the action for a form using the "action" element of > the options array, there is no way to specify that the URL should > include the identifier of the node you're working on. It's quite > common to have a url like /stuff/display/thisThing and update the > values for that node. Why does CakePHP not allow us to specify an > action like /display/thisThing? > > 2. Since that doesn't work, I'm using the 'url' element of the options > array. Implicitly, if I'm creating my own URL from whole cloth, I > certainly already know what I want that URL to be. But the Cake form > helper takes it upon itself to prepend the form with ID of the node. > > By way of example: I am creating the form using the following code: > > create(null, array('url' => array('controller' > => > 'charts', > > 'action' => 'display', > > $chart['Chart']['chartid']))); ?> > > On first page load, the output form looks fine: > > > But after hitting the submit button, I get the following: > > > Can anybody tell me why this happens and if there is a way around it? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
can a group act as both an ARO and an ACO?
I apologize for asking this before trying. I haven't yet had time to get to this and I'm curious if there's a quick answer that will save me some time. Otherwise, I will test it out and report back later. Question: A user belongs to one or more departments. Projects belong to a department. Any user that belongs to department A should be able to access any projects that belong to department A. Conversely, the user should not be allowed to access any projects that belong to a department the user is not also a part of. I wanted to see if I could define the behavior for department to act as both an ACO and an ARO so that it updates the ACOs and AROs automatically whenever a department is created or updated. *** Bonus points: My ACL is actually more complicated than that. The user belongs to a user group as well as a department. The group defines what CRUD actions the user can do in absolute terms. For example, admins are allowed to create and edit company records, but users can only view them. What makes it more complicated is that AMONG those absolute permissions, which specific records you are allowed to edit or view are filtered by the department criteria above. So the user belongs to one or more departments, and the user belongs to a single group. Access is dependent on both department AND group. That means in the ARO table, I would see the same user appear under two different branches (one branch is for all departments, and the other is for all groups). The trouble is that I predict this means ACL will see the user in either one OR the other and give much higher permission than desired. In short, I'm hoping for an AND link but expecting it will only do OR. Super bonus points: My ACL is currently keyed off of just group. I see that ACL queries easily outweigh all other queries in terms of time eaten up. I'm wondering if, even were I to succeed in making my complex ACL tree above work correctly, would the performance hit make it infeasible? Should I just hardcode some things instead? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
upload to remote host , but I can't see the css and Image
Dear All: I upload the cake 1.3.4 to remote Host (hostgator) the remote host is enable mod_wrtie and htaccess My upload the path is "\home\mycake\public_html" public_html--| app | cake | vendor | plugin | .htaccess I browser the http://174.120.97.59/~mycake/ But I see the index.php without css and image who can help me ? thanks :) Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Re: I developed a small CMS based on CakePHP
and what's the admin password? :D -- Tilen Majerle http://majerle.eu 2010/9/28 euromark > i can only say that you SHOULD do it entirely in english > especially functions, comments and stuff > otherwise the rest of the world is not able to read it - and maybe > improve it... :) > > /** > * Muestra la pagina indicada > * > * @param string $title indica el title_url de la pagina > * @return void > */ > => ??? > > etc^^ > > > On 28 Sep., 16:48, Limtrack wrote: > > I developed a small CMS based on CakePHP, is available for anyone who > > wants (GPL v3), is still at an early stage (alpha) now available for > > download, I'd like to share and disseminate the idea and so can > > improve it, greetings to everyone. > > > > http://www.fast-foo.com > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.comFor > more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Re: I developed a small CMS based on CakePHP
maybe webpage in english? :D -- Tilen Majerle http://majerle.eu 2010/9/28 Limtrack > I developed a small CMS based on CakePHP, is available for anyone who > wants (GPL v3), is still at an early stage (alpha) now available for > download, I'd like to share and disseminate the idea and so can > improve it, greetings to everyone. > > http://www.fast-foo.com > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.comFor > more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
I developed a small CMS based on CakePHP
I developed a small CMS based on CakePHP, is available for anyone who wants (GPL v3), is still at an early stage (alpha) now available for download, I'd like to share and disseminate the idea and so can improve it, greetings to everyone. http://www.fast-foo.com Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Re: I developed a small CMS based on CakePHP
i can only say that you SHOULD do it entirely in english especially functions, comments and stuff otherwise the rest of the world is not able to read it - and maybe improve it... :) /** * Muestra la pagina indicada * * @param string $title indica el title_url de la pagina * @return void */ => ??? etc^^ On 28 Sep., 16:48, Limtrack wrote: > I developed a small CMS based on CakePHP, is available for anyone who > wants (GPL v3), is still at an early stage (alpha) now available for > download, I'd like to share and disseminate the idea and so can > improve it, greetings to everyone. > > http://www.fast-foo.com Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Re: ACL Behavior Bug?
Did you find the answer to this? I'm experiencing similar problems with the lft and rght value in the ARO table sometimes being zero. I can't reproduce this problem though, so it's hard to fix. Vincent On Sep 6, 4:31 pm, euromark wrote: > What the ... is the acl behavior doing? > > The user just updates his password (nothing else) > after that he cannot log in anymore because the aro/aco table gets > messed up really bad > > Cake1.3.3 HEAD > > Any ideas? > > 23 SELECT COUNT(*) AS `count` FROM `users` AS `User` WHERE > `User`.`id` = '499949c6-c204-4c89-8dce-1918ab957338' > 1 1 > 0 > 24 UPDATE `users` SET `password` = > '651220fc90f09cdc7de34b3b2b5b6a9b91ed0031', `modified` = > '2010-09-06 15:13:03' WHERE `users`.`id` = '499949c6- > c204-4c89-8dce-1918ab957338' 1 1 > 25 SELECT `Aro`.`id`, `Aro`.`parent_id`, `Aro`.`model`, > `Aro`.`foreign_key`, `Aro`.`alias` FROM `aros` AS `Aro` LEFT JOIN > `aros` AS `Aro0` ON (`Aro`.`lft` <= `Aro0`.`lft` AND `Aro`.`rght` > >= `Aro0`.`rght`) WHERE `Aro0`.`model` = 'User' AND > `Aro0`.`foreign_key` = '499949c6- > c204-4c89-8dce-1918ab957338' ORDER BY `Aro`.`lft` DESC 2 > 2 1 > 26 SELECT COUNT(*) AS `count` FROM `aros` AS `Aro` WHERE `Aro`.`id` > = 129 1 1 0 > 27 SELECT `Aro`.`parent_id` FROM `aros` AS `Aro` WHERE `Aro`.`id` = > 129 LIMIT 1 1 1 0 > 28 SELECT COUNT(*) AS `count` FROM `aros` AS `Aro` WHERE `Aro`.`id` > = 129 1 1 0 > 29 UPDATE `aros` SET `parent_id` = NULL, `model` = 'User', > `foreign_key` = '499949c6-c204-4c89-8dce-1918ab957338', `id` > = 129 WHERE `aros`.`id` = 129 1 0 > 30 SELECT `Aro`.`id`, `Aro`.`parent_id`, `Aro`.`lft`, `Aro`.`rght` > FROM `aros` AS `Aro` WHERE 1 = 1 AND `Aro`.`id` = 129 LIMIT 1 > 1 > 1 0 > 31 SELECT MAX(`Aro`.`rght`) AS `rght` FROM `aros` AS `Aro` WHERE 1 = > 1 LIMIT 1 1 1 0 > 32 UPDATE `aros` AS `Aro` SET `Aro`.`lft` = `Aro`.`lft` + 31 WHERE > `Aro`.`lft` BETWEEN 104 AND 105 1 0 > 33 UPDATE `aros` AS `Aro` SET `Aro`.`rght` = `Aro`.`rght` + 31 WHERE > `Aro`.`rght` BETWEEN 104 AND 105 1 0 > 34 UPDATE `aros` AS `Aro` SET `Aro`.`lft` = `Aro`.`lft` - 2 WHERE > `Aro`.`lft` > 104 14 1 > 35 UPDATE `aros` AS `Aro` SET `Aro`.`rght` = `Aro`.`rght` - 2 WHERE > `Aro`.`rght` > 104 15 1 Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Check for validation errors in a view
Hi, can i somehow see *in a view* whether a forma validation error occurred? Like: if ($form->hasErrors() ) echo 'there was an error'; else echo 'please edit the entry'; Or can i only check for that in the controller and have to pass a variable to the view? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Re: Need FormHelper to show errors from another controller validating
nevermind I just useds a session to pass invalidFields() and manually used invalidate() in my other controller On Sep 28, 10:52 am, "j.blotus" wrote: > Hi guys, > > I have a form on ListingsController::View($id) that submits to > InquiriesController::add() > > I perform model validation from InquiriesController, and redirect back > to ListingsController::View($id). > > How do I pass invalidFields() from one controller to the next? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Need FormHelper to show errors from another controller validating
Hi guys, I have a form on ListingsController::View($id) that submits to InquiriesController::add() I perform model validation from InquiriesController, and redirect back to ListingsController::View($id). How do I pass invalidFields() from one controller to the next? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Re: JS helper
Turns out concatenation works now. Anyway with the native JQuery function example provided above I will explore that instead of JS helper. Jeremy: i doubt my findings are that valuable, besides the more time I spend on this helper the more convinced I am that helper is to be used for very occasional things but not intended to truly turn CakePHP into Ajax rich software. I suppose this is a reason why none bothers with practical examples or additional comments on the helper. cricket: Thank you for valuable input. I've spent couple of hours on it and I think I will go that direction. I made your example work although I hit a problem that I find difficult to overcome. Maybe you can help: When I click on CmdOpen link the html is rendered successfully; it fills in Target but immediately a.CmdOpen.Active acts as clicked and hides (removes altogether) the Target. To test it I have changed 2nd function event to dblclick. Even with this, second function does not act as required upon double click it clears content, removes Active class but now, the link CmdOpen does not function anymore. With Loading plugin the Target was totally removed from nodes. When I removed the Loading plugin I have it acting slightly better but still experience the same problems. I have my doubts using Loading plugin altogether - requires 3 additional files and provides fairly simple functionality. Why would that be better then my original idea: $("#busy- indicator").clone().appendTo(target).show(); replaced by a rendered content? I am yet to test this function for several boxes on one page, but not before I made this behave as expected. For these interested above code has few typos: $ missing RequestAction should be RequestHandler $this->element('view'); should be echoed; url: $(this).attr('href'); should be finished with , not ; $this->removeClass('Active'); should start with $(this) Loadng plugin requires 3 additional files jquery.measure.js, jquery.place.js, jquery.pulse.js (included in that order). I got the files from the Loading demo page as could not locate references to files/plugins in the Loading plugin description (http://jquery- values.googlecode.com/svn/other/loading/jquery.loading.htm). Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Form Helper Automatically Inserting the ID of the Node?
Ok, I don't understand this. I'm creating a form which for reasons I won't go into displays on a page with human-friendly URLs. So, I don't want to have to use a URL that includes a numeric ID for the database node I'm working on. I've run into two problems I find exceptionally odd: 1. When creating the action for a form using the "action" element of the options array, there is no way to specify that the URL should include the identifier of the node you're working on. It's quite common to have a url like /stuff/display/thisThing and update the values for that node. Why does CakePHP not allow us to specify an action like /display/thisThing? 2. Since that doesn't work, I'm using the 'url' element of the options array. Implicitly, if I'm creating my own URL from whole cloth, I certainly already know what I want that URL to be. But the Cake form helper takes it upon itself to prepend the form with ID of the node. By way of example: I am creating the form using the following code: create(null, array('url' => array('controller' => 'charts', 'action' => 'display', $chart['Chart']['chartid']))); ?> On first page load, the output form looks fine: But after hitting the submit button, I get the following: Can anybody tell me why this happens and if there is a way around it? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Re: Join returns 2 arrays - how can I change that?
oh didn't think of that. Thank you! I am not so used with working arrays. Thanks! On Sep 28, 3:28 pm, Tilen Majerle wrote: > did u try this? > > $groups = array_merge($groups["usergroups"], $groups["user"]); // but if u > have same key's aka id field is in users and usergrups tableit will be > merged (replaced); > > -- > Tilen Majerlehttp://majerle.eu > > 2010/9/27 quas > > > > > Hi there, > > > I have a problem with the returning data of my database when I use > > cakephp. > > > when I make a join with 2 tables I get as returnvalue 2 arrays. One > > for each table... > > > for example > > join: user & usergroup > > > results in > > > array[user] and array[usergroup] > > > I am not sure if this is the normal cakephp behaviour or if I make an > > mistake > > but it's a little annoying to use: > > > > > > > > in my view. > > > How can I achieve that I only get one array back with the joined data > > so that I can use : > > > > > > > > Thanks a Lot > > > Quas > > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others > > with their CakePHP related questions. > > > You received this message because you are subscribed to the Google Groups > > "CakePHP" group. > > To post to this group, send email to cake-php@googlegroups.com > > To unsubscribe from this group, send email to > > cake-php+unsubscr...@googlegroups.com > om>For more options, visit this group at > >http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Re: Join returns 2 arrays - how can I change that?
did u try this? $groups = array_merge($groups["usergroups"], $groups["user"]); // but if u have same key's aka id field is in users and usergrups tableit will be merged (replaced); -- Tilen Majerle http://majerle.eu 2010/9/27 quas > Hi there, > > I have a problem with the returning data of my database when I use > cakephp. > > when I make a join with 2 tables I get as returnvalue 2 arrays. One > for each table... > > for example > join: user & usergroup > > results in > > array[user] and array[usergroup] > > I am not sure if this is the normal cakephp behaviour or if I make an > mistake > but it's a little annoying to use: > > > > > in my view. > > How can I achieve that I only get one array back with the joined data > so that I can use : > > > > > Thanks a Lot > > Quas > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.comFor > more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Re: how stand up bake on Denwer?
your command line php ini settings are not loading some extensions - S On 27 September 2010 19:49, Коля wrote: > C:\Users\1>cake > > PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/ > php5/ext\p > hp_gd2.dll' - =х эрщфхэ єърчрээvщ ьюфєы№. > in Unknown on line 0 > PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/ > php5/ext\p > hp_mbstring.dll' - =х эрщфхэ єърчрээvщ ьюфєы№. > in Unknown on line 0 > PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/ > php5/ext\p > hp_mysql.dll' - =х эрщфхэ єърчрээvщ ьюфєы№. > in Unknown on line 0 > PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/ > php5/ext\p > hp_mysqli.dll' - =х эрщфхэ єърчрээvщ ьюфєы№. > in Unknown on line 0 > PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/ > php5/ext\p > hp_pdo_mysql.dll' - =х эрщфхэ єърчрээvщ ьюфєы№. > in Unknown on line 0 > > Welcome to CakePHP v1.2.8 Console > --- > Current Paths: > -app: 1 > -working: C:\Users\1 > -root: C:\Users > -core: C:\WebServers\home\cake2\www > > Changing Paths: > your working path should be the same as your application path > to change your path use the '-app' param. > Example: -app relative/path/to/myapp or -app /absolute/path/to/myapp > > Available Shells: > > C:\WebServers\home\cake2\www\vendors\shells: > - none > > CORE\console\libs: > acl > api > bake > console > i18n > schema > testsuite > > To run a command, type 'cake shell_name [args]' > To get help on a specific command, type 'cake shell_name help' > > > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.comFor > more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Re: htaccess and domain
a) you should redirect the other way around: domain => www.domain http://www.dereuromark.de/2010/07/13/redirect-root-domain-to-www-subdomain/ b) only webroot is relevant. you should therefore connect the apache to /app/webroot/ (not /app or even worse /) then you can even delete the other 2 .htaccess On 28 Sep., 03:55, leafchild wrote: > I set webroot to app/webroot > Also I edited .htaccess file to redirect user to domain without www > url, if a user access the site withwww.mydomain, user is redirected > to > mydomain.com. > > Not sure which .htaccess file I edited but before I set webroot to app/ > webroot, redirectingwww.mydomainto mydomain > was working fine but after I set webroot to app/webroot. It seems > like, .htaccess is not working properly anymore. > > I realized that there are couple of .htaccess in cakephp dir. > - cake dir/.htaccess > - webroot/.htaccess > - cake dir/app/.htaccess > > Which file I need to edit to set redirect? I edit all of three above > files but none of it working. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
reporting component
Are there any up to date reporting components for cake? I tried to add the one from the bakery but had loads of probelms with it. cheers! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Re: updating a value when user clicks a link
Hi Well its during the creation of an advert that the relevant field in appointments would need to be updated so it seemed like the best place to do it thanks On Mon, Sep 27, 2010 at 7:19 PM, cricket wrote: > On Mon, Sep 27, 2010 at 10:24 AM, james livsey > wrote: > > Thanks Cricket, > > > > I added that code as you suggested. While it doesnt cause any errors it > > doesnt seem to modify the field data either. > > > > what I have is: > > > >function add($appointment_id = null){ > >//existing code > >$this->Advert->Appointment->id = $appointment_id; > >$this->Advert->Appointment->saveField('appointment_status', > 'Order'); > >$this->Advert->create(); > >} > > > > > > does that look about right? > > > > And yeah your right i should change it to status > > > You've got create() in the wrong place. That should come first, if > it's included at all. See the API: > > http://api.cakephp.org/class/model#method-Modelcreate > > $this->Advert->Appointment->create(array('Appointment' => array('id' > => $appointment_id))); > > That will initialize the instance with the appropriate id. > > Actually, why are you calling create() on Advert, instead of > Appointment? I'm guessing there's more to this method. > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.comFor > more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Re: cakephp pick-list/multi-select.
Thank you. But to save data to HABTM in CakePHP is already look like that. On Mon, Sep 27, 2010 at 6:48 PM, euromark wrote: > thats a highly sophisticated script you are referring to > not easy to copy :) > > i only know: > http://quasipartikel.at/multiselect/ > > maybe it works for you > > > On 27 Sep., 13:00, fadhli wrote: > > Hi everyone. > > > > i want to make a HABTM picklist like invite friends on facabook. > > > > i have 3 tables:. > > 1. clients; > > 2. groups; > > 3. messages. > > > > clients table HABTM with groups and messages table > > I want to build an application that sends messages to the client with > > CakePHP 1.3 and MySQL. I want to make it look like inviting friends on > > facebook group. where I can choose the client that would in dedicate > based > > on their group. > > > > how to make it? Anyone have any example or tutorial? > > > > http://lh3.ggpht.com/_MYlOp06_a1s/TKB5LfrhZ5I/DP4/JYYTEKUC6GI... > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.comFor > more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en