xmlwriter
Hello everybody, hi Franky, Thanks for your reply! So XML seams to be a core helper. But I don't understand from where I get it working. Am I right if I use it in my controller? I tried this in my_controller.php: var $helpers = array('Html', 'Form', 'Javascript', 'Xml'); function xmlExport(){ $xml = new XmlHelper(); } This gives me the error: Fatal error: Class 'XmlHelper' not found in my_controller.php on line 353 What do I do wrong? Installatioan questions: Does anyone know if I have to install expat seperately or if it comes with cake? I guess not... And if not, how can I get cake to work with it? Webservices: I found this tutorial: http://www.littlehart.net/atthekeyboard/2006/11/29/using-cakephps-native-web-service-support/ But it seems to be for Cake1.1 and I have galdly migrated to cake1.2 RC3 A Mysql export to XML wouldn't help because, what I need is a XML document which contains the information of about 5-10 connected tables in my database. Thanks for any hint and help! Anja -Ursprüngliche Nachricht- Von: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von francky06l Gesendet: Donnerstag, 16. Oktober 2008 00:55 An: CakePHP Betreff: Re: xmlwriter Well check the xml helper and serialize method, if DB is big you might have to paginate it .. I also believe that mysqldump can dump xml (not sure thought)... On Oct 14, 5:46 pm, Liebermann, Anja Carolin [EMAIL PROTECTED] wrote: I would be interested as well in any help on this topic. The cookbook isn't very verbose on this:http://manual.cakephp.org/view/623/Xml In the end I would like to make an XML export out of my database, but at the moment I don't know how to get expat on my development server (WinXP) or on my production environment (Linux). And I have no clue how to talk to expat or if cake does it for me. Thanks for any help, hints and links in advance! Anja Von: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von . Gesendet: Sonntag, 12. Oktober 2008 05:53 An: Cake PHP Betreff: xmlwriter has anybody worked with xmlwriter (or similar) with cakephp? thanks --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: mod_rewrite problem?
Hello, thanks for your answer. What do you mean with .htaccess in your webroot virtual site? I have in my apache config following: AccessFileName .htaccess Or should it be in the virtual host configuration? Regards Arndtinho On 16 Okt., 01:00, francky06l [EMAIL PROTECTED] wrote: Usually mod-rewrite is in the htaccess, be sure you have proper .htaccess in your webroot virtual site (you can also turn on the rewrite log on apache, and check if something is wrong).. hth On Oct 15, 10:13 pm, Arndtinho [EMAIL PROTECTED] wrote: Hello, I reconfigured my new workstation with Cake. Following transfering my projects I tested one. But the site is displayed without the CSS definitions and the includes. I was first exposed mod_rewrite is disabled but it's enabled. And if I callhttp://myproject/css/main.css, the content of the css file is displayed at the browser. What could be the reason for this behavior? Here my virtual host configuration: VirtualHost *:80 ServerAdmin [EMAIL PROTECTED] DocumentRoot E:/Pfad/zum/Projekt ServerName myproject ServerAlias 127.0.0.1 ErrorLog E:/Pfad/zum/Projekt/logfiles/profil_error.log CustomLog E:/Pfad/zum/Projekt/logfiles/profil_access.log common Directory E:/Pfad/zum/Projekt/ AllowOverride All Options +FollowSymLinks Order deny,allow Allow from all Satisfy all /Directory /VirtualHost System: WinXP, Apache2 (mod_rewrite enabled), CakePHP 1.1 Regards Arndtinho- Zitierten Text ausblenden - - Zitierten Text anzeigen - --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Object not found! error...
I am following a tutorial for CakePHP from https:// www6.software.ibm.com/developerworks/education/os-php-cake1/ section3.html I created a view for registration, on submitting it should submit values to the database. But it is displaying error Object not found!. Following is my view code: /***/ form action=/users/register method=post pPlease fill out the form below to register an account./p labelUsername:/labelinput name=username size=40 / labelPassword:/labelinput type=password name=password size=40 / labelEmail Address:/labelinput name=email size=40 maxlength=255 / labelFirst Name:/labelinput name=first_name size=40 / labelLast Name:/labelinput name=last_name size=40 / input type=submit value=register / /form /***/ please help me... --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
AW: Object not found! error...
Hi Mohammad, Have you checked on typos in your object/controller/function name? Common typos are e.g. your model is named Foo $this-data['Foos'] instead of $this-data['Foo'] Or the action goes to foo_controller instead of foos_controller Lastly check your model foo.php on typos. Good hunt! Anja -Ursprüngliche Nachricht- Von: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von xelios Gesendet: Donnerstag, 16. Oktober 2008 09:09 An: CakePHP Betreff: Object not found! error... I am following a tutorial for CakePHP from https:// www6.software.ibm.com/developerworks/education/os-php-cake1/ section3.html I created a view for registration, on submitting it should submit values to the database. But it is displaying error Object not found!. Following is my view code: /***/ form action=/users/register method=post pPlease fill out the form below to register an account./p labelUsername:/labelinput name=username size=40 / labelPassword:/labelinput type=password name=password size=40 / labelEmail Address:/labelinput name=email size=40 maxlength=255 / labelFirst Name:/labelinput name=first_name size=40 / labelLast Name:/labelinput name=last_name size=40 / input type=submit value=register / /form /***/ please help me... --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Data validation from URL
Dabble around with the debug() method, like $this-data = $this-Model-find( /* conditions */ ); debug($this-data); You'll find the answer eventually... On 16 Oct 2008, at 16:41, Cody Sortore wrote: Okay, I added this: if ($secretid != /* What Goes Here? */ ) { $this-flash(__('Invalid Secret Identification Code', true), array('action'='index')); } Tried several different things, but I'm a noob, which is why I couldn't get it to work in the first place, I was just messing around with some of the code that was baked up for me but it's not working. How do you call a single item from the database? On Oct 16, 1:28 am, David C. Zentgraf [EMAIL PROTECTED] wrote: Think twice about what's actually going on in that code... If no $id or $secretid were supplied, you redirect somewhere else. If $this-data is not empty... doesn't matter. Then, last case that always gets triggered if there's ANY $id or $secretid, you fetch the data from the DB and present it to the user. There's no validation of the $secretid going on whatsoever, how do you expect it to work? On 16 Oct 2008, at 14:36, Cody Sortore wrote: Okay, with the particular site I'm building a log in system isn't necessary, and people don't want it. The problem is that I want to allow the creator editing access still. People make mistakes, or may need to delete spam comments occasionally. What I was thinking was to have a place when creating their page they put in a secret id that then goes into the database and what I want to do is so that the only way to access the edit page is to have that secret id in the url for example: http://www.testsite.com/inventory/edit/secretid/1/ I've actually got that working with this code: http://bin.cakephp.org/view/1344979601 and a view that has a hidden field for the secret id. Problem is with what I have anything in place of the secret id allows you to edit. Examples: http://www.testsite.com/inventory/edit/12345/1/ http://www.testsite.com/inventory/edit/iamahaxor/1/ http://www.testsite.com/inventory/edit/1/1/ will all allow you to edit inventory item number 1. Another annoyance I've noticed is that if you have an inventory number higher than what the table goes up to. Say with this one in test runs I've only got 3 inventory items to work with right now. If I put: http://www.testsite.com/inventory/edit/secretid/1337/ it simply adds another inventory item to the list... this like I said is only a minor nuisance and can be ignored, the important part is the data validation (which may be fix this trouble too). --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Data validation from URL
Okay, I added this: if ($secretid != /* What Goes Here? */ ) { $this-flash(__('Invalid Secret Identification Code', true), array('action'='index')); } Tried several different things, but I'm a noob, which is why I couldn't get it to work in the first place, I was just messing around with some of the code that was baked up for me but it's not working. How do you call a single item from the database? On Oct 16, 1:28 am, David C. Zentgraf [EMAIL PROTECTED] wrote: Think twice about what's actually going on in that code... If no $id or $secretid were supplied, you redirect somewhere else. If $this-data is not empty... doesn't matter. Then, last case that always gets triggered if there's ANY $id or $secretid, you fetch the data from the DB and present it to the user. There's no validation of the $secretid going on whatsoever, how do you expect it to work? On 16 Oct 2008, at 14:36, Cody Sortore wrote: Okay, with the particular site I'm building a log in system isn't necessary, and people don't want it. The problem is that I want to allow the creator editing access still. People make mistakes, or may need to delete spam comments occasionally. What I was thinking was to have a place when creating their page they put in a secret id that then goes into the database and what I want to do is so that the only way to access the edit page is to have that secret id in the url for example: http://www.testsite.com/inventory/edit/secretid/1/ I've actually got that working with this code: http://bin.cakephp.org/view/1344979601 and a view that has a hidden field for the secret id. Problem is with what I have anything in place of the secret id allows you to edit. Examples: http://www.testsite.com/inventory/edit/12345/1/ http://www.testsite.com/inventory/edit/iamahaxor/1/ http://www.testsite.com/inventory/edit/1/1/ will all allow you to edit inventory item number 1. Another annoyance I've noticed is that if you have an inventory number higher than what the table goes up to. Say with this one in test runs I've only got 3 inventory items to work with right now. If I put: http://www.testsite.com/inventory/edit/secretid/1337/ it simply adds another inventory item to the list... this like I said is only a minor nuisance and can be ignored, the important part is the data validation (which may be fix this trouble too). --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Auth-allow() in controller specific cases
Hi, I've got, say, two actions, with exactly the same action name but belong to different controllers. posts/add, comments/add. I want to set: $this-Auth-allow('comments/add'); (while blocking users not logged in from access posts/add) But this syntax does not seem to be supported by Auth component. Is there any way I can do this within the boundary of Auth component. Thanks. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Data validation from URL
Woops... didn't mean to post the same thing again. Thanks, you've set me on the right path at least, I can generally find my way with a little direction. On Oct 16, 2:51 am, David C. Zentgraf [EMAIL PROTECTED] wrote: Dabble around with the debug() method, like $this-data = $this-Model-find( /* conditions */ ); debug($this-data); You'll find the answer eventually... On 16 Oct 2008, at 16:41, Cody Sortore wrote: Okay, I added this: if ($secretid != /* What Goes Here? */ ) { $this-flash(__('Invalid Secret Identification Code', true), array('action'='index')); } Tried several different things, but I'm a noob, which is why I couldn't get it to work in the first place, I was just messing around with some of the code that was baked up for me but it's not working. How do you call a single item from the database? On Oct 16, 1:28 am, David C. Zentgraf [EMAIL PROTECTED] wrote: Think twice about what's actually going on in that code... If no $id or $secretid were supplied, you redirect somewhere else. If $this-data is not empty... doesn't matter. Then, last case that always gets triggered if there's ANY $id or $secretid, you fetch the data from the DB and present it to the user. There's no validation of the $secretid going on whatsoever, how do you expect it to work? On 16 Oct 2008, at 14:36, Cody Sortore wrote: Okay, with the particular site I'm building a log in system isn't necessary, and people don't want it. The problem is that I want to allow the creator editing access still. People make mistakes, or may need to delete spam comments occasionally. What I was thinking was to have a place when creating their page they put in a secret id that then goes into the database and what I want to do is so that the only way to access the edit page is to have that secret id in the url for example: http://www.testsite.com/inventory/edit/secretid/1/ I've actually got that working with this code: http://bin.cakephp.org/view/1344979601 and a view that has a hidden field for the secret id. Problem is with what I have anything in place of the secret id allows you to edit. Examples: http://www.testsite.com/inventory/edit/12345/1/ http://www.testsite.com/inventory/edit/iamahaxor/1/ http://www.testsite.com/inventory/edit/1/1/ will all allow you to edit inventory item number 1. Another annoyance I've noticed is that if you have an inventory number higher than what the table goes up to. Say with this one in test runs I've only got 3 inventory items to work with right now. If I put: http://www.testsite.com/inventory/edit/secretid/1337/ it simply adds another inventory item to the list... this like I said is only a minor nuisance and can be ignored, the important part is the data validation (which may be fix this trouble too). --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How to use MySql's CASE WHEN function with CakePhp
Possibly, but it's worked for quite some time now. Until recently, cake used raw sql internally for `find('count')`, although now there's a `DboSource::calculate()` method, so I'm not sure. I don't like using `query()` unless it's really necessary; it's nice to get the automagic of `find()`, but sometimes it's good to have a little extra sql in there. Any core devs to comment on this? On Oct 16, 2:07 am, James K [EMAIL PROTECTED] wrote: In these cases, I think it's more appropriate to just use $this- Something-query('SELECT ') Being able to Inject SQL into the fields collection most likely is not by design and something like that has a high chance of not working in future updates. - James On Oct 15, 11:34 am, MarcS [EMAIL PROTECTED] wrote: thanks so much On Oct 15, 4:57 pm, grigri [EMAIL PROTECTED] wrote: Double-up the parentheses: $this-Something-find('all', array( 'fields' = array( 'Something.id', '((CASE WHEN Something.id%2=0 THEN \'even\' ELSE \'odd\' END)) AS parity' ) )); Works fine on my (almost latest) build [and has done for a while - I've used this before] hth grigri On Oct 15, 3:34 pm, MarcS [EMAIL PROTECTED] wrote: Hi everyone, I'm trying to figure out how I can use the CASE WHEN function with cakephp I'm trying to run the following query SELECT `type` , ( CASE WHEN `type` = 'type3' THEN 1 WHEN `type` = ''type4' THEN 2 WHEN `type` = ''type1' THEN 3 ELSE 4 END ) AS sort FROM `task_lines` AS `TaskLine` ORDER BY `sort` ASC This is the Cake statement which I've tried: $this-TaskLine-find('all',array('fields' = array('type',( CASE WHEN `type` = 'type3' THEN 1 WHEN `type` = ''type4' THEN 2 WHEN `type` = ''type1' THEN 3 ELSE 4 END ) AS sort),'order' = 'sort')); Cake generates the following query: SELECT `TaskLine`.`type`, `TaskLine`.`( CASE WHEN `type` = 'type3' THEN 1 WHEN `type` = 'type4' THEN 2 WHEN `type` = 'type1' THEN 3 ELSE 4 END )` AS `sort` FROM `task_lines` AS `TaskLine` WHERE 1 = 1 ORDER BY `sort` ASC which will obviously result in an SQL error. Any ideas on how to do this? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
admin routing issue while debug = 0
Using admin routing + .htaccess to restrict admin operations. Works correctly while cake debug is set to 1. When debug = 0, 404 error is returned instead of username/password (define in .htaccess of /admin directory) dialog. Any ideas why? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Quick Tip: How to fix missing table errors.
I have, from time to time, had immense problems running tests on models. I keep getting errors about tables being missing on seemingly any random table, including ones in the core tests. I believe I have found out how these errors occur. They happen when you have tried to run a test with a syntax error or similar fatal problem in the source. For me this is quite common since I cane easily forget a ; or two. Since the whole test-run died half way through, I now have some tables still in my test database but some where never created before the script died. The quick fix = Clear the test database of all tables. (works for me every time) I guess that Cake checks the database and if it contains tables it is more careful and does not want to disturb your schema. This is a good thing if you happen to run a test on your main database. Cake won't wipe away aan important table by misstake. /Martin --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
fsm automata
Hello, I'm completely new to cake and I'm thinking about how to implement a bunch of complex procedure that should go in my models, the ideal implementation would be a classic finite-state machine automata. Does anybody have any idea or suggestion? For example, I was thinking of using this class: http://pear.php.net/package/FSM Do you think this will interfere or cause problems with cake? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: EmailComponent - bcc bug using SMTP deliverymethod
Hi everybody, The behavior of bcc addresses being publicly viewed in email send by the EmailComponent is still active. But it still is only happening, when I use SMTP to send the emails. When using MAIL as the delivery method, it should not happen, cause the php mailer may filter this out. Has anybody seen the same behavior ? I have found a solution for me asking in the EmailComponent if the deliverymtethod is SMTP and then not putting the bcc addresses into the header. If anybody could confirm this, it would be helpful. Otherwise I will setup a ticket on trac. Siegfried On Tue, Jul 22, 2008 at 10:23 PM, Siegfried Hirsch [EMAIL PROTECTED] wrote: Just to make sure, that its my fault: Using the EmailComponent I was able to send emails - but if I set bcc addresses, then I can see the bcc addresses, when I address the email to my gmail account. Any ideas, what could cause this ? Thanks Siegfried -- Siegfried Hirsch hhS - Welserstr. 1 - 81373 München - (089) 5484 3564 - skype:shirsch Fax +49 - (0)89 - 943 992 698 - http://www.rss-blogger.de http://www.newsbee.de NewsBee 2 - customized RSS solutions http://abo-stop.de jetzt mit kostenlosem Kündigungsgenerator --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Data validation from URL
Think twice about what's actually going on in that code... If no $id or $secretid were supplied, you redirect somewhere else. If $this-data is not empty... doesn't matter. Then, last case that always gets triggered if there's ANY $id or $secretid, you fetch the data from the DB and present it to the user. There's no validation of the $secretid going on whatsoever, how do you expect it to work? On 16 Oct 2008, at 14:36, Cody Sortore wrote: Okay, with the particular site I'm building a log in system isn't necessary, and people don't want it. The problem is that I want to allow the creator editing access still. People make mistakes, or may need to delete spam comments occasionally. What I was thinking was to have a place when creating their page they put in a secret id that then goes into the database and what I want to do is so that the only way to access the edit page is to have that secret id in the url for example: http://www.testsite.com/inventory/edit/secretid/1/ I've actually got that working with this code: http://bin.cakephp.org/view/1344979601 and a view that has a hidden field for the secret id. Problem is with what I have anything in place of the secret id allows you to edit. Examples: http://www.testsite.com/inventory/edit/12345/1/ http://www.testsite.com/inventory/edit/iamahaxor/1/ http://www.testsite.com/inventory/edit/1/1/ will all allow you to edit inventory item number 1. Another annoyance I've noticed is that if you have an inventory number higher than what the table goes up to. Say with this one in test runs I've only got 3 inventory items to work with right now. If I put: http://www.testsite.com/inventory/edit/secretid/1337/ it simply adds another inventory item to the list... this like I said is only a minor nuisance and can be ignored, the important part is the data validation (which may be fix this trouble too). --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Object not found! error...
I didn't find any typo... Following are my files... / */ C:\xampp\htdocs\cake\app\models\user.php ?php class User extends AppModel { var $name = 'User'; } ? / */ / */ C:\xampp\htdocs\cake\app\views\users\register.ctp form action=/users/register method=post pPlease fill out the form below to register an account./p labelUsername:/labelinput name=username size=40 / labelPassword:/labelinput type=password name=password size=40 / labelEmail Address:/labelinput name=email size=40 maxlength=255 / labelFirst Name:/labelinput name=first_name size=40 / labelLast Name:/labelinput name=last_name size=40 / input type=submit value=register / /form / */ / */ C:\xampp\htdocs\cake\app\controllers\users_controller.php ?php class UsersController extends AppController { var $name = 'Users'; var $helpers = array('Html', 'Form' ); function register() { if (!empty($this-params['form'])) { if ($this-User-save($this-params['form'])) { $this-flash('Your registration information was accepted.', '/users/ register'); } else { $this-flash('There was a problem with your registration', '/users/ register'); } } } // END - register } // END - class ? / */ I've a doubt on users_controller.php, may be it is not in an appropriate place. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Handling Auth for users in Different Models (Agent / Client)
Hi, I don't know what your app does but here are some thoughts on your situation. I think you might want to think about creating a common User model. Your existing Client and Agent models could be linked to a User via hasOne or belongsTo. Any common properties can be moved into User along with authentication stuff. You would in this case need to watch out for a User that is both Client and Agent... you may want to prevent that in your models. You could also take it one step further and see Client and Agent as roles with the possibility to extent the app to handle further roles. You could probably get away with setting userModel based on the current url but that could cause problems when two users (a Client and an Agent) could have the same name and password... Just some quick thoughts. /Martin On Oct 16, 7:59 am, WildFox [EMAIL PROTECTED] wrote: What is the best way to handle Auth for users that belong to completely seperate models/tables? I have an Agent model Client model, basically the Agent hasMany Client and Client belongsTo Agent - The fields for each respective model are radically different enough that they did indeed require there own models. Using CakePHP Auth component I know how and currently have Auth setup for the Client model, but I dont know how to set it up to have the Auth component also Handle the Agent model. Is this a situation where the Auth component may not be the best choice? My current Auth code in my AppController beforeFilter() is $this-Auth-userModel = 'Client'; $this-Auth-fields = array('username' = 'email', 'password' = 'password'); $this-Auth-loginAction = array('controller' = 'account', 'action' = 'login'); $this-Auth-loginRedirect = array('/'); $this-Auth-authorize = 'controller'; $this-Auth-deny(*); $this-Auth-logoutRedirect = array('controller' = 'account', 'action' = 'login'); As an aside... When I login, it takes me back to the Login page even on success, is there something up there that is foobaring the redirect? Also, whats the best way to handle possibly putting the Agent route/ pages on a subdomain so I would potentially end up with http://mydomain.com- Client areahttp://agent.mydomain.com- Agent area (/agent - Route) Thanks all --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: xmlwriter
Take a look at this bakery article about Sitemaps, which are dynamisch XML files generated from different models using find('all') http://bakery.cakephp.org/articles/view/automatically-generate-dynamic-sitemaps I think there you have all your answers. On Thu, Oct 16, 2008 at 8:29 AM, Liebermann, Anja Carolin [EMAIL PROTECTED] wrote: Hello everybody, hi Franky, Thanks for your reply! So XML seams to be a core helper. But I don't understand from where I get it working. Am I right if I use it in my controller? I tried this in my_controller.php: var $helpers = array('Html', 'Form', 'Javascript', 'Xml'); function xmlExport(){ $xml = new XmlHelper(); } This gives me the error: Fatal error: Class 'XmlHelper' not found in my_controller.php on line 353 What do I do wrong? Installatioan questions: Does anyone know if I have to install expat seperately or if it comes with cake? I guess not... And if not, how can I get cake to work with it? Webservices: I found this tutorial: http://www.littlehart.net/atthekeyboard/2006/11/29/using-cakephps-native-web-service-support/ But it seems to be for Cake1.1 and I have galdly migrated to cake1.2 RC3 A Mysql export to XML wouldn't help because, what I need is a XML document which contains the information of about 5-10 connected tables in my database. Thanks for any hint and help! Anja -Ursprüngliche Nachricht- Von: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von francky06l Gesendet: Donnerstag, 16. Oktober 2008 00:55 An: CakePHP Betreff: Re: xmlwriter Well check the xml helper and serialize method, if DB is big you might have to paginate it .. I also believe that mysqldump can dump xml (not sure thought)... On Oct 14, 5:46 pm, Liebermann, Anja Carolin [EMAIL PROTECTED] wrote: I would be interested as well in any help on this topic. The cookbook isn't very verbose on this:http://manual.cakephp.org/view/623/Xml In the end I would like to make an XML export out of my database, but at the moment I don't know how to get expat on my development server (WinXP) or on my production environment (Linux). And I have no clue how to talk to expat or if cake does it for me. Thanks for any help, hints and links in advance! Anja Von: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von . Gesendet: Sonntag, 12. Oktober 2008 05:53 An: Cake PHP Betreff: xmlwriter has anybody worked with xmlwriter (or similar) with cakephp? thanks -- Siegfried Hirsch hhS - Welserstr. 1 - 81373 München - (089) 5484 3564 - skype:shirsch Fax +49 - (0)89 - 943 992 698 - http://www.rss-blogger.de http://www.newsbee.de NewsBee 2 - customized RSS solutions http://abo-stop.de jetzt mit kostenlosem Kündigungsgenerator --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Testing and cake custom installation
Hi, I have a custom installation of CakePHP in my development setup (mainly to share core and some vendors and to resemble the production setup). Setup is as follows: /Webserver /apps /app1 /app2 /Documents (this is Apache document root /app1 (the webroot for app1) /app2 (the webroot for app2) /share /cake /vendors But now, testing no longer works,, even changing paths in the test.php file. I know that actual implementation doesn't support this custom install, but I would like to know if a workaround is possible. -- Fran Iglesias [EMAIL PROTECTED] --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: complex query : HABTM Association between multiple model
I found all products accordingly users by using Containable behavior. code is: $this-User-contain(array('Product')); debug($this-User-find('all', array('conditions' = array('User.id' = $this-Auth-user('id'); But now don't know how to find all brands accordingly a users product? Is CakePHP very complex for writing function for such query..because I am trying it from last two days also no body is replaying me. Please tell me how should I go ahead with this? Thanks On Oct 16, 12:18 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Sorry, I forget that I used this solution but could not succeed $brands = $this-User-Product-Brand-find('all',array( 'fields' = array('Brand.id','Brand.brand_name'), 'conditions' = array('User.id' = $this-Auth-user('id')), 'recersive' = 0) ); Please help me On Oct 16, 12:15 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I have three Model with following association 1 User 2 Product 3 Brand User HABTM(brands_users)--Brand Brand---HABTM(brands_products)--Product User---HABTM(products_users)--Product I want to find a list of all brands which product had been selected by a user. Means first user select some products then he will be select brands. So I am unable to display all brands accordingly user's products Thanks a lot you for my help --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Problem with updating data with HABTM (Posts and Tags).....too much data is deleted from JOIN table.
There is a ticket for this already. I found it yesterday when I was looking into this myself. The problem is new to rc3. Rc2 works just as Cake always has. Add your tests and thoughts there if you can. https://trac.cakephp.org/ticket/5579 About requiring join tables and their pk requirements. Cake has tests for both types of tables. There is also a test for a join with extra fields. I personally prefer using a composite pk: CREATE TABLE `modules_users` ( `module_id` int(11) unsigned NOT NULL default '0', `user_id` int(11) unsigned NOT NULL default '0', PRIMARY KEY (`module_id`,`user_id`) ) Cake, on the other hand, creates a pk-less table where the two ids are instead made a unique key. The working result is afaik the same. /Martin --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Object not found! error...
I don't see any obvious typo in your classes but one thing popped into my head that I thought I'd ask you. Are you developing in 1.1 or 1.2? IBM had a bunch of tutorials for early Cake 1.1. They do not work as expected on 1.2 because so much has changes in the APIs. /Martin On Oct 16, 10:14 am, xelios [EMAIL PROTECTED] wrote: I didn't find any typo... Following are my files... / *** **/ C:\xampp\htdocs\cake\app\models\user.php ?php class User extends AppModel { var $name = 'User';} ? / *** **/ / *** **/ C:\xampp\htdocs\cake\app\views\users\register.ctp form action=/users/register method=post pPlease fill out the form below to register an account./p labelUsername:/labelinput name=username size=40 / labelPassword:/labelinput type=password name=password size=40 / labelEmail Address:/labelinput name=email size=40 maxlength=255 / labelFirst Name:/labelinput name=first_name size=40 / labelLast Name:/labelinput name=last_name size=40 / input type=submit value=register / /form / *** **/ / *** **/ C:\xampp\htdocs\cake\app\controllers\users_controller.php ?php class UsersController extends AppController { var $name = 'Users'; var $helpers = array('Html', 'Form' ); function register() { if (!empty($this-params['form'])) { if ($this-User-save($this-params['form'])) { $this-flash('Your registration information was accepted.', '/users/ register'); } else { $this-flash('There was a problem with your registration', '/users/ register'); } } } // END - register } // END - class ? / *** **/ I've a doubt on users_controller.php, may be it is not in an appropriate place. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
AW: Object not found! error...
Hi Mohammad, On the first glance everything looks well and your files are at the right place. My user model look like this: class User extends AppModel { var $name = 'User'; var $useTable = 'users'; } My users_controller starts the same as yours. Sorry maybe someone else has an idea what is wrong. Anja -Ursprüngliche Nachricht- Von: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von xelios Gesendet: Donnerstag, 16. Oktober 2008 10:15 An: CakePHP Betreff: Re: Object not found! error... I didn't find any typo... Following are my files... / */ C:\xampp\htdocs\cake\app\models\user.php ?php class User extends AppModel { var $name = 'User'; } ? / */ / */ C:\xampp\htdocs\cake\app\views\users\register.ctp form action=/users/register method=post pPlease fill out the form below to register an account./p labelUsername:/labelinput name=username size=40 / labelPassword:/labelinput type=password name=password size=40 / labelEmail Address:/labelinput name=email size=40 maxlength=255 / labelFirst Name:/labelinput name=first_name size=40 / labelLast Name:/labelinput name=last_name size=40 / input type=submit value=register / /form / */ / */ C:\xampp\htdocs\cake\app\controllers\users_controller.php ?php class UsersController extends AppController { var $name = 'Users'; var $helpers = array('Html', 'Form' ); function register() { if (!empty($this-params['form'])) { if ($this-User-save($this-params['form'])) { $this-flash('Your registration information was accepted.', '/users/ register'); } else { $this-flash('There was a problem with your registration', '/users/ register'); } } } // END - register } // END - class ? / */ I've a doubt on users_controller.php, may be it is not in an appropriate place. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Sessions lost due to .htaccess and AJAX
I moved the security to medium. I moved the method to 'database' I have a .htaccess that redirects everything from www.domain.com to www.domain.com/1_00/ If I take the htaccess out, everything works. Otherwise, you can login but all AJAX request fails. AJAX request go to www.domain.com/controller/ajax/get will fail saying I dont have admin access because the $_SESSION is gone I have been working on this for hours and don't know what to do any more. please help. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP - Warning - Cannot modify header information - headers already sent by
Try removing any hidden character you may have after the php closing tag (?). Example: ?remove anything after the tag Hope it helps Cheers Marcus On Oct 16, 11:31 am, imu [EMAIL PROTECTED] wrote: controller file is messages_controller.php ?php class MessagesController extends AppController{ var $name = 'Messages'; var $helpers = array ( 'Html', 'Form', 'Time' ); function index($id = null ){ if (!$id) { $this-Session-setFlash('Invalid Topic'); $this-redirect(array ( 'action' = 'index' ), null, true); } $this-Message-recursive = 1; $messages = $this-Message-find('all', array( 'conditions' = array( 'topic_id' = $id ),'order' = 'Message.id DESC') ); $this-set('topic_id',$id); $this-set('messages',$messages); } function add($id = null) { if (!empty ($this-data)) { $this-Message-create(); if ($this-Message-save($this-data)) { $this-Session-setFlash('The message has been added'); $this-redirect(array ( 'action' = 'index' ), null, true); } else { $this-Session-setFlash('message posting failed. Try again.'); } } $users = $this-Message-User-find('list'); $this-set('topic_id',$id); $this-set('users',$users); } } ? - My view file is messages folders in views as add.ctp - ?php echo $form-create('Message',array( 'url' = 'add/'. $topic_id ));? fieldset legendNew topic/legend ?php echo $form-input('message_text'); echo $form-input('user_id'); echo $form-hidden('topic_id',array( 'value' = $topic_id)); ? /fieldset ?php echo $form-end('post a message');? ?php echo $html-link('Go back', array('action'='index')); ? - When I fill up the add form and submit. The data gets inserted into the messages table without any hiccups. But I get an error during redirection back to the index page like this Warning (2): Cannot modify header information - headers already sent by (output started at /opt/lampp/htdocs/cake/message_board/app/ controllers/messages_controller.php:115) [CORE/cake/libs/controller/ controller.php, line 587] Code | Context $status = Location:http://localhost/cake/message_board/messages; header - [internal], line ?? Controller::header() - CORE/cake/libs/controller/controller.php, line 587 Controller::redirect() - CORE/cake/libs/controller/controller.php, line 568 MessagesController::add() - APP/controllers/messages_controller.php, line 54 Object::dispatchMethod() - CORE/cake/libs/object.php, line 116 Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 259 Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 213 [main] - APP/webroot/index.php, line 90 --- The redirection to the index page fails. The parameters supplied in the form in add.ctp was as I expected messages/add/1 which you can see the below code --- form method=post action=/cake/message_board/messages/add/ 1fieldset style=display:none;input type=hidden name=_method value=POST //fieldset fieldset legendNew topic/legend --- Please, help me out with this problem?? Thank you Imranullah Mohammed --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED]
Re: Sessions lost due to .htaccess and AJAX
here is my directory structure: www.domain.com/ 1_00/ app/ views/ root/ login.thtml projects/ new.thtml If i create a Session variable in root controller, i cant see it outside. If i create a session variable outside of root, i can't see it in root. If I remember the htaccess, everything works. here is my htaccess: Options +FollowSymLinks -Indexes RewriteEngine on RewriteCond %{HTTP_HOST} ^domain\.com$ RewriteRule (.*) http://www.domain.com [L] RewriteCond %{REQUEST_URI} !^(/1_00|/tools|/_clients|/_research|/wiki|/ blog) RewriteRule ^(.*)$ 1_00/$1 [L] On Oct 16, 3:35 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I moved the security to medium. I moved the method to 'database' I have a .htaccess that redirects everything fromwww.domain.comtowww.domain.com/1_00/ If I take the htaccess out, everything works. Otherwise, you can login but all AJAX request fails. AJAX request go towww.domain.com/controller/ajax/get will fail saying I dont have admin access because the $_SESSION is gone I have been working on this for hours and don't know what to do any more. please help. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Object not found! error...
It tells your model in which table it should look for your users. Anja -Ursprüngliche Nachricht- Von: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von xelios Gesendet: Donnerstag, 16. Oktober 2008 12:29 An: CakePHP Betreff: Re: Object not found! error... var $useTable = 'users'; Wot is the purpose of above line... --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Object not found! error...
I am working on v1.1.20 now I have created a new view for displaying the users, its working fi9. But the problem I mentioned in my earlier posts is still there.. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
How to use helpers??
Whenever I use helpers, Call to undefined function... error occure. This might be due to declaration issues. I've declared in my controller class. var $helpers = array('Html', 'Form'); but still having problems. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Auth: deleted user still logged in
I found a small problem with the Auth component in my latest cake app: -User is logged in -I'm also logged in and I delete the other user -The other (now non-existing) user is still logged in! Why does Auth not check if a User also exists?! How to fix this? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How to use helpers??
Hi, Whenever I use helpers, Call to undefined function... error occure. This might be due to declaration issues. I've declared in my controller class. var $helpers = array('Html', 'Form'); but still having problems. That's the correct way. Can you provide an example that fails? -- Daniel Hofstetter http://cakebaker.42dh.com --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: internazionalization | gettext not working on production server: any idea?
I updated mu i18n lib from trunk, but it didn't work on 64bit Linux/Suse and 64bit Linux/Ubuntu servers I suggested this hack, that made the all thing work. https://trac.cakephp.org/ticket/3729 Dan On Oct 16, 12:06 am, Larry E. Masters aka PhpNut [EMAIL PROTECTED] wrote: Unless you are using an old version of CakePHP this should have been corrected months ago. -- /** * @author Larry E. Masters * @var string $userName * @param string $realName * @returns string aka PhpNut * @access public */ On Wed, Oct 15, 2008 at 4:14 PM, cakeFreak [EMAIL PROTECTED] wrote: I finally got it: the production servers where 64bits servers, while the development were 32bits. Therefore, here we go:https://trac.cakephp.org/changeset/6149 A small bug that caused the failure in loading the .mo files on 64bits machines! I'm really glad I found the problem, and I hope my post can help somebody else! Dan --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Sending config options to fckconfig.js in fckeditor
Hey all, I've set up FCKeditor using the following code in my helper: ?php class FckHelper extends AppHelper { var $helpers = array('Javascript'); function load( $template = 'default', $height = '300', $width = '650', $toolbar = 'Default' ) { $jsDS = '/'; //because \' only suxx in javascript $js = $this-webroot . 'js' . $jsDS . 'fckeditor' . $jsDS; $skinDir = $js . 'editor' . $jsDS . 'skins' . $jsDS; $templateDir = $skinDir . (is_dir( $skinDir . $template ) ? $template : 'default') . $jsDS; $code = fckLoader = function ( ID ) {; $code .= var bFCKeditor = new FCKeditor( ID );; $code .= bFCKeditor.BasePath = ' . $js . ';; $code .= bFCKeditor.ToolbarSet = ' . $toolbar . ';; $code .= bFCKeditor.SkinPath = ' . $templateDir . ';; $code .= bFCKeditor.Height = . $height . ;; $code .= bFCKeditor.Width = . $width . ;; $code .= bFCKeditor.ReplaceTextarea();; $code .= }; return $this-Javascript-link('fckeditor/fckeditor.js') . $this-Javascript-codeBlock($code); } function editor( $fieldName ) { $seperator = (strstr($fieldName, '.') ? '.' : '/'); $id = Inflector::camelize( str_replace($seperator, '_', $fieldName) ); $code = fckLoader(' . $id . ');; return $this-Javascript-codeBlock($code); } } ? I'm using it with many different users and I'm looking for a way to upload images and store them as webroot/img/userid. Sessions didn't worked so i have hacked into the various files to create a FCKConfig.ImageUploadURL have an extra get variable on the end. It all works fine except i cannot pass the userid to the fckconfig.js. I've tried $code .= bFCKeditor.Config['Testing'] = . $test . ;; and then added to the end of the FCKConfig.ImageUploadURL but it is coming through as undefined. Am i missing something or is there a better way of doing this. I would really appreciate some guidance as I am on the point of throwing out my computer. Many thanks Alex --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: mod_rewrite problem?
Ok. Thanks. I'll check it out this evening. Arndtinho On 16 Okt., 11:03, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: He wanted you to check if a .htaccess file is present (and readable to the webserver) E:/Pfad/zum/Projekt/.htaccess Another thing that could give a clue is to look at the source of the front page of your application. Look at where the css, javascript, images and links point. I would also suggest you point the DocumentRoot to the app/webroot folder of your application. This is generally speaking the best root for a Cake app since all application php files will be outside the exposed folders. It may also fix your problem... at least that setup has never failed to work for me. /Martin On Oct 16, 8:35 am, Arndtinho [EMAIL PROTECTED] wrote: Hello, thanks for your answer. What do you mean with .htaccess in your webroot virtual site? I have in my apache config following: AccessFileName .htaccess Or should it be in the virtual host configuration? Regards Arndtinho On 16 Okt., 01:00, francky06l [EMAIL PROTECTED] wrote: Usually mod-rewrite is in the htaccess, be sure you have proper .htaccess in your webroot virtual site (you can also turn on the rewrite log on apache, and check if something is wrong).. hth On Oct 15, 10:13 pm, Arndtinho [EMAIL PROTECTED] wrote: Hello, I reconfigured my new workstation with Cake. Following transfering my projects I tested one. But the site is displayed without the CSS definitions and the includes. I was first exposed mod_rewrite is disabled but it's enabled. And if I callhttp://myproject/css/main.css, the content of the css file is displayed at the browser. What could be the reason for this behavior? Here my virtual host configuration: VirtualHost *:80 ServerAdmin [EMAIL PROTECTED] DocumentRoot E:/Pfad/zum/Projekt ServerName myproject ServerAlias 127.0.0.1 ErrorLog E:/Pfad/zum/Projekt/logfiles/profil_error.log CustomLog E:/Pfad/zum/Projekt/logfiles/profil_access.log common Directory E:/Pfad/zum/Projekt/ AllowOverride All Options +FollowSymLinks Order deny,allow Allow from all Satisfy all /Directory /VirtualHost System: WinXP, Apache2 (mod_rewrite enabled), CakePHP 1.1 Regards Arndtinho- Zitierten Text ausblenden - - Zitierten Text anzeigen -- Zitierten Text ausblenden - - Zitierten Text anzeigen - --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Any one Familiar with XML/SWF charts usage in Cakephp
I have the same question. Did you figure this out? On Sep 4, 3:06 am, vibhor [EMAIL PROTECTED] wrote: Hello all, I am looking to integrate the XML/SWF charts(http://www.maani.us/xml_charts/ ) feature in my cakephp application. I have read Chris Hartjes's tutorial (http://www.littlehart.net/atthekeyboard/2006/09/26/tutorial-integrati... ) but he is using the PHP/SWF implementation.(thanks Chris for excellent tutorial! ). I just want to know which files of the charts go where in the cakephp application folder structure. I think once this is sorted out we can post this in the bakery for other bakers who can use this wonderful stuff in their application.. Can someone please help me in this? Thanks, Vibhor --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
xmlwriter
Hi Siegfried! Good idea! I will inhale this tutorial :-) If I get it right finally I even might write an own tutorial for export ;-) Anja -Ursprüngliche Nachricht- Von: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von Siegfried Hirsch Gesendet: Donnerstag, 16. Oktober 2008 10:38 An: cake-php@googlegroups.com Betreff: Re: xmlwriter Take a look at this bakery article about Sitemaps, which are dynamisch XML files generated from different models using find('all') http://bakery.cakephp.org/articles/view/automatically-generate-dynamic-sitemaps I think there you have all your answers. On Thu, Oct 16, 2008 at 8:29 AM, Liebermann, Anja Carolin [EMAIL PROTECTED] wrote: Hello everybody, hi Franky, Thanks for your reply! So XML seams to be a core helper. But I don't understand from where I get it working. Am I right if I use it in my controller? I tried this in my_controller.php: var $helpers = array('Html', 'Form', 'Javascript', 'Xml'); function xmlExport(){ $xml = new XmlHelper(); } This gives me the error: Fatal error: Class 'XmlHelper' not found in my_controller.php on line 353 What do I do wrong? Installatioan questions: Does anyone know if I have to install expat seperately or if it comes with cake? I guess not... And if not, how can I get cake to work with it? Webservices: I found this tutorial: http://www.littlehart.net/atthekeyboard/2006/11/29/using-cakephps-nati ve-web-service-support/ But it seems to be for Cake1.1 and I have galdly migrated to cake1.2 RC3 A Mysql export to XML wouldn't help because, what I need is a XML document which contains the information of about 5-10 connected tables in my database. Thanks for any hint and help! Anja -Ursprüngliche Nachricht- Von: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von francky06l Gesendet: Donnerstag, 16. Oktober 2008 00:55 An: CakePHP Betreff: Re: xmlwriter Well check the xml helper and serialize method, if DB is big you might have to paginate it .. I also believe that mysqldump can dump xml (not sure thought)... On Oct 14, 5:46 pm, Liebermann, Anja Carolin [EMAIL PROTECTED] wrote: I would be interested as well in any help on this topic. The cookbook isn't very verbose on this:http://manual.cakephp.org/view/623/Xml In the end I would like to make an XML export out of my database, but at the moment I don't know how to get expat on my development server (WinXP) or on my production environment (Linux). And I have no clue how to talk to expat or if cake does it for me. Thanks for any help, hints and links in advance! Anja Von: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von . Gesendet: Sonntag, 12. Oktober 2008 05:53 An: Cake PHP Betreff: xmlwriter has anybody worked with xmlwriter (or similar) with cakephp? thanks -- Siegfried Hirsch hhS - Welserstr. 1 - 81373 München - (089) 5484 3564 - skype:shirsch Fax +49 - (0)89 - 943 992 698 - http://www.rss-blogger.de http://www.newsbee.de NewsBee 2 - customized RSS solutions http://abo-stop.de jetzt mit kostenlosem Kündigungsgenerator --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Error in $ajax-remoteTimer
i have use $ajax-remoteTimer in my project , in that project my statement like echo $ajax-remoteTimer( array( 'url' = array( 'controller' = 'Users', 'action' = 'liveuser', 1 ), 'update' = 'out2', 'position' = 'bottom', 'frequency' = 20, 'loading' ='divbottom()' )); but in that statement i found list of error like (1) Warning (2): unlink(C:\xampp\htdocs\cake_1.2.0.7296-rc2\app\tmp\cache\ \persistent\cake_core_core_paths) [function.unlink]: Permission denied [CORE\cake\libs\file.php, line 278] (2) unserialize() [function.unserialize]: Error at offset 0 of 14 bytes [CORE\cake\libs\cache\file.php, line 184] what is solutuion of this error? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: mod_rewrite problem?
He wanted you to check if a .htaccess file is present (and readable to the webserver) E:/Pfad/zum/Projekt/.htaccess Another thing that could give a clue is to look at the source of the front page of your application. Look at where the css, javascript, images and links point. I would also suggest you point the DocumentRoot to the app/webroot folder of your application. This is generally speaking the best root for a Cake app since all application php files will be outside the exposed folders. It may also fix your problem... at least that setup has never failed to work for me. /Martin On Oct 16, 8:35 am, Arndtinho [EMAIL PROTECTED] wrote: Hello, thanks for your answer. What do you mean with .htaccess in your webroot virtual site? I have in my apache config following: AccessFileName .htaccess Or should it be in the virtual host configuration? Regards Arndtinho On 16 Okt., 01:00, francky06l [EMAIL PROTECTED] wrote: Usually mod-rewrite is in the htaccess, be sure you have proper .htaccess in your webroot virtual site (you can also turn on the rewrite log on apache, and check if something is wrong).. hth On Oct 15, 10:13 pm, Arndtinho [EMAIL PROTECTED] wrote: Hello, I reconfigured my new workstation with Cake. Following transfering my projects I tested one. But the site is displayed without the CSS definitions and the includes. I was first exposed mod_rewrite is disabled but it's enabled. And if I callhttp://myproject/css/main.css, the content of the css file is displayed at the browser. What could be the reason for this behavior? Here my virtual host configuration: VirtualHost *:80 ServerAdmin [EMAIL PROTECTED] DocumentRoot E:/Pfad/zum/Projekt ServerName myproject ServerAlias 127.0.0.1 ErrorLog E:/Pfad/zum/Projekt/logfiles/profil_error.log CustomLog E:/Pfad/zum/Projekt/logfiles/profil_access.log common Directory E:/Pfad/zum/Projekt/ AllowOverride All Options +FollowSymLinks Order deny,allow Allow from all Satisfy all /Directory /VirtualHost System: WinXP, Apache2 (mod_rewrite enabled), CakePHP 1.1 Regards Arndtinho- Zitierten Text ausblenden - - Zitierten Text anzeigen - --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Object not found! error...
var $useTable = 'users'; Wot is the purpose of above line... --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Object not found! error...
I am working on v1.1.20 now I have created a new view for displaying the users, its working fi9. But the problem I mentioned in my earlier posts is still there.. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP - Warning - Cannot modify header information - headers already sent by
Thanks Marcus Now its working. On Oct 16, 4:05 pm, Marcus Silva [EMAIL PROTECTED] wrote: Try removing any hidden character you may have after the php closing tag (?). Example: ?remove anything after the tag Hope it helps Cheers Marcus On Oct 16, 11:31 am, imu [EMAIL PROTECTED] wrote: controller file is messages_controller.php ?php class MessagesController extends AppController{ var $name = 'Messages'; var $helpers = array ( 'Html', 'Form', 'Time' ); function index($id = null ){ if (!$id) { $this-Session-setFlash('Invalid Topic'); $this-redirect(array ( 'action' = 'index' ), null, true); } $this-Message-recursive = 1; $messages = $this-Message-find('all', array( 'conditions' = array( 'topic_id' = $id ),'order' = 'Message.id DESC') ); $this-set('topic_id',$id); $this-set('messages',$messages); } function add($id = null) { if (!empty ($this-data)) { $this-Message-create(); if ($this-Message-save($this-data)) { $this-Session-setFlash('The message has been added'); $this-redirect(array ( 'action' = 'index' ), null, true); } else { $this-Session-setFlash('message posting failed. Try again.'); } } $users = $this-Message-User-find('list'); $this-set('topic_id',$id); $this-set('users',$users); } } ? - My view file is messages folders in views as add.ctp - ?php echo $form-create('Message',array( 'url' = 'add/'. $topic_id ));? fieldset legendNew topic/legend ?php echo $form-input('message_text'); echo $form-input('user_id'); echo $form-hidden('topic_id',array( 'value' = $topic_id)); ? /fieldset ?php echo $form-end('post a message');? ?php echo $html-link('Go back', array('action'='index')); ? - When I fill up the add form and submit. The data gets inserted into the messages table without any hiccups. But I get an error during redirection back to the index page like this Warning (2): Cannot modify header information - headers already sent by (output started at /opt/lampp/htdocs/cake/message_board/app/ controllers/messages_controller.php:115) [CORE/cake/libs/controller/ controller.php, line 587] Code | Context $status = Location:http://localhost/cake/message_board/messages; header - [internal], line ?? Controller::header() - CORE/cake/libs/controller/controller.php, line 587 Controller::redirect() - CORE/cake/libs/controller/controller.php, line 568 MessagesController::add() - APP/controllers/messages_controller.php, line 54 Object::dispatchMethod() - CORE/cake/libs/object.php, line 116 Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 259 Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 213 [main] - APP/webroot/index.php, line 90 --- The redirection to the index page fails. The parameters supplied in the form in add.ctp was as I expected messages/add/1 which you can see the below code --- form method=post action=/cake/message_board/messages/add/ 1fieldset style=display:none;input type=hidden name=_method value=POST //fieldset fieldset legendNew topic/legend --- Please, help me out with this problem?? Thank you Imranullah Mohammed --~--~-~--~~~---~--~~ You received this
CakePHP - Warning - Cannot modify header information - headers already sent by
controller file is messages_controller.php ?php class MessagesController extends AppController{ var $name = 'Messages'; var $helpers = array ( 'Html', 'Form', 'Time' ); function index($id = null ){ if (!$id) { $this-Session-setFlash('Invalid Topic'); $this-redirect(array ( 'action' = 'index' ), null, true); } $this-Message-recursive = 1; $messages = $this-Message-find('all', array( 'conditions' = array( 'topic_id' = $id ),'order' = 'Message.id DESC') ); $this-set('topic_id',$id); $this-set('messages',$messages); } function add($id = null) { if (!empty ($this-data)) { $this-Message-create(); if ($this-Message-save($this-data)) { $this-Session-setFlash('The message has been added'); $this-redirect(array ( 'action' = 'index' ), null, true); } else { $this-Session-setFlash('message posting failed. Try again.'); } } $users = $this-Message-User-find('list'); $this-set('topic_id',$id); $this-set('users',$users); } } ? - My view file is messages folders in views as add.ctp - ?php echo $form-create('Message',array( 'url' = 'add/'. $topic_id ));? fieldset legendNew topic/legend ?php echo $form-input('message_text'); echo $form-input('user_id'); echo $form-hidden('topic_id',array( 'value' = $topic_id)); ? /fieldset ?php echo $form-end('post a message');? ?php echo $html-link('Go back', array('action'='index')); ? - When I fill up the add form and submit. The data gets inserted into the messages table without any hiccups. But I get an error during redirection back to the index page like this Warning (2): Cannot modify header information - headers already sent by (output started at /opt/lampp/htdocs/cake/message_board/app/ controllers/messages_controller.php:115) [CORE/cake/libs/controller/ controller.php, line 587] Code | Context $status = Location: http://localhost/cake/message_board/messages; header - [internal], line ?? Controller::header() - CORE/cake/libs/controller/controller.php, line 587 Controller::redirect() - CORE/cake/libs/controller/controller.php, line 568 MessagesController::add() - APP/controllers/messages_controller.php, line 54 Object::dispatchMethod() - CORE/cake/libs/object.php, line 116 Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 259 Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 213 [main] - APP/webroot/index.php, line 90 --- The redirection to the index page fails. The parameters supplied in the form in add.ctp was as I expected messages/add/1 which you can see the below code --- form method=post action=/cake/message_board/messages/add/ 1fieldset style=display:none;input type=hidden name=_method value=POST //fieldset fieldset legendNew topic/legend --- Please, help me out with this problem?? Thank you Imranullah Mohammed --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How to use helpers??
Hi, My controller file:: // ?php class TasksController extends AppController { var $name = 'Tasks'; var $helpers = array('Html', 'Form'); function index() { $this-set('tasks', $this-Task-findAll()); } function add() { if (!empty($this-data)) { $this-Task-create(); if ($this-Task-save($this-data)) { $this-Session-setFlash('The Task has been saved'); $this-redirect(array('action'='index'), null, true); } else { $this-Session-setFlash('Task not saved. Try again.'); } } } } // END - class ? // My View page add.ctp... // ?php echo $form-create('Task');? fieldset legendAdd New Task/legend ?php echo $form-input('title'); echo $form-input('done'); ? /fieldset ?php echo $form-end('Add Task'); ? // on browsing page add that error occures Hm, what CakePHP version do you use? (see cake/VERSION.txt) And what's the exact error message you get? -- Daniel Hofstetter http://cakebaker.42dh.com --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How to use helpers??
My controller file:: // ?php class TasksController extends AppController { var $name = 'Tasks'; var $helpers = array('Html', 'Form'); function index() { $this-set('tasks', $this-Task-findAll()); } function add() { if (!empty($this-data)) { $this-Task-create(); if ($this-Task-save($this-data)) { $this-Session-setFlash('The Task has been saved'); $this-redirect(array('action'='index'), null, true); } else { $this-Session-setFlash('Task not saved. Try again.'); } } } } // END - class ? // My View page add.ctp... // ?php echo $form-create('Task');? fieldset legendAdd New Task/legend ?php echo $form-input('title'); echo $form-input('done'); ? /fieldset ?php echo $form-end('Add Task'); ? // on browsing page add that error occures --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Paginator with multiple parameters
Hello everybody, It looks like I have found a bug : I have a complex query with an action whcih contains several parameters whcih I would liek to keep when I use the sorting functionality in the view. I found a ticket on this: https://trac.cakephp.org/ticket/2099 This seems to solve my problem, but before I apply patches and mess up my cake installation I would like to know first if anybody knows if this was fixed in RC3? At the moment I have this function, which doesn't pass the parameters on when the result is sorted by clicking on the table header: function getBilder($id = null, $produkt = null, $master = null) { //.. Some code..// $paginator_params = array(); $paginator_params['controller'] = 'bilds'; $paginator_params['action'] = $this-action.'/'.$id.'/'.$produkt.'/'.$master; $this-paginate['Bild'] = array( 'limit' = 10, 'order' = array ('Bild.name' = 'asc'), 'url' = $paginator_params //'url' = $this-passedArgs ); //some more code $this-set(compact('produkt','master','textarten','bilds', 'paginator_params','data')); } Greetings Anja --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: complex query : HABTM Association between multiple model
Hi, I know what query can return my answer..it's here: SELECT `Product`.`id`, `Product`.`product_name`, `Brand`.`brand_name`, `Brand`.`id`, `ProductsUser`.`user_id`, `ProductsUser`.`product_id` FROM `products` AS `Product` JOIN `products_users` AS `ProductsUser` ON (`ProductsUser`.`user_id` = 2 AND `ProductsUser`.`product_id` = `Product`.`id`) JOIN `brands_products` AS `BrandsProduct` ON (`BrandsProduct`.`product_id` = `Product`.`id`) JOIN `brands` AS `Brand` ON (`Brand`.`id` = `BrandsProduct`.`brand_id`) WHERE 1 = 1 This query is working fine but I don't know how to write it in CakePHP... I found all products accordingly users by using Containable behavior but can not find complete solution. code is: $this-User-contain(array('Product')); debug($this-User-find('all', array('conditions' = array('User.id' = $this-Auth-user('id'); But now don't know how to find all brands accordingly a users product? Is CakePHP very complex for writing function for such query..because I am trying it from last two days also no body is replaying me. Please tell me how should I go ahead with this? Thanks On Oct 16, 12:18 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Sorry, I forget that I used this solution but could not succeed $brands = $this-User-Product-Brand-find('all',array( 'fields' = array('Brand.id','Brand.brand_name'), 'conditions' = array('User.id' = $this-Auth-user('id')), 'recersive' = 0) ); Please help me On Oct 16, 12:15 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I have three Model with following association 1 User 2 Product 3 Brand User HABTM (brands_users)--Brand Brand---HABTM (brands_products)--Product User---HABTM (products_users)--Product I want to find a list of all brands which product had been selected by a user. Means first user select some products then he will be select brands. So I am unable to display all brands accordingly user's products Thanks a lot you for my help --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Sessions lost due to .htaccess and AJAX
*If I remove the htaccess, everything works. On Oct 16, 6:26 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: here is my directory structure:www.domain.com/ 1_00/ app/ views/ root/ login.thtml projects/ new.thtml If i create a Session variable in root controller, i cant see it outside. If i create a session variable outside of root, i can't see it in root. If I remember the htaccess, everything works. here is my htaccess: Options +FollowSymLinks -Indexes RewriteEngine on RewriteCond %{HTTP_HOST} ^domain\.com$ RewriteRule (.*)http://www.domain.com[L] RewriteCond %{REQUEST_URI} !^(/1_00|/tools|/_clients|/_research|/wiki|/ blog) RewriteRule ^(.*)$ 1_00/$1 [L] On Oct 16, 3:35 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I moved the security to medium. I moved the method to 'database' I have a .htaccess that redirects everything fromwww.domain.comtowww.domain.com/1_00/ If I take the htaccess out, everything works. Otherwise, you can login but all AJAX request fails. AJAX request go towww.domain.com/controller/ajax/get will fail saying I dont have admin access because the $_SESSION is gone I have been working on this for hours and don't know what to do any more. please help. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Problem with using Helpers Call to undefined method FormHelper::create()...
Following is the code of my register.ctp page... / ***/ pPlease fill out the form below to register an account./p ?php echo $form-create('User', array('action' = 'register'));? ?php echo $form-input('first_name'); echo $form-input('last_name'); echo $form-input('username'); echo $form-input('email'); echo $form-input('password'); ? ?php echo $form-end('Register');? / ***/ Its throwing following error: Fatal error: Call to undefined method FormHelper::create() in C:\xampp \htdocs\cake\app\views\users\register.ctp on line 2 --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
testAction data not resetting between tests
I'm trying to write test cases using testAction, but I can't seem to break down the controller in between tests. Each successive testAction call returns the same exact data, even if I call a completely made up url. I've tried including calls to create/ construct/unset $this-UndeliverablesController in startTest/endTest, but that doesn't seem to help. Any ideas please? Thanks, Ethan --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CAKEPHP Job
Hello Marcus I am intrested to work for you let me know how much you offer if have done all the features for you? On Oct 15, 2:48 pm, marcusgoede [EMAIL PROTECTED] wrote: Hi there, we are a young startup in Germany and develope an internet plattform for flights. we started already programming the site with cakephp but some help would be great before our launch in december/january. if you are interested in programming some cool features for our project, let me know! Thanks Brgds Marcus --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Multilingual Support still not working in RC3
i hoped this got fixed in RC3, but i had to discover, that MAX/MINLENGTH and BETWEEN are still not validating correctly although i did include the following in bootstrap: App::import('Core','Multibyte'); it does not change the normal str functions to mb_str functions i do NOT understand the usage of the old normal functions anyway lets say, somebody types a german Ä into a form that has a field which requires at least 2 characters. without proper usage of mb_ the form would return OK here, so even for all those american cake people out there, it would make sense to change to the multibyte functions anyway.. does anybody know how to get this to work? am i still missing something? as the multibyte.php and its functions should be already included now i am still at the point from 5 months ago, which means hardcoded changes in the /cake/libs/ folder in order to get it to work BEFORE: function between($check, $min, $max) { $length = strlen($check); if ($length = $min $length = $max) { return true; } else { return false; } } AFTER: function between($check, $min, $max) { $length = mb_strlen($check,'UTF-8');// HACK to get it to work properly!!! if ($length = $min $length = $max) { return true; } else { return false; } } --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Object not found! error...
Also good to note that you should be building your form inputs with the cake html and form helpers if you want the forms to work, as in the tutorials. -Mark On Oct 16, 9:22 am, scs [EMAIL PROTECTED] wrote: if your using cake 1.1 like you said above than your view has the wrong extension. C:\xampp\htdocs\cake\app\views\users\register.ctp should be C:\xampp\htdocs\cake\app\views\users\register.thtml On Oct 16, 7:55 am, Liebermann, Anja Carolin [EMAIL PROTECTED] wrote: It tells your model in which table it should look for your users. Anja -Ursprüngliche Nachricht- Von: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von xelios Gesendet: Donnerstag, 16. Oktober 2008 12:29 An: CakePHP Betreff: Re: Object not found! error... var $useTable = 'users'; Wot is the purpose of above line... --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: complex query : HABTM Association between multiple model
Hi, I know what query can return my answer..it's here: SELECT `Product`.`id`, `Product`.`product_name`, `Brand`.`brand_name`, `Brand`.`id`, `ProductsUser`.`user_id`, `ProductsUser`.`product_id` FROM `products` AS `Product` JOIN `products_users` AS `ProductsUser` ON (`ProductsUser`.`user_id` = 2 AND `ProductsUser`.`product_id` = `Product`.`id`) JOIN `brands_products` AS `BrandsProduct` ON (`BrandsProduct`.`product_id` = `Product`.`id`) JOIN `brands` AS `Brand` ON (`Brand`.`id` = `BrandsProduct`.`brand_id`) WHERE 1 = 1 This query is working fine but I don't know how to write it in CakePHP... I found all products accordingly users by using Containable behavior but can not find complete solution. code is: $this-User-contain(array('Product')); debug($this-User-find('all', array('conditions' = array('User.id' = $this-Auth-user('id'); But now don't know how to find all brands accordingly a users product? Is CakePHP very complex for writing function for such query..because I am trying it from last two days also no body is replaying me. Please tell me how should I go ahead with this? Thanks On Oct 16, 12:18 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Sorry, I forget that I used this solution but could not succeed $brands = $this-User-Product-Brand-find('all',array( 'fields' = array('Brand.id','Brand.brand_name'), 'conditions' = array('User.id' = $this-Auth-user('id')), 'recersive' = 0) ); Please help me On Oct 16, 12:15 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I have three Model with following association 1 User 2 Product 3 Brand User HABTM (brands_users)--Brand Brand---HABTM (brands_products)--Product User---HABTM (products_users)--Product I want to find a list of all brands which product had been selected by a user. Means first user select some products then he will be select brands. So I am unable to display all brands accordingly user's products Thanks a lot you for my help --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Object not found! error...
if your using cake 1.1 like you said above than your view has the wrong extension. C:\xampp\htdocs\cake\app\views\users\register.ctp should be C:\xampp\htdocs\cake\app\views\users\register.thtml On Oct 16, 7:55 am, Liebermann, Anja Carolin [EMAIL PROTECTED] wrote: It tells your model in which table it should look for your users. Anja -Ursprüngliche Nachricht- Von: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von xelios Gesendet: Donnerstag, 16. Oktober 2008 12:29 An: CakePHP Betreff: Re: Object not found! error... var $useTable = 'users'; Wot is the purpose of above line... --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Any one Familiar with XML/SWF charts usage in Cakephp
My issue is.. I have the controller and views working to properly output xml data at a particular URL using routing. However, XML/SWF needs a physical file location for the xml_source being passed through FlashVars. How to go about doing this? On Oct 16, 10:08 am, Daehee [EMAIL PROTECTED] wrote: I have the same question. Did you figure this out? On Sep 4, 3:06 am, vibhor [EMAIL PROTECTED] wrote: Hello all, I am looking to integrate the XML/SWF charts(http://www.maani.us/xml_charts/ ) feature in my cakephp application. I have read Chris Hartjes's tutorial (http://www.littlehart.net/atthekeyboard/2006/09/26/tutorial-integrati... ) but he is using the PHP/SWF implementation.(thanks Chris for excellent tutorial! ). I just want to know which files of the charts go where in the cakephp application folder structure. I think once this is sorted out we can post this in the bakery for other bakers who can use this wonderful stuff in their application.. Can someone please help me in this? Thanks, Vibhor --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Naming Conventions
Hello all, I have a cake application that I need to add an existing table to that doesn't follow the cake naming convention and I am unable to change the table name so my question is, how do I work around this. For example, the table name is service (rather than services) so do to this, I can not figure out how to name the controller, controller class or if this is even possible? Is there a way to do this where the naming conventions are not used on all tables? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: testAction data not resetting between tests
testAction simulates a url request, there is no need to unset the controller as it doesn't get set to the test case. Should the results come back differently. Please explain more. -Mark On Oct 16, 11:40 am, [EMAIL PROTECTED] wrote: I am not sure that i understand what you are testing? I undertand the problem just not what you are testing. On 10/16/2008, Chowsapal [EMAIL PROTECTED] wrote: I'm trying to write test cases using testAction, but I can't seem to break down the controller in between tests. Each successive testAction call returns the same exact data, even if I call a completely made up url. I've tried including calls to create/ construct/unset $this-UndeliverablesController in startTest/endTest, but that doesn't seem to help. Any ideas please? Thanks, Ethan -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: testAction data not resetting between tests
Well with urls always changeing wont the results change anyways? On 10/16/2008, mark_story [EMAIL PROTECTED] wrote: testAction simulates a url request, there is no need to unset the controller as it doesn't get set to the test case. Should the results come back differently. Please explain more. -Mark On Oct 16, 11:40 am, [EMAIL PROTECTED] wrote: I am not sure that i understand what you are testing? I undertand the problem just not what you are testing. On 10/16/2008, Chowsapal [EMAIL PROTECTED] wrote: I'm trying to write test cases using testAction, but I can't seem to break down the controller in between tests. Each successive testAction call returns the same exact data, even if I call a completely made up url. I've tried including calls to create/ construct/unset $this-UndeliverablesController in startTest/endTest, but that doesn't seem to help. Any ideas please? Thanks, Ethan -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: testAction data not resetting between tests
I am not sure that i understand what you are testing? I undertand the problem just not what you are testing. On 10/16/2008, Chowsapal [EMAIL PROTECTED] wrote: I'm trying to write test cases using testAction, but I can't seem to break down the controller in between tests. Each successive testAction call returns the same exact data, even if I call a completely made up url. I've tried including calls to create/ construct/unset $this-UndeliverablesController in startTest/endTest, but that doesn't seem to help. Any ideas please? Thanks, Ethan -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Index libraries for Word, Pdf, Rtf, etc... files
Good luck finding that your request is hard to handel concidering the compatibility issue. But i suppose that we could look around and get back to you. Why does it have to be on linux.. what is the problem with wxp? On 10/16/2008, oleonav [EMAIL PROTECTED] wrote: Hi there, In my development setup I am using some shell programs to index different kind of files via the exec command in php/cake. for example: - Word files - using antiword - Pdf files - using pdftotext This works fine. But now we have to move the app to a production environment which does not support using shell commands at all. Does anyone has some links to free available libraries or classes which can be used in php/cake for indexing the text contents of file formats liks word, pdf, rtf excel, etc... These libraries need to function on a Linux platform. So using Windows MS based solutions is not an option. Any help would be great! -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Index libraries for Word, Pdf, Rtf, etc... files
Hi there, In my development setup I am using some shell programs to index different kind of files via the exec command in php/cake. for example: - Word files - using antiword - Pdf files - using pdftotext This works fine. But now we have to move the app to a production environment which does not support using shell commands at all. Does anyone has some links to free available libraries or classes which can be used in php/cake for indexing the text contents of file formats liks word, pdf, rtf excel, etc... These libraries need to function on a Linux platform. So using Windows MS based solutions is not an option. Any help would be great! --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Auth: deleted user still logged in
Well it could be a little hack. When you delete the user make sure that user is first sighed out or the information may still be there allowing that user to delete you or change info. On 10/16/2008, on24nl [EMAIL PROTECTED] wrote: I found a small problem with the Auth component in my latest cake app: -User is logged in -I'm also logged in and I delete the other user -The other (now non-existing) user is still logged in! Why does Auth not check if a User also exists?! How to fix this? -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Auth: deleted user still logged in
That's the whole problem: how to sign him out? Cake should check if the user exists on each request. Otherwise this is a big security hole! On 16 okt, 18:33, [EMAIL PROTECTED] wrote: Well it could be a little hack. When you delete the user make sure that user is first sighed out or the information may still be there allowing that user to delete you or change info. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Auth: deleted user still logged in
Go under his account and delete him! Will that work? On 10/16/2008, on24nl [EMAIL PROTECTED] wrote: That's the whole problem: how to sign him out? Cake should check if the user exists on each request. Otherwise this is a big security hole! On 16 okt, 18:33, [EMAIL PROTECTED] wrote: Well it could be a little hack. When you delete the user make sure that user is first sighed out or the information may still be there allowing that user to delete you or change info. -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Naming Conventions
Should be able to do this in the model. Class Service extends AppModel { var $useTable = 'service'; } On Oct 16, 4:48 pm, MDB [EMAIL PROTECTED] wrote: Hello all, I have a cake application that I need to add an existing table to that doesn't follow the cake naming convention and I am unable to change the table name so my question is, how do I work around this. For example, the table name is service (rather than services) so do to this, I can not figure out how to name the controller, controller class or if this is even possible? Is there a way to do this where the naming conventions are not used on all tables? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Naming Conventions
Hello, Just specify it in your model. class Example extends AppModel { var $useTable = 'othername'; } Regars, Jeroen On 16 okt, 17:48, MDB [EMAIL PROTECTED] wrote: Hello all, I have a cake application that I need to add an existing table to that doesn't follow the cake naming convention and I am unable to change the table name so my question is, how do I work around this. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Naming Conventions
Thanks On Oct 16, 12:44 pm, on24nl [EMAIL PROTECTED] wrote: Hello, Just specify it in your model. class Example extends AppModel { var $useTable = 'othername'; } Regars, Jeroen On 16 okt, 17:48, MDB [EMAIL PROTECTED] wrote: Hello all, I have a cake application that I need to add an existing table to that doesn't follow the cake naming convention and I am unable to change the table name so my question is, how do I work around this.- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: testAction data not resetting between tests
Right now I'm just trying to test the view vars depending on whether or not you post data to the url, but all successive calls to testAction are getting the same (original) results. It sounds like you're saying I shouldn't have to do anything to get fresh results. Any idea why I'm getting repeats then? Could it be caching or something? On Oct 16, 11:57 am, [EMAIL PROTECTED] wrote: Well with urls always changeing wont the results change anyways? On 10/16/2008, mark_story [EMAIL PROTECTED] wrote: testAction simulates a url request, there is no need to unset the controller as it doesn't get set to the test case. Should the results come back differently. Please explain more. -Mark On Oct 16, 11:40 am, [EMAIL PROTECTED] wrote: I am not sure that i understand what you are testing? I undertand the problem just not what you are testing. On 10/16/2008, Chowsapal [EMAIL PROTECTED] wrote: I'm trying to write test cases using testAction, but I can't seem to break down the controller in between tests. Each successive testAction call returns the same exact data, even if I call a completely made up url. I've tried including calls to create/ construct/unset $this-UndeliverablesController in startTest/endTest, but that doesn't seem to help. Any ideas please? Thanks, Ethan -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Any one Familiar with XML/SWF charts usage in Cakephp
I have not done exactly that but I have done the same type of thing with my own Flash-applications and even a java-applet You have the view for the page displaying the chart. All this does is embed the chart and create the link to the chart xml. From the sample.html it would be altering the FlashVars line like this: 'FlashVars', 'library_path=charts_libraryxml_source=/controller/ xmloutput/id', Flash does not care about the extension so you shouldn't even have to do any trickery at all. And on the web the client can never really know if it is getting Cake of a physical file. As long at you generate that url dynamically so it can contain an id or other identifier you can re-use the same actions as normal. Then of-course you have the action outputting your xml which is where you direct xml_source to look. Just make sure this action does not output any nonsense (debug = 0) and you should be good to go. You may have to set the headers to xml but I don't think so. Hope some of this was useful. /Martin On Oct 16, 5:35 pm, Daehee [EMAIL PROTECTED] wrote: My issue is.. I have the controller and views working to properly output xml data at a particular URL using routing. However, XML/SWF needs a physical file location for the xml_source being passed through FlashVars. How to go about doing this? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: testAction data not resetting between tests
Yes or the cookies. Delete them. On 10/16/2008, Chowsapal [EMAIL PROTECTED] wrote: Right now I'm just trying to test the view vars depending on whether or not you post data to the url, but all successive calls to testAction are getting the same (original) results. It sounds like you're saying I shouldn't have to do anything to get fresh results. Any idea why I'm getting repeats then? Could it be caching or something? On Oct 16, 11:57 am, [EMAIL PROTECTED] wrote: Well with urls always changeing wont the results change anyways? On 10/16/2008, mark_story [EMAIL PROTECTED] wrote: testAction simulates a url request, there is no need to unset the controller as it doesn't get set to the test case. Should the results come back differently. Please explain more. -Mark On Oct 16, 11:40 am, [EMAIL PROTECTED] wrote: I am not sure that i understand what you are testing? I undertand the problem just not what you are testing. On 10/16/2008, Chowsapal [EMAIL PROTECTED] wrote: I'm trying to write test cases using testAction, but I can't seem to break down the controller in between tests. Each successive testAction call returns the same exact data, even if I call a completely made up url. I've tried including calls to create/ construct/unset $this-UndeliverablesController in startTest/endTest, but that doesn't seem to help. Any ideas please? Thanks, Ethan -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Any one Familiar with XML/SWF charts usage in Cakephp
If you make your controller export xml to a location app/webroot/xml/ then make an action to gather then you can have flash access the exported file. set the base param of the flash object to you webroot, setting the file passed to flash as something like xml/exported-data.xml I have made a simple ticker (flashes one line of text across the screen at a time) that accesses a controller action tickers/index.txt (using parseExtensions) - setting the flashvar to tickerFile=tickers.txt (with a customised route) all is working well as far as I see - S 2008/10/16 Daehee [EMAIL PROTECTED] My issue is.. I have the controller and views working to properly output xml data at a particular URL using routing. However, XML/SWF needs a physical file location for the xml_source being passed through FlashVars. How to go about doing this? On Oct 16, 10:08 am, Daehee [EMAIL PROTECTED] wrote: I have the same question. Did you figure this out? On Sep 4, 3:06 am, vibhor [EMAIL PROTECTED] wrote: Hello all, I am looking to integrate the XML/SWF charts( http://www.maani.us/xml_charts/ ) feature in my cakephp application. I have read Chris Hartjes's tutorial ( http://www.littlehart.net/atthekeyboard/2006/09/26/tutorial-integrati... ) but he is using the PHP/SWF implementation.(thanks Chris for excellent tutorial! ). I just want to know which files of the charts go where in the cakephp application folder structure. I think once this is sorted out we can post this in the bakery for other bakers who can use this wonderful stuff in their application.. Can someone please help me in this? Thanks, Vibhor --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
'page' option with find()
In the Cake Book and the Cake api 'page' is listed as a possible option for find queries. Neither place really explains what that is. I assumed it would serve as a manual way of dealing with pagination. Since I couldn't figure out how to make the paginator work with my site's architecture, I was trying to use containable to limit/paginate for me. I thought if I had 'limit' = 10 and 'page' = 2 I'd get rows 11 -20. If that is the intent of the page option, it doesn't seem to work with containable. (I haven't tried it outside of a containable context). return $this-find( all, array( 'conditions' = array('Gallery.id' = $gallery_id), 'contain' = array( 'Photo' = array( 'order' = 'Photo.created DESC', 'limit' = $this-thumbsPerPage, 'page' = $page ) ) ) ); generates this SQL: SELECT `Photo`.`page`, `GalleriesPhoto`.`gallery_id`, `GalleriesPhoto`.`photo_id` FROM `photos` AS `Photo` JOIN `galleries_photos` AS `GalleriesPhoto` ON (`GalleriesPhoto`.`gallery_id` = 7 AND `GalleriesPhoto`.`photo_id` = `Photo`.`id`) WHERE 1 = 1 ORDER BY `Photo`.`created` DESC LIMIT 12 As you can see it is trying to put 'page' in as if I had said 'fields' = array('page') and completely ignoring the value of $page. There is no 'page' column in Photo so naturally the query is failing. If I pull out the page option, the query runs just fine, but I have obviously lost the ability to index into the rows. Is this a bug? Have I misunderstood something? Is there a ridiculous typo here that I'm not seeing? -Sean --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: mod_rewrite problem?
Hello, the .htaccess file is available and readable. I also changed the webroot path and enable RewriteLog logs/rewrite.log but the result is the same and the logfile ist empty. Regards Arndtinho On 16 Okt., 15:50, Arndtinho [EMAIL PROTECTED] wrote: Ok. Thanks. I'll check it out this evening. Arndtinho On 16 Okt., 11:03, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: He wanted you to check if a .htaccess file is present (and readable to the webserver) E:/Pfad/zum/Projekt/.htaccess Another thing that could give a clue is to look at the source of the front page of your application. Look at where the css, javascript, images and links point. I would also suggest you point the DocumentRoot to the app/webroot folder of your application. This is generally speaking the best root for a Cake app since all application php files will be outside the exposed folders. It may also fix your problem... at least that setup has never failed to work for me. /Martin On Oct 16, 8:35 am, Arndtinho [EMAIL PROTECTED] wrote: Hello, thanks for your answer. What do you mean with .htaccess in your webroot virtual site? I have in my apache config following: AccessFileName .htaccess Or should it be in the virtual host configuration? Regards Arndtinho On 16 Okt., 01:00, francky06l [EMAIL PROTECTED] wrote: Usually mod-rewrite is in the htaccess, be sure you have proper .htaccess in your webroot virtual site (you can also turn on the rewrite log on apache, and check if something is wrong).. hth On Oct 15, 10:13 pm, Arndtinho [EMAIL PROTECTED] wrote: Hello, I reconfigured my new workstation with Cake. Following transfering my projects I tested one. But the site is displayed without the CSS definitions and the includes. I was first exposed mod_rewrite is disabled but it's enabled. And if I callhttp://myproject/css/main.css, the content of the css file is displayed at the browser. What could be the reason for this behavior? Here my virtual host configuration: VirtualHost *:80 ServerAdmin [EMAIL PROTECTED] DocumentRoot E:/Pfad/zum/Projekt ServerName myproject ServerAlias 127.0.0.1 ErrorLog E:/Pfad/zum/Projekt/logfiles/profil_error.log CustomLog E:/Pfad/zum/Projekt/logfiles/profil_access.log common Directory E:/Pfad/zum/Projekt/ AllowOverride All Options +FollowSymLinks Order deny,allow Allow from all Satisfy all /Directory /VirtualHost System: WinXP, Apache2 (mod_rewrite enabled), CakePHP 1.1 Regards Arndtinho- Zitierten Text ausblenden - - Zitierten Text anzeigen -- Zitierten Text ausblenden - - Zitierten Text anzeigen - --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: testAction data not resetting between tests
Clearing the cookies and cache didn't help. For now I'm just running the action of the controller instance I created and checking the - viewVars, but I'm not sure how well this method will hold up with fixture data. On Oct 16, 2:24 pm, [EMAIL PROTECTED] wrote: Yes or the cookies. Delete them. On 10/16/2008, Chowsapal [EMAIL PROTECTED] wrote: Right now I'm just trying to test the view vars depending on whether or not you post data to the url, but all successive calls to testAction are getting the same (original) results. It sounds like you're saying I shouldn't have to do anything to get fresh results. Any idea why I'm getting repeats then? Could it be caching or something? On Oct 16, 11:57 am, [EMAIL PROTECTED] wrote: Well with urls always changeing wont the results change anyways? On 10/16/2008, mark_story [EMAIL PROTECTED] wrote: testAction simulates a url request, there is no need to unset the controller as it doesn't get set to the test case. Should the results come back differently. Please explain more. -Mark On Oct 16, 11:40 am, [EMAIL PROTECTED] wrote: I am not sure that i understand what you are testing? I undertand the problem just not what you are testing. On 10/16/2008, Chowsapal [EMAIL PROTECTED] wrote: I'm trying to write test cases using testAction, but I can't seem to break down the controller in between tests. Each successive testAction call returns the same exact data, even if I call a completely made up url. I've tried including calls to create/ construct/unset $this-UndeliverablesController in startTest/endTest, but that doesn't seem to help. Any ideas please? Thanks, Ethan -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Join Table Problem
Hello all, I have 3 tables: scheduler_customers_services (customer_id int, service_id int) scheduler_services (id int) scheduler_customers (id int) My models looks something like this: class Service extends AppModel { var $name = 'Service'; var $useTable = 'scheduler_services'; var $primaryKey = 'id'; var $hasAndBelongsToMany = array( 'Customer' = array( 'className' = 'Customer', 'joinTable' = 'scheduler_customers_services', 'foreignKey' = 'service_id', 'associatedForeignKey' = 'customer_id' ) ); } ? class Customer extends AppModel { var $name = 'Customer'; var $useTable = 'scheduler_customers'; var $primaryKey = 'id'; var $hasAndBelongsToMany = array( 'Service' = array( 'className' = 'Service', 'joinTable' = 'scheduler_customers_services', 'foreignKey' = 'customer_id', 'associatedForeignKey' = 'service_id', 'joinTable' = null, 'foreignKey' = null, 'associatedForeignKey' = null, 'conditions' = null, 'fields' = null, 'order' = null, 'limit' = null, 'uniq' = true, 'offset' = null, 'fnderQuery' = null, 'deleteQuery' = null, 'insertQuery' = null ) ); } ? I am getting the following error and can not seem to figure out why? Error: Database table scheduler_customers_scheduler_services for model SchedulerCustomersSchedulerService was not found. I am new to cakephp and took over this project from someone else so if anyone can help, I would greatly appreciate it. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: testAction data not resetting between tests
ok i will take a look at this when i get back to my office. On 10/16/2008, Chowsapal [EMAIL PROTECTED] wrote: Clearing the cookies and cache didn't help. For now I'm just running the action of the controller instance I created and checking the - viewVars, but I'm not sure how well this method will hold up with fixture data. On Oct 16, 2:24 pm, [EMAIL PROTECTED] wrote: Yes or the cookies. Delete them. On 10/16/2008, Chowsapal [EMAIL PROTECTED] wrote: Right now I'm just trying to test the view vars depending on whether or not you post data to the url, but all successive calls to testAction are getting the same (original) results. It sounds like you're saying I shouldn't have to do anything to get fresh results. Any idea why I'm getting repeats then? Could it be caching or something? On Oct 16, 11:57 am, [EMAIL PROTECTED] wrote: Well with urls always changeing wont the results change anyways? On 10/16/2008, mark_story [EMAIL PROTECTED] wrote: testAction simulates a url request, there is no need to unset the controller as it doesn't get set to the test case. Should the results come back differently. Please explain more. -Mark On Oct 16, 11:40 am, [EMAIL PROTECTED] wrote: I am not sure that i understand what you are testing? I undertand the problem just not what you are testing. On 10/16/2008, Chowsapal [EMAIL PROTECTED] wrote: I'm trying to write test cases using testAction, but I can't seem to break down the controller in between tests. Each successive testAction call returns the same exact data, even if I call a completely made up url. I've tried including calls to create/ construct/unset $this-UndeliverablesController in startTest/endTest, but that doesn't seem to help. Any ideas please? Thanks, Ethan -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: testAction data not resetting between tests
Aha, found the bug related to this. Our code was not totally up-to- date, we were missing ClassRegistry::flush() from this changeset: https://trac.cakephp.org/changeset/7470 Ethan On Oct 16, 3:22 pm, [EMAIL PROTECTED] wrote: ok i will take a look at this when i get back to my office. On 10/16/2008, Chowsapal [EMAIL PROTECTED] wrote: Clearing the cookies and cache didn't help. For now I'm just running the action of the controller instance I created and checking the - viewVars, but I'm not sure how well this method will hold up with fixture data. On Oct 16, 2:24 pm, [EMAIL PROTECTED] wrote: Yes or the cookies. Delete them. On 10/16/2008, Chowsapal [EMAIL PROTECTED] wrote: Right now I'm just trying to test the view vars depending on whether or not you post data to the url, but all successive calls to testAction are getting the same (original) results. It sounds like you're saying I shouldn't have to do anything to get fresh results. Any idea why I'm getting repeats then? Could it be caching or something? On Oct 16, 11:57 am, [EMAIL PROTECTED] wrote: Well with urls always changeing wont the results change anyways? On 10/16/2008, mark_story [EMAIL PROTECTED] wrote: testAction simulates a url request, there is no need to unset the controller as it doesn't get set to the test case. Should the results come back differently. Please explain more. -Mark On Oct 16, 11:40 am, [EMAIL PROTECTED] wrote: I am not sure that i understand what you are testing? I undertand the problem just not what you are testing. On 10/16/2008, Chowsapal [EMAIL PROTECTED] wrote: I'm trying to write test cases using testAction, but I can't seem to break down the controller in between tests. Each successive testAction call returns the same exact data, even if I call a completely made up url. I've tried including calls to create/ construct/unset $this-UndeliverablesController in startTest/endTest, but that doesn't seem to help. Any ideas please? Thanks, Ethan -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: testAction data not resetting between tests
OH GREAT On 10/16/2008, Chowsapal [EMAIL PROTECTED] wrote: Aha, found the bug related to this. Our code was not totally up-to- date, we were missing ClassRegistry::flush() from this changeset: https://trac.cakephp.org/changeset/7470 Ethan On Oct 16, 3:22 pm, [EMAIL PROTECTED] wrote: ok i will take a look at this when i get back to my office. On 10/16/2008, Chowsapal [EMAIL PROTECTED] wrote: Clearing the cookies and cache didn't help. For now I'm just running the action of the controller instance I created and checking the - viewVars, but I'm not sure how well this method will hold up with fixture data. On Oct 16, 2:24 pm, [EMAIL PROTECTED] wrote: Yes or the cookies. Delete them. On 10/16/2008, Chowsapal [EMAIL PROTECTED] wrote: Right now I'm just trying to test the view vars depending on whether or not you post data to the url, but all successive calls to testAction are getting the same (original) results. It sounds like you're saying I shouldn't have to do anything to get fresh results. Any idea why I'm getting repeats then? Could it be caching or something? On Oct 16, 11:57 am, [EMAIL PROTECTED] wrote: Well with urls always changeing wont the results change anyways? On 10/16/2008, mark_story [EMAIL PROTECTED] wrote: testAction simulates a url request, there is no need to unset the controller as it doesn't get set to the test case. Should the results come back differently. Please explain more. -Mark On Oct 16, 11:40 am, [EMAIL PROTECTED] wrote: I am not sure that i understand what you are testing? I undertand the problem just not what you are testing. On 10/16/2008, Chowsapal [EMAIL PROTECTED] wrote: I'm trying to write test cases using testAction, but I can't seem to break down the controller in between tests. Each successive testAction call returns the same exact data, even if I call a completely made up url. I've tried including calls to create/ construct/unset $this-UndeliverablesController in startTest/endTest, but that doesn't seem to help. Any ideas please? Thanks, Ethan -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Auth: deleted user still logged in
I disagree. That is an unnecessary query on every page - it's the reason we have session states. This is something that foreign key constrains can solve at the database level. The user shouldn't be able to submit or change any information if their user id does not exist. - James On Oct 16, 12:39 pm, on24nl [EMAIL PROTECTED] wrote: That's the whole problem: how to sign him out? Cake should check if the user exists on each request. Otherwise this is a big security hole! On 16 okt, 18:33, [EMAIL PROTECTED] wrote: Well it could be a little hack. When you delete the user make sure that user is first sighed out or the information may still be there allowing that user to delete you or change info. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: mod_rewrite problem?
Hello, I find out that's not a mod_rewrite problem. If I set ?php echo $html-css('global'); ? instead ?= $html-css('global'); ? or ?php echo $html-link(... ); ? instead ?= $html-link(... ); ? the app is working fine. But why? Regards Arndtinho On 16 Okt., 11:03, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: He wanted you to check if a .htaccess file is present (and readable to the webserver) E:/Pfad/zum/Projekt/.htaccess Another thing that could give a clue is to look at the source of the front page of your application. Look at where the css, javascript, images and links point. I would also suggest you point the DocumentRoot to the app/webroot folder of your application. This is generally speaking the best root for a Cake app since all application php files will be outside the exposed folders. It may also fix your problem... at least that setup has never failed to work for me. /Martin On Oct 16, 8:35 am, Arndtinho [EMAIL PROTECTED] wrote: Hello, thanks for your answer. What do you mean with .htaccess in your webroot virtual site? I have in my apache config following: AccessFileName .htaccess Or should it be in the virtual host configuration? Regards Arndtinho On 16 Okt., 01:00, francky06l [EMAIL PROTECTED] wrote: Usually mod-rewrite is in the htaccess, be sure you have proper .htaccess in your webroot virtual site (you can also turn on the rewrite log on apache, and check if something is wrong).. hth On Oct 15, 10:13 pm, Arndtinho [EMAIL PROTECTED] wrote: Hello, I reconfigured my new workstation with Cake. Following transfering my projects I tested one. But the site is displayed without the CSS definitions and the includes. I was first exposed mod_rewrite is disabled but it's enabled. And if I callhttp://myproject/css/main.css, the content of the css file is displayed at the browser. What could be the reason for this behavior? Here my virtual host configuration: VirtualHost *:80 ServerAdmin [EMAIL PROTECTED] DocumentRoot E:/Pfad/zum/Projekt ServerName myproject ServerAlias 127.0.0.1 ErrorLog E:/Pfad/zum/Projekt/logfiles/profil_error.log CustomLog E:/Pfad/zum/Projekt/logfiles/profil_access.log common Directory E:/Pfad/zum/Projekt/ AllowOverride All Options +FollowSymLinks Order deny,allow Allow from all Satisfy all /Directory /VirtualHost System: WinXP, Apache2 (mod_rewrite enabled), CakePHP 1.1 Regards Arndtinho- Zitierten Text ausblenden - - Zitierten Text anzeigen - --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Join Table Problem
Okay, I changed the customer hasand belongstomany to this: var $hasAndBelongsToMany = array( 'Service' = array( 'className' = 'Service', 'joinTable' = 'scheduler_customers_services', 'foreignKey' = 'customer_id', 'associatedForeignKey' = 'service_id' ) ); Not real sure why it was working like the one above before but it was, the only thing I have done was change the table names to make them more distinct (added scheduler to begining of name). So now, I am no longer getting the error but the scheduler_customers_services never gets updated with customer id and service ids. What is the best way to update tables like this? On Oct 16, 3:21 pm, MDB [EMAIL PROTECTED] wrote: Hello all, I have 3 tables: scheduler_customers_services (customer_id int, service_id int) scheduler_services (id int) scheduler_customers (id int) My models looks something like this: class Service extends AppModel { var $name = 'Service'; var $useTable = 'scheduler_services'; var $primaryKey = 'id'; var $hasAndBelongsToMany = array( 'Customer' = array( 'className' = 'Customer', 'joinTable' = 'scheduler_customers_services', 'foreignKey' = 'service_id', 'associatedForeignKey' = 'customer_id' ) ); } ? class Customer extends AppModel { var $name = 'Customer'; var $useTable = 'scheduler_customers'; var $primaryKey = 'id'; var $hasAndBelongsToMany = array( 'Service' = array( 'className' = 'Service', 'joinTable' = 'scheduler_customers_services', 'foreignKey' = 'customer_id', 'associatedForeignKey' = 'service_id', 'joinTable' = null, 'foreignKey' = null, 'associatedForeignKey' = null, 'conditions' = null, 'fields' = null, 'order' = null, 'limit' = null, 'uniq' = true, 'offset' = null, 'fnderQuery' = null, 'deleteQuery' = null, 'insertQuery' = null ) );} ? I am getting the following error and can not seem to figure out why? Error: Database table scheduler_customers_scheduler_services for model SchedulerCustomersSchedulerService was not found. I am new to cakephp and took over this project from someone else so if anyone can help, I would greatly appreciate it. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Auth: deleted user still logged in
Why not? On 10/16/2008, James K [EMAIL PROTECTED] wrote: I disagree. That is an unnecessary query on every page - it's the reason we have session states. This is something that foreign key constrains can solve at the database level. The user shouldn't be able to submit or change any information if their user id does not exist. - James On Oct 16, 12:39 pm, on24nl [EMAIL PROTECTED] wrote: That's the whole problem: how to sign him out? Cake should check if the user exists on each request. Otherwise this is a big security hole! On 16 okt, 18:33, [EMAIL PROTECTED] wrote: Well it could be a little hack. When you delete the user make sure that user is first sighed out or the information may still be there allowing that user to delete you or change info. -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: testAction data not resetting between tests
I was going to say, I was pretty sure I fixed this a while back, and there are tests for it now as well. -Mark On Oct 16, 3:41 pm, [EMAIL PROTECTED] wrote: OH GREAT On 10/16/2008, Chowsapal [EMAIL PROTECTED] wrote: Aha, found the bug related to this. Our code was not totally up-to- date, we were missing ClassRegistry::flush() from this changeset: https://trac.cakephp.org/changeset/7470 Ethan On Oct 16, 3:22 pm, [EMAIL PROTECTED] wrote: ok i will take a look at this when i get back to my office. On 10/16/2008, Chowsapal [EMAIL PROTECTED] wrote: Clearing the cookies and cache didn't help. For now I'm just running the action of the controller instance I created and checking the - viewVars, but I'm not sure how well this method will hold up with fixture data. On Oct 16, 2:24 pm, [EMAIL PROTECTED] wrote: Yes or the cookies. Delete them. On 10/16/2008, Chowsapal [EMAIL PROTECTED] wrote: Right now I'm just trying to test the view vars depending on whether or not you post data to the url, but all successive calls to testAction are getting the same (original) results. It sounds like you're saying I shouldn't have to do anything to get fresh results. Any idea why I'm getting repeats then? Could it be caching or something? On Oct 16, 11:57 am, [EMAIL PROTECTED] wrote: Well with urls always changeing wont the results change anyways? On 10/16/2008, mark_story [EMAIL PROTECTED] wrote: testAction simulates a url request, there is no need to unset the controller as it doesn't get set to the test case. Should the results come back differently. Please explain more. -Mark On Oct 16, 11:40 am, [EMAIL PROTECTED] wrote: I am not sure that i understand what you are testing? I undertand the problem just not what you are testing. On 10/16/2008, Chowsapal [EMAIL PROTECTED] wrote: I'm trying to write test cases using testAction, but I can't seem to break down the controller in between tests. Each successive testAction call returns the same exact data, even if I call a completely made up url. I've tried including calls to create/ construct/unset $this-UndeliverablesController in startTest/endTest, but that doesn't seem to help. Any ideas please? Thanks, Ethan -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: mod_rewrite problem?
Hello, it's me again. I find it out!!! The problem is the php short_open_tag-property. I set it to 'on' and now everything is fine. Regards Arndtinho On 16 Okt., 21:43, Arndtinho [EMAIL PROTECTED] wrote: Hello, I find out that's not a mod_rewrite problem. If I set ?php echo $html-css('global'); ? instead ?= $html-css('global'); ? or ?php echo $html-link(... ); ? instead ?= $html-link(... ); ? the app is working fine. But why? Regards Arndtinho On 16 Okt., 11:03, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: He wanted you to check if a .htaccess file is present (and readable to the webserver) E:/Pfad/zum/Projekt/.htaccess Another thing that could give a clue is to look at the source of the front page of your application. Look at where the css, javascript, images and links point. I would also suggest you point the DocumentRoot to the app/webroot folder of your application. This is generally speaking the best root for a Cake app since all application php files will be outside the exposed folders. It may also fix your problem... at least that setup has never failed to work for me. /Martin On Oct 16, 8:35 am, Arndtinho [EMAIL PROTECTED] wrote: Hello, thanks for your answer. What do you mean with .htaccess in your webroot virtual site? I have in my apache config following: AccessFileName .htaccess Or should it be in the virtual host configuration? Regards Arndtinho On 16 Okt., 01:00, francky06l [EMAIL PROTECTED] wrote: Usually mod-rewrite is in the htaccess, be sure you have proper .htaccess in your webroot virtual site (you can also turn on the rewrite log on apache, and check if something is wrong).. hth On Oct 15, 10:13 pm, Arndtinho [EMAIL PROTECTED] wrote: Hello, I reconfigured my new workstation with Cake. Following transfering my projects I tested one. But the site is displayed without the CSS definitions and the includes. I was first exposed mod_rewrite is disabled but it's enabled. And if I callhttp://myproject/css/main.css, the content of the css file is displayed at the browser. What could be the reason for this behavior? Here my virtual host configuration: VirtualHost *:80 ServerAdmin [EMAIL PROTECTED] DocumentRoot E:/Pfad/zum/Projekt ServerName myproject ServerAlias 127.0.0.1 ErrorLog E:/Pfad/zum/Projekt/logfiles/profil_error.log CustomLog E:/Pfad/zum/Projekt/logfiles/profil_access.log common Directory E:/Pfad/zum/Projekt/ AllowOverride All Options +FollowSymLinks Order deny,allow Allow from all Satisfy all /Directory /VirtualHost System: WinXP, Apache2 (mod_rewrite enabled), CakePHP 1.1 Regards Arndtinho- Zitierten Text ausblenden - - Zitierten Text anzeigen - --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Any one Familiar with XML/SWF charts usage in Cakephp
I hate when people do exactly what I'm going to do, but I wouldn't post if I didn't think it really was helpful (that is, suggest something completely different). Unless you are using the paid-for version of that charting script (XML/ SWF), it may be easier to get Open Flash Chart (http:// teethgrinder.co.uk/open-flash-chart/) working with CakePHP a little easier. Obviously each project has different visual requirements, and these applications do have differing features, but I found it very easy to get it working with CakePHP. There's even a few helpers and behaviors for use with it in the bakery (if you'd be using it the same way -- I was not). Just a thought. :) Good luck either way. On Sep 4, 3:06 am, vibhor [EMAIL PROTECTED] wrote: Hello all, I am looking to integrate the XML/SWF charts(http://www.maani.us/xml_charts/ ) feature in my cakephp application. I have read Chris Hartjes's tutorial (http://www.littlehart.net/atthekeyboard/2006/09/26/tutorial-integrati... ) but he is using the PHP/SWF implementation.(thanks Chris for excellent tutorial! ). I just want to know which files of the charts go where in the cakephp application folder structure. I think once this is sorted out we can post this in the bakery for other bakers who can use this wonderful stuff in their application.. Can someone please help me in this? Thanks, Vibhor --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Any one Familiar with XML/SWF charts usage in Cakephp
Theres more than one way to do it - the old perl adage :) I was using http://www.amcharts.com/ beofre that I tried jquery flot - but urgh not a lot of joy with that 2008/10/16 BrendonKoz [EMAIL PROTECTED] I hate when people do exactly what I'm going to do, but I wouldn't post if I didn't think it really was helpful (that is, suggest something completely different). Unless you are using the paid-for version of that charting script (XML/ SWF), it may be easier to get Open Flash Chart (http:// teethgrinder.co.uk/open-flash-chart/) working with CakePHP a little easier. Obviously each project has different visual requirements, and these applications do have differing features, but I found it very easy to get it working with CakePHP. There's even a few helpers and behaviors for use with it in the bakery (if you'd be using it the same way -- I was not). Just a thought. :) Good luck either way. On Sep 4, 3:06 am, vibhor [EMAIL PROTECTED] wrote: Hello all, I am looking to integrate the XML/SWF charts( http://www.maani.us/xml_charts/ ) feature in my cakephp application. I have read Chris Hartjes's tutorial ( http://www.littlehart.net/atthekeyboard/2006/09/26/tutorial-integrati... ) but he is using the PHP/SWF implementation.(thanks Chris for excellent tutorial! ). I just want to know which files of the charts go where in the cakephp application folder structure. I think once this is sorted out we can post this in the bakery for other bakers who can use this wonderful stuff in their application.. Can someone please help me in this? Thanks, Vibhor --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
adding attributes to select box options
I need to add specific attributes to select box options and I havent found any info on this. Is there a way to add a class to individual options? Instead of: select name=selectbox option value=1Option 1/option /select I need to add a class to the option like so: select name=selectbox option value=1 class=option1classOption 1/option /select Any help or ideas would be greatly appreciated... --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Cake is incorrectly parsing URL's or I'm doing something wrong
I'm having some trouble with Cake parsing the URL for my RSS feed. I've got a controller that looks like this: ?php class RssController extends AppController { var $name = 'Rss'; var $helpers = array('Time'); var $uses = array('Article'); /* RSS Feed: All articles */ function index() { /* Index method */ } /* Other methods */ } ? Here's the weird bit. If I go to mywebsite.com/rss I get the following error: . You are seeing this error because controller Controller could not be found. Notice: If you want to customize this error message, create app/views/ errors/missing_controller.thtml. Fatal: Create the class below in file : app/controllers/controller.php ?php class Controller extends AppController { var $name = ''; } ? But it works if I go to mywebsite.com/rss_! It's baffling. I've checked my routes.php file and commented everything out. I'm a relative newb to Cake, so I'm hoping someone can tell me where I should be looking. Thanks. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake is incorrectly parsing URL's or I'm doing something wrong
Hi! This could be a problem with the inflections (singular/plural of the word rss). Maybe you should try to add rss to config/inflections.php -- Bernhard J. M. Grün 2008/10/16 MaxCzap [EMAIL PROTECTED] I'm having some trouble with Cake parsing the URL for my RSS feed. I've got a controller that looks like this: ?php class RssController extends AppController { var $name = 'Rss'; var $helpers = array('Time'); var $uses = array('Article'); /* RSS Feed: All articles */ function index() { /* Index method */ } /* Other methods */ } ? Here's the weird bit. If I go to mywebsite.com/rss I get the following error: . You are seeing this error because controller Controller could not be found. Notice: If you want to customize this error message, create app/views/ errors/missing_controller.thtml. Fatal: Create the class below in file : app/controllers/controller.php ?php class Controller extends AppController { var $name = ''; } ? But it works if I go to mywebsite.com/rss_! It's baffling. I've checked my routes.php file and commented everything out. I'm a relative newb to Cake, so I'm hoping someone can tell me where I should be looking. Thanks. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake is incorrectly parsing URL's or I'm doing something wrong
Sorry for the double post. Another way would be to rename your controller to feeds and use the router to map to rss. -- Bernhard J. M. Grün 2008/10/16 Bernhard J. M. Grün [EMAIL PROTECTED] Hi! This could be a problem with the inflections (singular/plural of the word rss). Maybe you should try to add rss to config/inflections.php -- Bernhard J. M. Grün 2008/10/16 MaxCzap [EMAIL PROTECTED] I'm having some trouble with Cake parsing the URL for my RSS feed. I've got a controller that looks like this: ?php class RssController extends AppController { var $name = 'Rss'; var $helpers = array('Time'); var $uses = array('Article'); /* RSS Feed: All articles */ function index() { /* Index method */ } /* Other methods */ } ? Here's the weird bit. If I go to mywebsite.com/rss I get the following error: . You are seeing this error because controller Controller could not be found. Notice: If you want to customize this error message, create app/views/ errors/missing_controller.thtml. Fatal: Create the class below in file : app/controllers/controller.php ?php class Controller extends AppController { var $name = ''; } ? But it works if I go to mywebsite.com/rss_! It's baffling. I've checked my routes.php file and commented everything out. I'm a relative newb to Cake, so I'm hoping someone can tell me where I should be looking. Thanks. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
validating checkboxes in habtm
Hi ; I am trying to build a freelancer script with cakephp . I made categories and projects. One project can have more than one category so I set the relationship of categories and projects to habtm . I hope everything is right until here because I spend really a big time for that . Anyway . Now the problem is I want to limit the maximum category checkbox a user can check . How can I validate that data . Some ideas : I can get the count of the $this-data['categories'] ['categories'] in the projects controller before saving data . But the thing is I have to set the validation error and stop the form from submitting . I cannot do this in a controller does anyone knows how ? Or can I validate project categories in project model ? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Newbie: Moving away from the tutorial apps and encountered first issue
Hi all, I have spent the last 3 days reading book.cakephp.org for 1.2, although I must admit to starting to skim through chapters from section 6 onwards (it's always there for reference). I worked through the Blog and Acl Controlled App tutorials and whilst I had a few problems with the second I pretty much though I knew what had caused them. After 3 days of reading and dabbling it was time to throw myself into a self-created project. I spent some time creating my Db Schema, spent a lot of time creating my Models and then baked myself some scaffolded controllers and views, without admin routing. I then applied the first few steps of the Acl Controlled App Tutorial to get myself setup with ACOs and AROs and have gotten to the point where I have created two User Groups and my first User. After creating my first user and being returned to /users/index I am getting the following notice above my user list: Notice (8): Undefined index: id [CORE/cake/libs/view/scaffolds/ index.ctp, line 56] I'm sure this is something simple, but for the wealth of debug info I have available I can't work out which id it is telling me has not been defined. You can view this for yourself at http://ellienevegardner.me.uk/cake_1_2/users. There is definitely an index defined on the users/user_groups tables and the associated foreign id's are all correct as far as I can tell. Regards, Paul. Note: I have configured FirePHP, not sure how this impacts on people accessing the page without FireFox/FirePHP installed. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake is incorrectly parsing URL's or I'm doing something wrong
Hi Bernhard, Thanks for the response. If I'm changing the inflections, would I add '.*rss' to the uninflectedPlural array? I tried that and it didn't work. Also, I think if that was the the problem I would have gotten a reference to a missing Controller, not just to Controller. I thought of renaming the controller and changing routes.php, but that feels like a hack and I want this to work right. Thanks for your help. -Max On Oct 16, 5:24 pm, Bernhard J. M. Grün [EMAIL PROTECTED] wrote: Sorry for the double post. Another way would be to rename your controller to feeds and use the router to map to rss. -- Bernhard J. M. Grün 2008/10/16 Bernhard J. M. Grün [EMAIL PROTECTED] Hi! This could be a problem with the inflections (singular/plural of the word rss). Maybe you should try to add rss to config/inflections.php -- Bernhard J. M. Grün 2008/10/16 MaxCzap [EMAIL PROTECTED] I'm having some trouble with Cake parsing the URL for my RSS feed. I've got a controller that looks like this: ?php class RssController extends AppController { var $name = 'Rss'; var $helpers = array('Time'); var $uses = array('Article'); /* RSS Feed: All articles */ function index() { /* Index method */ } /* Other methods */ } ? Here's the weird bit. If I go to mywebsite.com/rss I get the following error: . You are seeing this error because controller Controller could not be found. Notice: If you want to customize this error message, create app/views/ errors/missing_controller.thtml. Fatal: Create the class below in file : app/controllers/controller.php ?php class Controller extends AppController { var $name = ''; } ? But it works if I go to mywebsite.com/rss_! It's baffling. I've checked my routes.php file and commented everything out. I'm a relative newb to Cake, so I'm hoping someone can tell me where I should be looking. Thanks. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake is incorrectly parsing URL's or I'm doing something wrong
Hi! Just 'rss' in uninflectedPlural should be enough . But I really don't know if that solves your problem. In fact naming your controller feeds is much better as you might have to support atom feeds too. ;-) I would not recommend that you spend too much time with that problem. Just rename it and keep in mind that there was some strange thing with RssController. Sorry that I can't solve your problem the right way. -- Bernhard J. M. Grün 2008/10/16 MaxCzap [EMAIL PROTECTED] Hi Bernhard, Thanks for the response. If I'm changing the inflections, would I add '.*rss' to the uninflectedPlural array? I tried that and it didn't work. Also, I think if that was the the problem I would have gotten a reference to a missing Controller, not just to Controller. I thought of renaming the controller and changing routes.php, but that feels like a hack and I want this to work right. Thanks for your help. -Max On Oct 16, 5:24 pm, Bernhard J. M. Grün [EMAIL PROTECTED] wrote: Sorry for the double post. Another way would be to rename your controller to feeds and use the router to map to rss. -- Bernhard J. M. Grün 2008/10/16 Bernhard J. M. Grün [EMAIL PROTECTED] Hi! This could be a problem with the inflections (singular/plural of the word rss). Maybe you should try to add rss to config/inflections.php -- Bernhard J. M. Grün 2008/10/16 MaxCzap [EMAIL PROTECTED] I'm having some trouble with Cake parsing the URL for my RSS feed. I've got a controller that looks like this: ?php class RssController extends AppController { var $name = 'Rss'; var $helpers = array('Time'); var $uses = array('Article'); /* RSS Feed: All articles */ function index() { /* Index method */ } /* Other methods */ } ? Here's the weird bit. If I go to mywebsite.com/rss I get the following error: . You are seeing this error because controller Controller could not be found. Notice: If you want to customize this error message, create app/views/ errors/missing_controller.thtml. Fatal: Create the class below in file : app/controllers/controller.php ?php class Controller extends AppController { var $name = ''; } ? But it works if I go to mywebsite.com/rss_! It's baffling. I've checked my routes.php file and commented everything out. I'm a relative newb to Cake, so I'm hoping someone can tell me where I should be looking. Thanks. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: complex query : HABTM Association between multiple model
FYI typo 'recersive' = 'recursive' On Oct 15, 8:18 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Sorry, I forget that I used this solution but could not succeed $brands = $this-User-Product-Brand-find('all',array( 'fields' = array('Brand.id','Brand.brand_name'), 'conditions' = array('User.id' = $this-Auth-user('id')), 'recersive' = 0) ); Please help me On Oct 16, 12:15 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I have three Model with following association 1 User 2 Product 3 Brand User HABTM (brands_users)--Brand Brand---HABTM (brands_products)--Product User---HABTM (products_users)--Product I want to find a list of all brands which product had been selected by a user. Means first user select some products then he will be select brands. So I am unable to display all brands accordingly user's products Thanks a lot you for my help --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: adding attributes to select box options
Found the answer in case anyone has the same question. I had to look at the __selectOptions() code in /cake/libs/views/helpers/form.php to figure it out. Instead of using the key=value options like this: $attributes['options'] = array('1'='Option 1'); you would use value, name and class key=value options like this: $attributes['options'] = array('value'='1', 'name'='Option 1', 'class'='option1class'); On Oct 16, 2:08 pm, tnizzle [EMAIL PROTECTED] wrote: I need to add specific attributes to select box options and I havent found any info on this. Is there a way to add a class to individual options? Instead of: select name=selectbox option value=1Option 1/option /select I need to add a class to the option like so: select name=selectbox option value=1 class=option1classOption 1/option /select Any help or ideas would be greatly appreciated... --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: testAction data not resetting between tests
So are there anymore issues or problems? On this topic? On 10/16/2008, mark_story [EMAIL PROTECTED] wrote: I was going to say, I was pretty sure I fixed this a while back, and there are tests for it now as well. -Mark On Oct 16, 3:41 pm, [EMAIL PROTECTED] wrote: OH GREAT On 10/16/2008, Chowsapal [EMAIL PROTECTED] wrote: Aha, found the bug related to this. Our code was not totally up-to- date, we were missing ClassRegistry::flush() from this changeset: https://trac.cakephp.org/changeset/7470 Ethan On Oct 16, 3:22 pm, [EMAIL PROTECTED] wrote: ok i will take a look at this when i get back to my office. On 10/16/2008, Chowsapal [EMAIL PROTECTED] wrote: Clearing the cookies and cache didn't help. For now I'm just running the action of the controller instance I created and checking the - viewVars, but I'm not sure how well this method will hold up with fixture data. On Oct 16, 2:24 pm, [EMAIL PROTECTED] wrote: Yes or the cookies. Delete them. On 10/16/2008, Chowsapal [EMAIL PROTECTED] wrote: Right now I'm just trying to test the view vars depending on whether or not you post data to the url, but all successive calls to testAction are getting the same (original) results. It sounds like you're saying I shouldn't have to do anything to get fresh results. Any idea why I'm getting repeats then? Could it be caching or something? On Oct 16, 11:57 am, [EMAIL PROTECTED] wrote: Well with urls always changeing wont the results change anyways? On 10/16/2008, mark_story [EMAIL PROTECTED] wrote: testAction simulates a url request, there is no need to unset the controller as it doesn't get set to the test case. Should the results come back differently. Please explain more. -Mark On Oct 16, 11:40 am, [EMAIL PROTECTED] wrote: I am not sure that i understand what you are testing? I undertand the problem just not what you are testing. On 10/16/2008, Chowsapal [EMAIL PROTECTED] wrote: I'm trying to write test cases using testAction, but I can't seem to break down the controller in between tests. Each successive testAction call returns the same exact data, even if I call a completely made up url. I've tried including calls to create/ construct/unset $this-UndeliverablesController in startTest/endTest, but that doesn't seem to help. Any ideas please? Thanks, Ethan -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. -- Xavier A. Mathews Student/Developer/Web-Master GG Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: complex query : HABTM Association between multiple model
Try: $this-User-find('all', array( 'contain' = array('Brand' = array('Product')) )); 1) Read the Book. Chances are it'll have the information you're looking for. http://book.cakephp.org/view/474/Containable 2) Look at the test cases for the behavior in question. http://api.cakephp.org/tests/class_containable_test.html 3) Google is always available. 'cakephp containable' returns 20k results; I'm sure some of them are useful. Is CakePHP very complex for writing function for such query..because I am trying it from last two days also no body is replaying me. People on this list answer questions in their own free time; you pay nothing to ask the questions and get an answer, and the risk is that you might not get one. Complaining is not going to help. If that's a problem, paid consultants are no scarce. -J. On Oct 16, 5:31 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I know what query can return my answer..it's here: SELECT `Product`.`id`, `Product`.`product_name`, `Brand`.`brand_name`, `Brand`.`id`, `ProductsUser`.`user_id`, `ProductsUser`.`product_id` FROM `products` AS `Product` JOIN `products_users` AS `ProductsUser` ON (`ProductsUser`.`user_id` = 2 AND `ProductsUser`.`product_id` = `Product`.`id`) JOIN `brands_products` AS `BrandsProduct` ON (`BrandsProduct`.`product_id` = `Product`.`id`) JOIN `brands` AS `Brand` ON (`Brand`.`id` = `BrandsProduct`.`brand_id`) WHERE 1 = 1 This query is working fine but I don't know how to write it in CakePHP... I found all products accordingly users by using Containable behavior but can not find complete solution. code is: $this-User-contain(array('Product')); debug($this-User-find('all', array('conditions' = array('User.id' = $this-Auth-user('id'); But now don't know how to find all brands accordingly a users product? Is CakePHP very complex for writing function for such query..because I am trying it from last two days also no body is replaying me. Please tell me how should I go ahead with this? Thanks On Oct 16, 12:18 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Sorry, I forget that I used this solution but could not succeed $brands = $this-User-Product-Brand-find('all',array( 'fields' = array('Brand.id','Brand.brand_name'), 'conditions' = array('User.id' = $this-Auth-user('id')), 'recersive' = 0) ); Please help me On Oct 16, 12:15 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I have three Model with following association 1 User 2 Product 3 Brand User HABTM (brands_users)--Brand Brand---HABTM (brands_products)--Product User---HABTM (products_users)--Product I want to find a list of all brands which product had been selected by a user. Means first user select some products then he will be select brands. So I am unable to display all brands accordingly user's products Thanks a lot you for my help --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Accessing Cake elements in the webroot directory?
I have installed a Wordpress blog alongside a Cake app. I have the Wordpress files in the webroot (app/webroot/articles/) directory of the Cake app. I have taken my elements code and built templates inside the Wordpress directory. I would rather render the elements like with the Cake layout files. Is there a way to access and render my Cake elements in the Wordpress templates? All help is appreciated! Brian --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake is incorrectly parsing URL's or I'm doing something wrong
What I would do is add a feed() action into your Articles controller. Then in your routes.php add: Router::parseExtensions('rss'). Then you just call it like... /articles/feed.rss And it all works, assuming you've got the rss layout and stuff like that. Then you can change the url using routes as well if you want to. Cheers, Adam On Oct 17, 6:59 am, MaxCzap [EMAIL PROTECTED] wrote: I'm having some trouble with Cake parsing the URL for my RSS feed. I've got a controller that looks like this: ?php class RssController extends AppController { var $name = 'Rss'; var $helpers = array('Time'); var $uses = array('Article'); /* RSS Feed: All articles */ function index() { /* Index method */ } /* Other methods */} ? Here's the weird bit. If I go to mywebsite.com/rss I get the following error: . You are seeing this error because controller Controller could not be found. Notice: If you want to customize this error message, create app/views/ errors/missing_controller.thtml. Fatal: Create the class below in file : app/controllers/controller.php ?php class Controller extends AppController { var $name = '';} ? But it works if I go to mywebsite.com/rss_! It's baffling. I've checked my routes.php file and commented everything out. I'm a relative newb to Cake, so I'm hoping someone can tell me where I should be looking. Thanks. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
bake script doesn't save my relations
Hey guys, I am just getting started using the bake script on windows, everything seems to be going great except after baking when I view my project. None of my tables display any relations that they should have. I bake in this order: Models of all tables, Controllers of all Models, Views of all controllers When creating views I tell it to not use scaffolding, but to create basic actions (index, edit, add, delete) I added all the relations when I was baking the models, why would they not show up after baking --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---