I used CakePHP 1.3, I want to migrate to version 2.
I have a problem of translation (russian lang), used po-file (app/
Locale/rus/LC_MESSAGES/default.po).
echo __('January') - work successfully
echo $this->Form->input('var', array('type' => 'date', 'dateFormat' =>
'DMY)) - displays the English name
Thanks for info, i was missing "parent::beforeFilter" in the
pagesController. After adding that, setting the view variables from
the AppController beforeFilter worked.
On Jan 17, 4:26 pm, euromark wrote:
> you shouldnt set any view vars to the view in beforeFilter
> this callback is not always t
Generally, cookies are not designed to be overused (many cookies or
large datasets stored in them), they are being sent to the server
along with every request.
If you _really_ want to substitute SessionComponent in whole
application with CookieComponent, try to remap used class:
class AppControll
All you need is this documentation page
http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#creating-custom-authentication-objects
Simple/straightforward way how to do what you want is this code in
place:
http://bin.cakephp.org/view/1497928407#modify
configured for usag
you shouldnt set any view vars to the view in beforeFilter
this callback is not always triggered - beforeRender, though, is.
also make sure you ALWAYS call the "parent::before..." method from any
of your controllers in those callbacks.
thats probably what is missing in your case
On 17 Jan., 23:2
If you're receiving undefined variable errors, track where those errors
come from. It likely lies in one of your two functions, _usersUsername or
_loggedIn. One of those methods must be relying on a variable that is set
after that beforeFilter is run. Stack traces are your friend.
--
Our newes
Hello,
I recently installed cakePHP 2.0.5 and I'm trying to send variables
from my AppController to my default.ctp layout. (setting up some Auth
components)
However when I put the set in $this->set in the beforeFilter I receive
"Undefined variable" error. However when I add them to a beforeRender
Just saw you made the 'inline' flag false which will place it in the header
for ya.
Good luck finding the IE issue!
--
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 C
Well I had a look for the problem in IE8 and I didn't find an answer.
Also I looked on Google and didn't find any good suggestions. I
tried: $this->disableCache();
On Jan 17, 7:28 pm, jeremyharris wrote:
...
> Also, I suggest you include jquery in the head tag assuming you use it
> elsewhere.
D
check your view file
it should be
second variable name should not be the same as array you are going through
--
Lep pozdrav, Tilen Majerle
http://majerle.eu
2012/1/17 Marin Marušić
> Hi,
>
> I'm having a problem with pagination from an external controller.
>
> So I have a view in PagesCont
Hi,
I'm having a problem with pagination from an external controller.
So I have a view in PagesController that should get paginated content
from NewsController, and this works. I get paginated content, but when
I do $this->Paginate->numbers();
I need numbers to show, because I need to automate t
Not sure where you heard/read about the scalability of sessions, but since
sessions are server side you eliminate the possibility of tampering
altogether. You could use sessions in the database instead, if you wanted.
I've never heard of storing user session states in cookies before.
--
Our ne
IE8 has developer tools that you can use to inspect and make sure that your
scripts are working and that your ajax call (again, network tab) goes
through.
Also, I suggest you include jquery in the head tag assuming you use it
elsewhere.
--
Our newest site for the community: CakePHP Video Tuto
Hi Cake Community,
how can i print query(Model->find(), Model->save(), Model->..., Model->...)
string before cakePhP does anything on database? Are there any settings for
this?
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Quest
Hi AD7six
Thanks for your answer.
Yes I've realized my mistake.
Off course it's a sql error and I was wrong when I though that this could
come from the treeBehavior because as you said : "The tree behavior does
not mix max() with other fields" and the other field come from another
behavior tha
Hi I've been trying to get AuthComponent to use Cookies instead of Session
variables.
I want to store user-information encrypted onto client-side cookies since
they're a lot
easier to scale than Sessions.
I tried to do this by copying AuthController to
/app/Controller/Component/AuthController.p
Great I am getting somewhere now. I found out that I needed to
download jquery and put it in my js folder. OK then I linked to it in
my view using:
Html->script('jquery', false); ?>
Now for some funny reason it works just fine in Google Chrome, but not
in Internet Explorer 8. In IE8 nothing ata
All the Js helper code does is define the javascript, yes. If your entire
page is truly reloading then the javascript isn't being executed, simple as
that. Make sure your buffer outputs in the , that JS is turned on,
and that your ajax request is successful (check the network tab on Chrome's
de
On Jan 17, 4:31 pm, jeremyharris wrote:
> When you say the captcha is displayed on its own, do you mean when you
> click the link the entire page is replaced with just the captcha?
Yes.
> If this
> is the case, then it sounds like the ajax is not firing. If it is firing
> (check with firebug), t
Hi Cake Community,
How can I print query beforeSaving, beforeRead, beforeDelete without to use
this callbacks( beforeSaving, beforeRead, beforeDelete)
I mean just a control ouput on screen!
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new
Good day.
I am trying to do some basic LinkedIn integration and am having a lot
of trouble with the CakePHP-LinkedIn plugin.
For the moment, I would just like to add an action to my
UsersController that dumps my LinkedIn profile. Nothing fancy, just a
basic print_r of the information received bac
I made a basic login, authorization script with cakephp 2.0.5 using
Auth component.
When I use Firefox to test the aplication everithing works fine both
on windows WAMP and on a virtualbox lamp (ubuntu).
However when I try to test the aplication with google chrome or
Internet explorer it works onl
When you say the captcha is displayed on its own, do you mean when you
click the link the entire page is replaced with just the captcha? If this
is the case, then it sounds like the ajax is not firing. If it is firing
(check with firebug), then the script will only replace anything in the
#capt
On Jan 17, 2:55 pm, jeremyharris wrote:
> Yes. And as you can see from that code, he updates only the captcha area,
> not the whole form itself, as I suggested 2 posts ago. Your reply even said
> that the code I gave you "just causes the captcha to be redrawn on its
> own." And that should be fine
I moved a project from a managed server to a server with some proxy
routing (apache mod_proxy).
But now request::referer() is always the domain itself (not the actual
referrer url) due to
$ref = env('HTTP_REFERER');
$forwarded = env('HTTP_X_FORWARDED_HOST');
if ($forwarded
DebugKit will show 0 queries if you have the sql element somewhere else,
since it clears the logs. If you're in debug mode then there will
definitely be at least a few queries each request because it doesn't cache
(rather, very shortly) the table schemas. Make sure you're not echoing the
sql lo
Yep, extra helpers are added when it's constructed. So for any class, make
sure you call it's parent constructor! Glad I pointed you in the right
direction :)
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://as
Yes. And as you can see from that code, he updates only the captcha area,
not the whole form itself, as I suggested 2 posts ago. Your reply even said
that the code I gave you "just causes the captcha to be redrawn on its
own." And that should be fine, assuming the captcha system you are using
u
Take a look at this page: http://givebackindia.com/contact-us
There is a captcha there. Looking at the source he has used some kind
of JS / AJAX event for updating the captcha:
Can not read this code? Reload.
//
Hi AD7six,
I have the same problem, using CakePHP and TinyMCE Plugin.
I saw here
(http://groups.google.com/group/cake-php/browse_thread/thread/e0b7196b7c00288/578c9d67a6b9525f?lnk=gst&q=tinymce#578c9d67a6b9525f)
that
it is a short_open_tag issue.. but one guy in another thread (
http://cakephp
In my case, the two relationships are belongTo. But in the example of
CakePHP documentation the first relationship is belongTo and the
second is hasMany.
http://book.cakephp.org/2.0/en/models/model-attributes.html#recursive
But I will try containable.
Thank you very much!
On 16 ene, 22:27, je
On 16 ene, 22:27, jeremyharris wrote:
> You said they are both belongsTo, but then you said the second relationship
> is hasMany.
>
> hasMany are pulled as a separate query, so calling it like this won't work.
> You can, however, use containable:
>
> $this->Comment->find('all', array(
> 'field
DebugKit SQL log shown 0 query, this is where I don't get it , why no
query when save() is used.
When I switch to scaffolding mode I'm able to add the data. The data
does show in the table so I'm sure that the correct table.
Is there any place that I might have missed ?
On Jan 16, 11:13 pm, jerem
This not enough?
http://book.cakephp.org/2.0/en/plugins.html#creating-your-own-plugins
--
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
0 down vote favorite
share [fb] share [tw]
I am running Ubuntu 11.04 with Apache/MySQL/PHP5 installed. I
completely followed the installation process form this link:
[http://developify.wordpress.com/2011/08/12/install-cakephp-on-ubuntu/]
[1]
And I ended up in a CakePHP default page with no colo
Hi, I'm trying to learn how to bake a CakePHP plugin starting by a PHP
class I've written useful to validate images and upload them, I really
would like to do it but I haven't found a full tutorial from the
beginning to the end on how to bake a CakePHP plugin for some task.
I've found many plugin
36 matches
Mail list logo