Re: British pound sign in 1.2 form helper

2008-07-11 Thread Marc MENDEZ
Adriatique a écrit :
> Hi Marc,
>
> Changing encoding to ISO worked perfectly
>
> Thanks a bunch :D
>   
I have a thread on an other group about this, and we are dealing with 
how to create a file in utf-8 with an editor

--~--~-~--~~~---~--~~
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: British pound sign in 1.2 form helper

2008-07-11 Thread Marc MENDEZ
Hi,

Just an idea : it seems that it does not work when it's display (since 
you say you can store it in the database)

Check if you have the same trouble with any other non alaphabetic 
character (dollar, ...)
Check as well in the core.php, the value of "App.encoding" parameter.
Try to use ISO charset instead of UTF-8



Adrian a écrit :
> Hi
>
> It's a nice idea, but I would like to keep the text field as free text
> so anything can be entered e.g.
> " Up to £10 an hour" or "£24k a year plus benifits"
> it's stored as a VARCHAR in the database, I have tried putting pound
> signs in other text and textarea fields and the same thing happens,
> the value is accepted and is placed in the database, when viewing a
> job it all looks how it should, it's just the form helper doesn't seem
> to like outputting pound signs.
>
> On Jul 11, 12:28 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote:
>   
>> what about the number helper currency?
>>
>> http://book.cakephp.org/view/215/number
>>
>> the following
>> e($number->currency('12887.57','GBP'));
>>
>> outputs the following (with ncr)
>>
>> £12,887.57
>>
>> 2008/7/11 Adrian <[EMAIL PROTECTED]>:
>>
>>
>>
>> 
>>> For now I have settled with:
>>>   
>>> [code]
>>>   
>>> 
>>>   
>>> [/code]
>>>   
>>> This works but if validation fails the elements value is not filled
>>> in.
>>>   
>>> :S
>>>   
>>> On Jul 11, 12:16 pm, Adrian <[EMAIL PROTECTED]> wrote:
>>>   
 Hey, thanks for the reply
 I tried this but it is rendered as " £ " when used as a form
 element value.
 
 On Jul 11, 11:23 am, "dr. Hannibal Lecter" <[EMAIL PROTECTED]>
 wrote:
 
> Did you try putting the pound sign as an entity? i.e. £ ?
>   
> Adrian wrote:
>   
>> Hi,
>> 
>> I am developing a simple job search site in CakePHP 1.2 and I have a
>> problem with the text form helper. When editing a job I have a text
>> box to enter a salary e.g. "�24,000-�30,000 a year" so I have used
>> 
>>> the
>>>   
>> form helper in my edit view like this:
>> 
>> [code]
>> 
>> text('Job.salary', array('value' => $job['Job']
>> ['salary']))?>
>> 
>> [/code]
>> 
>> This gives me an empty text box if $job['Job']['salary'] contains a �
>> sign, if I enter anything without a � sign it's fine. Does anyone
>> 
>>> know
>>>   
>> a good way of correcting this? I tried using the clean function but
>> 
>>> it
>>>   
>> doesn't strip � signs out. Also I don't think this happened in 1.1.
>> 
>> Any help would be 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: help with layout error message

2008-07-11 Thread Marc MENDEZ

Absolutely no idea, and it may be hard to find why since this kind of 
behavior is difficult to reproduce

Happy it works again !


