For now i have to set my image field in controller before saving it as
i am hurry with my project.So i have to use another component to
upload file and get filename lik $this->request->data['HowItWork']
['image']=$this->uploadFile->upload(...); like
public function admin_add() {
if
Ye as i said earlier i am using a function in beforeSave to upload the
image and set a variable to that uploaded image name.This was fine
when there was no i18n table.I used this in my other projects which
doesn't have multilanguage.But it's not working for i18n table.I am
using 'upload_image' as f
Heya,
After a lot of digging into the core, I found that Cake now uses
PDOStatement->getColumnMeta -
http://php.net/manual/en/pdostatement.getcolumnmeta.php
- to determine what tables each column in query results belong to.
Because I had installed PDO MySQL through PECL (which has been
deprecated
Can you use the ACL group based permission and the Auth Component with
controller based permissions at the same time? Or were they meant to
be used separately? And if you can use them together, which takes
precedence in the order of operations?
--
Our newest site for the community: CakePHP Video
@msujit do you use a Behavior in your attachment model to set the
title and to create thumbs before inserting them in the database or
everything is inside the model?
I have tested to set a new 'title' field in me form and this title got
inside the i18n table.
On Nov 23, 5:43 pm, Constantin FF wro
Where you see the codes in the view, they do not get populated. However,
the first name and the last name do get populated. Not all of the rows
have an rih_code, has_code or mir_code, but they have at least one in each
column (they can be NULL after all). What could cause some of the values
to n
I created new Debugtranslate Behavior just to find the reason of not
saving the attachment title and body in the i18n table
Here is the behavior
__settings[$Model->alias])) {
$this->__settings[$Model->alias] = array(
'fields' => array(),
);
}
My application is running normally, the error is when I run: Application/
Console/cake bake
PHP Warning: include(Cake/Console/ShellDispatcher.php): failed to open
stream: No such file or directory in
/media/arquivos/www/repositorios/cakephp/aplicacao-cake/Console/cake.php on
line 36
PHP Warnin
Hi,
I am testing a model in CakePHP 2 and have mocked a model like this:
$this->User = $this->getMock('User', array('_saveUploadedFile',
'_removeUploadedFile'));
$this->User->expects($this->any())
->method('_saveUploadedFile')
->with($data, Configure::read('App.myDirectory'), true
Is this an intentional change in 2.0?
That if I call
/plugin_name/controller/action/
and if happen to have a controller with the same name in /app/
Controller dir
that it uses the local controller in app dir instead of plugin dir?
I have a "ConversationsController" in the plugin "Messaging"
I also
Hi guys,
Today I made my first attempt at using 2.x but I've gotten thoroughly
stuck at what seems to be a bug.
- I have three models: Ticket, Project, User. Ticket belongsTo Project
and User with no declared parameters.
- In the Tickets controller, I'm just doing a $this->Ticket-
>find('all').
-
I'm not sure if you're trying to use the Post -> Period association or
the User -> Period association.
As Jeremy says, If your periods table has a foreign key into the posts
table, the foreign key should be period_id. You should then have the
association set-up in your Post model. Bake can setup
The only thing I can suggest is to add the mocked method to your
generate function :
$this->Users = $this->generate('Users', array( 'components'
=> array('Session', 'Auth' => array('user') )));
Not sure if it would mock the method otherwise.
On Nov 23, 6:13 am, elitalon wrote:
> I am
Hi,
On Wed, Nov 23, 2011 at 4:09 AM, mmhan wrote:
> I was just curiously checking out some of the core code in github and
> stumbled upon this.. I'm just wondering the reasoning behind it.In PHP4...
Yes, in PHP4...
$obj2 = $obj;
... would assign a copy of $obj to $obj2. i.e. an entirely diffe
Why didn't I think of that? Thanks. Slaps head.
Jeremy Burns
Class Outfit
http://www.classoutfit.com
On 23 Nov 2011, at 12:36, rchavik wrote:
> On Wednesday, November 23, 2011 6:56:16 PM UTC+7, Jeremy Burns wrote:
> Makes no difference - but then why would it?
>
> I think I have misunderstood
On Wednesday, November 23, 2011 6:56:16 PM UTC+7, Jeremy Burns wrote:
>
> Makes no difference - but then why would it?
>
I think I have misunderstood your issue.
I've tried again with this:
'first_name' => array(
'maxlength' => array(
'rule' => array('maxleng
we would need to know about the database used and we also would need
to see what exactly the declaration for the field is.
show us some code or sql create table/field snippet etc
On 23 Nov., 10:17, Gerrit wrote:
> Hey,
>
> I've a problem with my DB float fields in Cake 2.0. My find-operation
> r
Hey,
@msujlt: you should always 'name' your tanslated fields, but I think
cake does not force this.
You then should remove the old field from the table (e.g. table
attachments, field title).
When you SAVE your racords (add/edit), you have to set the locale for
your model:
$this->Attachment->local
and the submodule(s) within only the one so far as I see
but
git submodule update --init --recursive
- S
On 23 November 2011 10:08, Andras Kende wrote:
> PHP Fatal error: Could not locate CakePHP core files..
> Since cake is a submodule in that repo You may need to something like
>
> git
'last' => true should be the default for 2.0 anyways
as I suggested a few months ago in a ticket. (although, as I
understand, 2.0 seems to be capable of returning an array of errors
instead of a string)
I'd love to understand it, as well, as I, too, have the feeling of
losing control over the vali
100% Granted!
On Wed, Nov 23, 2011 at 2:18 AM, Jeremy Burns | Class Outfit <
jeremybu...@classoutfit.com> wrote:
> Don't just rely on recursion. Always use the containable behaviour.
>
> Jeremy Burns
> Class Outfit
>
> http://www.classoutfit.com
>
> On 23 Nov 2011, at 02:05, Ma'moon wrote:
>
> If
Makes no difference - but then why would it?
Jeremy Burns
Class Outfit
http://www.classoutfit.com
On 23 Nov 2011, at 11:53, rchavik wrote:
> What about adding 'last' => true in the rule ?
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out
That's what I imagined too, but this example field has a default of NULL yet it
is coming through as required. It seems that adding a validation rule (in this
case maxLength) trips the form helper up and it's displayed as required.
I get your point about moving the logic to an attribute on the f
What about adding 'last' => true in the rule ?
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email
I think its the database schema - if you set default NULL or default
NOT NULL
although I always thought of this as not very helpful (since the forms
are usually not 1:1 what the schema defines)
so in 1.3 I hacked the form helper to avoid adding those rules
automatically.
if I want them to, I would
My translate behavior is like this:
public $actsAs = array(
'Translate'=>array('title','content','image')
);
I am using single i18n table for all tables.'title' and 'content' are
saved but 'image' is not saved as i am using image field as file type
and doing extra proc
This seems like such a basic question but it often gets me. What is
the logic that determines whether the form helper marks a field as
required or not? For example, I have a varchar field that can be null
and accepts up to 100 characters. I have set a maxLength validation
rule (that also has requir
Still not solved!
And I dont get anything saved in the i18n table
Attachment Model:
var $actsAs = array('Tree',
'Translate' => array(
'title' => 'titleTranslation',
'body' => 'bo
Hey,
I think I can help you with that...
Please paste your translate behavviour config from the model so we can
see that it's configured correctly
On 23 Nov., 12:20, msujit wrote:
> Hai,
> Did you managed to solve it?I am also having exact proble.I am
> trying to save image string
Hai,
Did you managed to solve it?I am also having exact proble.I am
trying to save image string to i18n table but it's not saving but
other fileds like title,content are saved in i18n.
On Nov 23, 2:05 pm, "Constantin.FF" wrote:
> My Attachment model actAs Translate to be able to translate
Hey,
I'm trying to get a htaccess permanent redirect to work. I have a
route defined from one url which is a controller ('types'), and my
route is going to 'type-selection'. That's working fine.
But search engines STILL use the link 'types' to get to the index of
the types controller, and that ge
PHP Fatal error: Could not locate CakePHP core files..
Since cake is a submodule in that repo You may need to something like
git clone https://github.com/gilvaju/aplicacao-cake.git
/media/arquivos/www/repositorios/cakephp/aplicacao-cake/
cd /media/arquivos/www/repositorios/cakephp/aplicacao-ca
I am not getting that issue, so I don't think it's Cakebook that is causing
your problem.
Jeremy Burns
Class Outfit
http://www.classoutfit.com
On 22 Nov 2011, at 23:28, Vigrond wrote:
> Cakebook crashes Flash on Chrome
>
> This issue has existed for at least a year now, and it's extremely ann
Hey,
I've a problem with my DB float fields in Cake 2.0. My find-operation
retrieves string instead of float. Does anyone know why?
Thanks!
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and h
I am using the ControllerTestCase, so I have modified the generated
controller using the following code, which is a slightly modified
version of your suggested approach:
$this->Users = $this->generate('Users', array( 'components'
=> array('Session', 'Auth') )); $this->Users->Auth-
>e
My Attachment model actAs Translate to be able to translate the image
titles, I get the attachment saved in it's attachments table, but
nothing goes to the i18n table. This is the beforeSave model data:
Array
(
[Attachment] => Array
(
[parent_id] => 0
[type] =>
We're an early stage SaaS product startup in Noida (India) and are
building our product using cakephp. We need more developers to help
us! If interested pls contact me.
thanks,
DG
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Ques
Cakebook crashes Flash on Chrome
This issue has existed for at least a year now, and it's extremely
annoying. I have no idea what causes it. But whenever it happens, I have
to restart my browser only to have Flash crash again after a while.
I have oftentimes 20-30 tabs open at a given time, w
I was just curiously checking out some of the core code in github and
stumbled upon this.. I'm just wondering the reasoning behind it.
It is a if block in Controller::loadModel()
https://github.com/cakephp/cakephp/blob/1.3/cake/libs/controller/controller.php#L630
if (!PHP
Is this Cake 2.0? Do you have PDO enabled?
http://book2.cakephp.org/en/installation.html?highlight=pdo
Jeremy Burns
Class Outfit
http://www.classoutfit.com
On 23 Nov 2011, at 01:09, amy wrote:
> I just follow the toturial
>
> Here is the configuration in database.php,
>
> class DATABASE_CONF
Does your posts table have a field called period or is it period_id? If it's
period, that's bad database design. You should change it to period_id so that
it relates to the id column in the periods table. Then your problem is an easy
one to overcome using table associations.
Jeremy Burns
Class
Guys, I have the following application:
https://github.com/gilvaju/aplicacao-cake
The core of the cake moved to Lib folder inside the application folder. Just
use the console can be called directly from the coreand not the folder of
the Console application, gives the following error:
PHP Warni
I just follow the toturial
Here is the configuration in database.php,
class DATABASE_CONFIG {
public $default = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'port' => '',
'lo
On Tuesday, 22 November 2011 17:15:47 UTC+1, Taby wrote:
>
> Hola, que tal?
> necesito de ayuda de alguien que pueda ayudarme con este error
>
Please post to an appropriate group
https://groups.google.com/forum/#!forum/cakephp-esp
AD
>
--
Our newest site for the community: CakePHP Video
44 matches
Mail list logo