. a écrit :
> I just restarted the Apache server and mysql server, and it worked! I 
> am still curious why this though. Any ideas? I am using XAMPP.
>
> On Fri, Jul 11, 2008 at 1:12 AM, . <[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>> wrote:
>
> This seems to happen in all of my controllers where the view has a
> form submit. after I submit the form (any form) i get this error.
>
>
> On Fri, Jul 11, 2008 at 1:07 AM, . <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
>
> Hi
>  
> I do not have a var $layout or any setLayout in the controller.
>  
> The wierd thing is this was working just yesterday...
>
>
>  
> On Fri, Jul 11, 2008 at 1:00 AM, Marc MENDEZ
> <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
> wrote:
>
>
> Hi,
>
> Look in the controller containing the action which raised
> this error, if
> you don't use a $layout variable or call setLayout() ?
>
>
>
> . a écrit :
> > I am not referring to any Array.ctp whatsoever. Why do I
> get this
> > error? Thanks
> >
> > On Fri, Jul 11, 2008 at 12:42 AM, . <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
> > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>> wrote:
> >
> > I need help with this error message please. I do not
> have any
> > Array.ctp layout file. Why am I getting this all of
> a sudden?
> >
> >
> >
> > Missing Layout
> >
> > *Error: *The layout file
> > /C:\xampp\htdocs\app\views\layouts\Array.ctp/ can
> not be found or
> > does not exist.
> >
> > *Error: *Confirm you have created the file:
> > /C:\xampp\htdocs\app\views\layouts\Array.ctp/
> >
> > *Notice: *If you want to customize this error
> message, create
> > app\views\errors\missing_layout.ctp
> >
> >
> >
> > >
>
>
>
>
>
>
> >




--~--~-~--~~~---~--~~
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: help with layout error message

2008-07-11 Thread Marc MENDEZ

Hi,

Look in the controller containing the action which raised this error, if 
you don't use a $layout variable or call setLayout() ?



. a écrit :
> I am not referring to any Array.ctp whatsoever. Why do I get this 
> error? Thanks
>
> On Fri, Jul 11, 2008 at 12:42 AM, . <[EMAIL PROTECTED] 
> > wrote:
>
> I need help with this error message please. I do not have any
> Array.ctp layout file. Why am I getting this all of a sudden?
>  
>
>
> Missing Layout
>
> *Error: *The layout file
> /C:\xampp\htdocs\app\views\layouts\Array.ctp/ can not be found or
> does not exist.
>
> *Error: *Confirm you have created the file:
> /C:\xampp\htdocs\app\views\layouts\Array.ctp/
>
> *Notice: *If you want to customize this error message, create
> app\views\errors\missing_layout.ctp
>
>
>
> >




--~--~-~--~~~---~--~~
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: Can form helper handle posting arrays of models?

2008-07-01 Thread Marc MENDEZ

Hi Chris,

I suppose you are dealing about multirecord form ? If yes, yes it's 
quite simple.

Here are the different steps :


First, in a view, create a multi record display, with a loop on your 
data and display input items for each record, like this :
echo $form->input('Mytable.'.$mytable['Mytable']['id'].'.myname',
array(
'label'=>''
,'value'=>$mytable['Mytable']['myname']
)
);
As you can see, each input item is unique, 'cause its ID is composed of 
the unique id of the data.

It works fine with the paginator helper : just keep in mind that your 
$data array is deeper !

This form will need an action to save multirecords :
create('Mytable',array('url'=>'/mytables/savemulti'));?>


About the controller :

one action to display the multirecord view :

function lists() {
$this->Mytable->recursive = 0;
$this->set('mytables', $this->paginate());
}

and the famous multirecord save :

function savemulti()
{
if (empty($this->data)) {
$this->Session->setFlash(__('Invalid Mytable', true));
$this->redirect(array('action'=>'lists'));
}
if (!empty($this->data)) {
if ($this->Mytable->saveAll($this->data['Mytable'])) {
$this->Session->setFlash(__('The Mytable has been 
saved', true));
$this->redirect(array('action'=>'lists'));
} else {
$this->Session->setFlash(__('The Mytable could not be 
saved. Please, try again.', true));
}
}
   
$this->redirect(array('action'=>'lists'));
}


The savemulti() is very similar to the standard edit method generated by 
Bake for instance : I just call saveAll() instead of save() (be caution 
: the parameters are differents).

That's all folks !



Chris Anderson a écrit :
> I have a page where I'm making changes to multiple instances of the
> same model (say, permissions for multiple users) on a page, but when I
> post it always ends up that $this->data only contains the information
> of the last entry posted. I'm assuming it simply is causing each
> subsequent "row" to overwrite the previous information in the array. I
> know how to handle form arrays in traditional php, but can Cake handle
> it appropriately so I would just have a nested array of each user I
> passed in the post? I asked in IRC and people seemed to think it was
> simple/possible, but no one could remember specifically what needed to
> be done. I didn't see anything about it in the form helper
> documentation, so presently I'm stumped.
>
> >
>
>   




--~--~-~--~~~---~--~~
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 for Commercial application development

2008-06-30 Thread Marc MENDEZ

Binu a écrit :

I'm a newbee too, but I think I could answer to some of your questions :

> 3.How can I switch to different template layouts (as like in joomla) ?
> In cake, we are placing the image files, css etc in separate folders,
> so how can I create a template layout easily without placing the files
> in separate folders ?
>   
That's not really a problem. If you write your own template (css and 
layouts), there will have to follow common rules.
For instance, you will decide where to store all the images (in the same 
directory )
Of course, if you plan to use any templates, you can't wait for them 
they work at first time !
I found one day a piece of code to change the layout "on the fly". So it 
must not be too hard.
> 4.There will be different user groups and users will be in multiple
> groups. And the admin should be do assign some permissions to those
> groups.(For example like in Joomla the articles can be assigned to
> some user groups with add / edit / publish etc permissions). Is there
> a similar functionality in cake ? And which will be good to track the
> user sessions (files or database) ?
>   
You can use ACL ou Auth component. But, before, you must define what you 
want to do exactly. How the rights will be dispatched between the users 
and the groups ?. Then, you'll be able to compare it with what these 
modules (or others) offer you.

> 5. Hope cake 1.2 supports internationalization by default. How can I
> implement this to different modules and templates ? For example if the
> admin change the language, the whole site should be changed to that
> language.
>   
It depends on how you handle this ! First, the differents translation 
for a sentence are stored in files and Cake choose the right one 
according to the language the user use.
The language is stored in the configuration. Of course, if you store in 
the core.php the language, it will be the same for all the users.
However, if you detect or store a "preferred" language in a profile for 
each user, you can change it by using :

Configure::write('Config.languages', $languages);
Configure::write('Config.language', $language);
Configure::write('Config.langCode', $langCode);

The change is made only in memory, no in the core.php file.
> 6. Where can I write common code ? For example, two controllers are
> using the same code for saving the records into the database (here all
> fields are same only table name is different). Can I use requestAction
> for this by writing the code in one controller and calling it from
> another controller ? Or should I use components for this ?
>   
You say that "all fields are same only table name is different". Maybe, 
but I think that is just "luck". That's two different tables, so two 
models, controllers
I'm not sure it's worth sharing the code for this example, but I may be 
wrong. Anyway, you can still write your own library and shared code as 
you did before with PHP. Then, depending on the purpose of this code, 
you can decide to use it for all the controllers, models or the whole 
application (including a "use/require" statement in app_controller.php, 
app_model.php or bootstrap.php)



--~--~-~--~~~---~--~~
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: Concurrency : need your opinion about this piece of code

2008-06-25 Thread Marc MENDEZ

Hi Francky,

Thanks for the time you take to answer me.

> In this process, there are 2 approaches, quite different
> .
> What I think is very frustrating is to  fill up a form (can be long),
> and find out that your time is lost because someone was quicker than
> you to post.
>   
You're right and it's obvious. I practices other languages in the past 
and, 'cause I didn't use Internet, I didn't have this kind of problem 
(Oracle Forms handles this quite well, but, of course, it's not the same 
technology). In facts, as soon as a user modify a record on his screen, 
the record is locked.
I wonder if it could be done this with Ajax and a kind of "observer"... 
But I don't know enough about Cake to plan this :)
On the other hand, the domain in which I work does not imply different 
users access the same record, or seldom. Now, the current application 
does not care about this problem : the last who talks is right !
Anyway, no solution is perfect.
> The other approach is to implement a "lock" mechanisms (I know it can
> be quite complex, mainly if the user shut down the computer etc ..but
> can be handled), to avoid other people being able to get a record for
> modifying when someone else can possibly modify it before you do ...
>   

> A part from this, I did not try your solution, but seems to handle the
> case, maybe a bit costive thought. Using the security component can
> avoid people to post after a certain time .. a way to explore ...
>
>   
I will use session with a timeout anyway. It may 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: Cant't change Columns or View

2008-06-25 Thread Marc MENDEZ

Hi,

It remembers me one of my mistake last week. As you created MVC 
interactively, check in the controllers generated if you don't have the 
following line :

var $scaffold;

If yes, comment it and check again

Let me know if it helps you !



skyrocket777 a écrit :
> Hi guys!!! fist of all thanks if you can help me!!! I have just
> started discovering CakePhp an find it very nice!!! I decided to
> create the Controllers, Models, then the Views interactively, but now
> that i have the code done, i have some columns in teh view that i dont
> want to be shown on the listing, i erased them but nothing happens. I
> removed the colums from the thml files, but nothing Can u help me?
> 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: Where do I find data before modification ?

2008-06-25 Thread Marc MENDEZ

Right solution ! I'll remember next time and I'll copy 100 times 
"callbacks in behaviors take the model as the first argument" ;)


grigri a écrit :
> callbacks in behaviors take the model as the first argument:
>
> function afterFind(&$model, $results, $primary) {
>   ...
> }
>
> On Jun 24, 4:51 pm, Marc MENDEZ <[EMAIL PROTECTED]> wrote:
>   
>> You're right : that may help you ;>
>> Here is it :http://bin.cakephp.org/saved/33964
>>
>> francky06l a écrit :
>>
>> 
>>> Yes, I need the URL of the bin after you posted 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: Where do I find data before modification ?

2008-06-24 Thread Marc MENDEZ

You're right : that may help you ;>
Here is it :
http://bin.cakephp.org/saved/33964


francky06l a écrit :
> Yes, I need the URL of the bin after you posted 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
-~--~~~~--~~--~--~---



Concurrency : need your opinion about this piece of code

2008-06-24 Thread Marc MENDEZ

Hi,

I asked a few days ago how to handled concurrency with Cake. Thanks to 
some members of this group, examples and time, I have a possible solution.
However, I need your experience to validate this solution.

I want to warn users when a record they save was modified in the 
meanwhile by somebody else.
I add a datetime column in the table called "tst" (I can't use 
"modified" column, 'cause the value of this column seems to be updated 
before the callback 'beforeSave'... and of course, I use beforeSave 
method !).
On the beforeSave(), I start a transaction and lock "for update" the 
record. Then I compare the tst value with the value I retrieved. If it's 
the same, I go on and update the tst value with the current datetime. If 
not, I halt the process with an error.
I must add in my view $form->hidden("model.tst").
I should do the same kind of process on beforeDelete()
If a deadlock or timeout occurs, I handle these errors somewhere else.

Any opinion ? A way to improve it ?

Thanks !

function beforeSave()
{
foreach ($this->data as $key=>$value)
{
if (!isset($value['tst']))
{   
continue;
}
$pkValue = $this->id;
$pkCol = $this->primaryKey;
$pkType = $this->getColumnType($this->primaryKey);
$db =& ConnectionManager::getDataSource($this->useDbConfig);
$db->begin($this);
$sql = "SELECT tst FROM " . $this->table . " WHERE " . 
$pkCol . " = ";
switch ($pkType) {
case 'integer': // TODO : add other numeric type
break;
default:
$pkValue = "'".$pkValue."'";
break;
}
   
$sql.=$pkValue. " FOR UPDATE";
$modifiedInDB = $this->query($sql);
if (!count($modifiedInDB))
{
   // Record deleted
$this->WWsetSqlErrMsg("Enregistrement déjà supprimé");
$db->rollback($this);
return false;
}
if ($modifiedInDB[0][$this->table]['tst'] != $value['tst'])
{
// Record deleted by somebody else
$this->WWsetSqlErrMsg("Enregistrement modifié par un 
autre utilisateur");
$db->rollback($this);
return false;
}
else
{
$this->set('tst',date("Y-m-d G:i:s",strtotime('now')));
}
}
return true;
}



--~--~-~--~~~---~--~~
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: Where do I find data before modification ?

2008-06-24 Thread Marc MENDEZ

Hi,

I'm paste the very simple example in the bin (first time, I hope it will 
work...)

Before posting, I tested the code.

Ask me  more if needed.

francky06l a écrit :
> Strange since the afterFind in behavior should be called. Maybe you
> have a problem in declaration or syntax ... Can you paste some code in
> the bin ?
> By the way I have implemented a similar behavior that stores the
> "delta" between modifications in a table, for an "historization" and
> eventual rollback.
>
> On Jun 23, 2:28 pm, Marc MENDEZ <[EMAIL PROTECTED]> wrote:
>   
>> To complete my request, I notice that if I use the afterFind method in a
>> Behavior class, I get nothing. However, if I call afterFind in the model
>> class, I get the right data...
>>
>> So, is there a difference between the two afterFind ?
>>
>> Marc MENDEZ a écrit :
>>
>> 
>>> Hi,
>>>   
>>> I'm working on models and behaviors.
>>> I'm developing a behaviour which will compare the "modified" field value
>>> in the database to its value I got when the record was fetched.
>>> On the "beforeSave" method, I thought the "modified" column was not yet
>>> changed to the current time, but I was wrong.
>>> I tried to get the original value in the afterFind method, but the data
>>> property is empty.
>>>   
>>> How can I do ?
>>>   
>>> Thanks for your 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: Where do I find data before modification ?

2008-06-23 Thread Marc MENDEZ

To complete my request, I notice that if I use the afterFind method in a 
Behavior class, I get nothing. However, if I call afterFind in the model 
class, I get the right data...

So, is there a difference between the two afterFind ?



Marc MENDEZ a écrit :
> Hi,
>
> I'm working on models and behaviors.
> I'm developing a behaviour which will compare the "modified" field value 
> in the database to its value I got when the record was fetched.
> On the "beforeSave" method, I thought the "modified" column was not yet 
> changed to the current time, but I was wrong.
> I tried to get the original value in the afterFind method, but the data 
> property is empty.
>
> How can I do ?
>
> Thanks for your 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: How to extend CakePHP Debugger class

2008-06-23 Thread Marc MENDEZ

Hi,

I think that if you use the query method, the onError is not called : 
override showquery is better.


AD7six a écrit :
> PS
> Model::onError
> >
>
>   




--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Where do I find data before modification ?

2008-06-23 Thread Marc MENDEZ

Hi,

I'm working on models and behaviors.
I'm developing a behaviour which will compare the "modified" field value 
in the database to its value I got when the record was fetched.
On the "beforeSave" method, I thought the "modified" column was not yet 
changed to the current time, but I was wrong.
I tried to get the original value in the afterFind method, but the data 
property is empty.

How can I do ?

Thanks for your 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: how to do custom exception handling

2008-06-23 Thread Marc MENDEZ

Hi,

As for me, I create my own DB driver class (extends of DboMysql) that I 
used in database.php
This class contains a showQuery methode, which is called by Cake to 
display any DB errors. I use an array ( ErrNumber => function_to_call) 
initialized in each model. If an error occurs and it's in this array, I 
call the function associated to. Otherwise, I call the parent:showQuery().

The function associated is as well declare in each model.

If it can help you


SajjadRaza a écrit :
> hi
> can any one tell me abt the built in mechanism of
> exception handling in cake php
> 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: Cache problem ?

2008-06-20 Thread Marc MENDEZ

gbk * a écrit :
> i have no idea...
>
> maybe there is something useful in your log files. have you checked
> them (webserver error log, php error log, /tmp/logs/error.log,
> debug.log)?
>
>   
I should not work on the last day of the week  When things are too 
obvious.   Just one word :

scaffolding


Too stupid I am, Too stupid I remain :(((

A HUUGEE Sorry for the disturb.

Should think about holidays




--~--~-~--~~~---~--~~
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: Cache problem ?

2008-06-20 Thread Marc MENDEZ

Next test :

I deleted app/views/essais and run bake again. I watched the folder and 
found, again the 4 views files in a new "essais" folder. So, now, I'm 
sure it's the right files and the right folder.
I edit the index.ctp and guess what . nothing , still the same problem !



--~--~-~--~~~---~--~~
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: Cache problem ?

2008-06-20 Thread Marc MENDEZ



gbk * a écrit :
> my tip is that this is not a cache issue.
> are you sure you are editing the correct file?
>
>   
My table is named "essais". The only one page on all my hard disk (I 
checked it !) dealing with this table and containg references to 
$paginator is in app/views/essais/index.ctp.
If I search for some other informations displayed by this view in my 
browser, I still find this index.ctp file

Anyway, there is even only one directory views : if I delete it and :
- try to access to an other view : it crashes (normal, the view file 
does not exist anymore)
- try to access to the essais view : it works !!

I agree with you : it sounds as if I was not talking about the same file 
! But which file !!

Completely crazy !
> On jún. 20, 14:20, Marc MENDEZ <[EMAIL PROTECTED]> wrote:
>   
>> I did a few tests :
>>
>> Any changes to index.ctp is ignored... Even worst : I renamed the view
>> folder corresponding to the model : it's still working !
>> But, if I edit the index.thtml fo an other model, it works !!!
>>
>> The only one difference :
>> - The old template was generated by the previous bake app; it's name *.thtml
>> - the new one used the features of Cake 1.2 and was generated by the new
>> bake app
>>
>> gbk * a écrit :
>>
>> 
>>> view cache files are generated into /app/tmp/cache/views.
>>> check out the folder, if it's not empty the cache is working...
>>>   
>>> gbk
>>>   
>>> On jún. 20, 12:01, Marc MENDEZ <[EMAIL PROTECTED]> wrote:
>>>   
>>>> Hi,
>>>> 
>>>> I'm a newbie and I have started last week studying CakePHP with the 1.1
>>>> release.
>>>> Yesterday, I upgraded my tests to 1.2 RC1 (the latest 1.2 available on
>>>> the website).
>>>> 
>>>> Up to this morning, I used view templ"ates generated with the previous
>>>> version of bake (but just corrected to work with 1.2);
>>>> Now, I have just generated model, controller and view using the bake
>>>> utility available with the 1.2 : works fine... but :
>>>> I decided to modify the index.ctp generated : the changes are not visibles 
>>>> !
>>>> I even deleted the index.ctp, it's still working ! It works as if the
>>>> index.ctp was cached.
>>>> I check the CACHE_CHECK parameter in the core.php : set to false !
>>>> 
>>>> What's wrong !
>>>> 
>>>> Help please, it drives me crazy !
>>>> 
>>>> BTW : I work with IE. I copied the URL and pasted it directly in a new
>>>> instance of FireFox : I get the same behavior ! So it's not a problem of
>>>> my web browser.
>>>> 
> >
>
>   




--~--~-~--~~~---~--~~
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: Cache problem ?

2008-06-20 Thread Marc MENDEZ

I did a few tests :

Any changes to index.ctp is ignored... Even worst : I renamed the view 
folder corresponding to the model : it's still working !
But, if I edit the index.thtml fo an other model, it works !!!

The only one difference :
- The old template was generated by the previous bake app; it's name *.thtml
- the new one used the features of Cake 1.2 and was generated by the new 
bake app



gbk * a écrit :
> view cache files are generated into /app/tmp/cache/views.
> check out the folder, if it's not empty the cache is working...
>
> gbk
>
> On jún. 20, 12:01, Marc MENDEZ <[EMAIL PROTECTED]> wrote:
>   
>> Hi,
>>
>> I'm a newbie and I have started last week studying CakePHP with the 1.1
>> release.
>> Yesterday, I upgraded my tests to 1.2 RC1 (the latest 1.2 available on
>> the website).
>>
>> Up to this morning, I used view templ"ates generated with the previous
>> version of bake (but just corrected to work with 1.2);
>> Now, I have just generated model, controller and view using the bake
>> utility available with the 1.2 : works fine... but :
>> I decided to modify the index.ctp generated : the changes are not visibles !
>> I even deleted the index.ctp, it's still working ! It works as if the
>> index.ctp was cached.
>> I check the CACHE_CHECK parameter in the core.php : set to false !
>>
>> What's wrong !
>>
>> Help please, it drives me crazy !
>>
>> BTW : I work with IE. I copied the URL and pasted it directly in a new
>> instance of FireFox : I get the same behavior ! So it's not a problem of
>> my web browser.
>> 
> >
>
>   




--~--~-~--~~~---~--~~
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: Cache problem ?

2008-06-20 Thread Marc MENDEZ

Yes, there are files : in models and persistents, but nothing in the 
view folder.

I deleted everything, but I still have the same view

gbk * a écrit :
> view cache files are generated into /app/tmp/cache/views.
> check out the folder, if it's not empty the cache is working...
>
> gbk
>
> On jún. 20, 12:01, Marc MENDEZ <[EMAIL PROTECTED]> wrote:
>   
>> Hi,
>>
>> I'm a newbie and I have started last week studying CakePHP with the 1.1
>> release.
>> Yesterday, I upgraded my tests to 1.2 RC1 (the latest 1.2 available on
>> the website).
>>
>> Up to this morning, I used view templates generated with the previous
>> version of bake (but just corrected to work with 1.2);
>> Now, I have just generated model, controller and view using the bake
>> utility available with the 1.2 : works fine... but :
>> I decided to modify the index.ctp generated : the changes are not visibles !
>> I even deleted the index.ctp, it's still working ! It works as if the
>> index.ctp was cached.
>> I check the CACHE_CHECK parameter in the core.php : set to false !
>>
>> What's wrong !
>>
>> Help please, it drives me crazy !
>>
>> BTW : I work with IE. I copied the URL and pasted it directly in a new
>> instance of FireFox : I get the same behavior ! So it's not a problem of
>> my web browser.
>> 
> >
>
>   




--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Cache problem ?

2008-06-20 Thread Marc MENDEZ

Hi,

I'm a newbie and I have started last week studying CakePHP with the 1.1 
release.
Yesterday, I upgraded my tests to 1.2 RC1 (the latest 1.2 available on 
the website).

Up to this morning, I used view templates generated with the previous 
version of bake (but just corrected to work with 1.2);
Now, I have just generated model, controller and view using the bake 
utility available with the 1.2 : works fine... but :
I decided to modify the index.ctp generated : the changes are not visibles !
I even deleted the index.ctp, it's still working ! It works as if the 
index.ctp was cached.
I check the CACHE_CHECK parameter in the core.php : set to false !

What's wrong !

Help please, it drives me crazy !

BTW : I work with IE. I copied the URL and pasted it directly in a new 
instance of FireFox : I get the same behavior ! So it's not a problem of 
my web browser.




--~--~-~--~~~---~--~~
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: Looking for Cook up Web sites fast with CakePHP (PDF Version)

2008-06-16 Thread Marc MENDEZ

. and what did u think I did too before I asked for it in the forum 
, hummm ;) ?

maybe the new release is too recent to be somewhere else than IBM 
website ? maybe everybody think there is no update and go on keeping the 
old one ?


leo a écrit :
> You could always google the title. That's how I found it.
>
> On Jun 16, 10:23 am, Marc MENDEZ <[EMAIL PROTECTED]> wrote:
>   
>> Sliv a écrit :> try a search on scribd.com
>>
>> It was the first place I downloaded the old version I have.
>> 
> >
>
>   




--~--~-~--~~~---~--~~
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: Looking for Cook up Web sites fast with CakePHP (PDF Version)

2008-06-16 Thread Marc MENDEZ



Sliv a écrit :
> try a search on scribd.com
It was the first place I downloaded the old version I have.



--~--~-~--~~~---~--~~
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: Looking for Cook up Web sites fast with CakePHP (PDF Version)

2008-06-13 Thread Marc MENDEZ

Sorry, you should have paid attention to my comment in parenthesis : 
01/2008
This serie was updated and several bugs fixed in January.
the cook_up_web_sites_fast_with_cakephp.zip file on the files section of 
the group is the old version.

I'm looking for the new one


Sliv a écrit :
> look in the files section for this group
>
> >
>
>   




--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Looking for Cook up Web sites fast with CakePHP (PDF Version)

2008-06-13 Thread Marc MENDEZ

Hi,

I'm looking for a PDF version of the latest version of "Cook up Web
sites fast with CakePHP" (*01/2008*).
I found the serie on IBM web site, but unfortunaltely only 3 of 5
tutorial are available in PDF. I have asked IBM, but no answer.

Thanks a lot




--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Access to the same record

2008-06-09 Thread Marc MENDEZ

Hi,

As a new comer to cakePHP, I have a few question with access to database.
Is there a simple way, with CakePHP, to handle dual access to a same 
record ?
Example :

Two users read the same data (let's say, the same record of a table). 
The first one edit and save this record ; the second user does the same 
thing. Of course, the changes committed by the second one will replace 
the changes made by the first user...

How can I handle easily this situation? I know it's not easy. Even if 
it's not perfect solution, isn't there a way to warn the second user the 
data changed when he commits ?
Isn't there a plugin to handle this ?
I could add a column containing a timestamp. It's read at the same time 
as the other cols. When I save the record, I check if the timestamp 
changed. If so, I raise an error. Otherwise, I update the timestamp too 
and commit.

I would be very disappointed if there was no mechanism to handle this.

Thanks for you light.







--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---