Hi, I have a simple HABTM with a lessons/Students table. i simply create a
new lesson with an existing student via a while loop , so I should get 2
new rows. I am testing this function. What I get is 4 new rows in the
lesson table instead of 2. I have no idea why the extra 2 rows are created
I did this and i cant see anything unusual
?php
App::uses('AppModel', 'Model');
/**
* Subject Model
*
* @property Lesson $Lesson
* @property Student $Student
* @property Tutor $Tutor
*/
class Term extends AppModel {
var $displayField = Title;
public function get_current_term ( ) {
Hi, I cant get any onchange event to fire. I just want to disable a textbox
when some options are selected.
I used id and name in textbox but I cant get thus to work as when i click
the radio button nothing changes.
I used radio buttons
echo
Is there an answer for this ? I am sure I can get it with an example please
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups
CakePHP group.
To unsubscribe from
In cakephp I have some code which saves data without a table and I have no
idea how.
The model,controller show nothing like below it works fine but there is no
tablecalled terms
?php
App::uses('AppController', 'Controller');
/**
* Subjects Controller
*
* @property Subject $Subject
*/
$terms=$this-Term-find('all' ); //displays everything and you can edit
these fields in another page.
There is no table called terms in any database I have.
How is this happening?
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You
I still cant get this to work with paginate but i can with find all
, so there has to be a way
$options['recursive'] =-1;
I still cant get this to work with paginate but i can with find all ,
so there has to be a way
$options['recursive']
Hi, in cakephp I used a 'find all' to do a complex and this works fine as
below. My issue is I am trying to convert this to a set paginated results
and I keep getting offset warning Illegal offset type
[CORE\Cake\Model\Model.php, line 2936.
I am sure the issue is simple but is there a way to
Hi,
In cakephp I can add search filters and change the post vars into Get as
below. This works fine. My problem is how do go to another page found from
the list of searches and return to the same page? All search filters are
gone when i return as I am not storing them.
eg I search for
I had a look it and it looks difficult to use.
NOt sure if this is the best way to go and where is a complete example and
ability to go back to the page?
This doesnt really help
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You
You mean use get instead of post?
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups
CakePHP group.
To unsubscribe from this group and stop receiving emails from
Hi, In cakephp
I keep getting a page out of range error.
The problem only happens when I am page:2 or above and I perform a search.
The search works fine unless this is only 1 page found and then I get the
error if the URL has page 2 or above.
I tried resetting the page no, to 1
Hi,
In CakePHP, I am trying to create a autocomplete function from a textbox,
using this tutorial:
http://bakery.cakephp.org/articles/matt_1/2011/08/07/yet_another_jquery_autocomplete_helper_2
I keep getting a Error: AutoCompleteHelper could not be found. Undefined
index: autoCompleteText
In CakePHP, I am trying to create a autocomplete function from a textbox,
using this tutorial: http:
//bakery.cakephp.org/articles/matt_1/2011/08/07/yet_another_jquery_autocomplete_helper_2
I keep getting a
Undefined index: autoCompleteText
I solved the helper issue as it finds the
I checked the docs and the autocomplete tutorial is for cakephp 1.X
To use it for cakephp 2.X I couldnt get it to work so I am stuck
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed
In CakePHP, I am trying to create a autocomplete function from a textbox,
using this tutorial:
http://bakery.cakephp.org/articles/matt_1/2011/08/07/yet_another_jquery_autocomplete_helper_2
I keep getting a Error: AutoCompleteHelper could not be found. Undefined
index: autoCompleteText
I am
Hi,
My email code for cakephp worked fine when I used gmail but not for this
provider below.
I am not sure what to do as I have all the correct information.
The error get is timed-out
[code]
config/email.php
public $gmail2 = array(
'from' = array('x...@xx.com.au' = 'Aptutoring'),
Hi,
My email code for cakephp worked fine when I used gmail but not for this
provider below.
I am not sure what to do as I have all the correct information.
The error get is timed-out
[code]
config/email.php
public $gmail2 = array(
'from' = array('i...@aptutoring.com.au' =
Hi,
I am having problems with cakephp email.
I have this weird problem where my below email code works fine on my local
server but not on the remote server.
The error I get is
SMTP Error: 534 5.7.14
https://support.google.com/mail/bin/answer.py?answer=78754
u5sm29708221pdh.54 - gsmtp
which
I can already create and save emails with cakeemail so forget about this
issue .
I dont have a cakephp issue I have a problem getting the API mailchimp to
connect and then being able to access emails.
Composer is never simple . If I am going to to get this to work then it
will be easier of
Hi, I want to be able to view emails in a cakephp page sent via mailchimp.
The API is here but
Here are the instructions https://github.com/dereuromark/cakephp-mailchimp
1)Install the plugin into the APP/Plugin folder, ideally via composer.
//how? I just copied the extracted zip folder
Ok I used ssl and this worked as is
public $gmail2 = array(
'host' = 'ssl://smtp.gmail.com',
'port' = 465,
'username' = 'jxxxm',
'password' = 'j',
'transport' = 'Smtp',
);
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter
Hi,
This has no effect and I get the same dumb error which tells me nothing.
$Email = new CakeEmail();
$Email-from('jagg...@gmail.com');
$Email-to('jag...@gmail.com');
$Email-subject('About');
$Email-message('My message');
$Email-send();
--
Like Us on FaceBook
removing email from components has no effect i should have said
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups
CakePHP group.
To unsubscribe from this group
A lot of people have problems with this issue on stackoverflow buthe
solutions are not clear
2014-12-29 22:44:07 Error: [SocketException] SMTP timeout.
Request URL: /crm5/aptemails/test
Stack Trace:
#0 D:\AA-website design\crm5\lib\Cake\Network\Email\SmtpTransport.php(157):
Hi,
I already have this line below and it doesnt work at all.
I just get timed out and if I increase the time to -1 in php.ini it does
nothing
Whats wrong with this cakephp email as this is annoying now.
$Email = new CakeEmail('gmail');
--
Like Us on FaceBook https://www.facebook.com/CakePHP
I cant send an email as I get a generic error
*Error: * An Internal Error Has Occurred.
In config\email.php I have this for a real gmail account(pswd hidden)
public $gmail = array(
'host' = 'smtp.gmail.com',
'port' = 465,
'username' =
Hi,
I cant send a email from my localhost xampp/win7
I dont get an error , I just get nothing
I set up the email and also config. I read the docs and couldnt see
anything on this.
http://book.cakephp.org/2.0/en/core-utility-libraries/email.html
$Email = new CakeEmail();
This isnt working and I need help as I cant fund help from the docs.I set
up the settings and in the config file I have
public $gmail = array(
'from' = array('jagguy...@gmail.com' = 'Aptutoring'),
'host' = 'localhost',
'port' = 25,
'username' = 'm...@gmail.com',
Hi,
How do you compare time arrays in cakephp?
I tried to convert the time to a string without success as I get the same
string over again or false.
There has to be an easy way which is hidden somewhere in cakephp docs
which I couldnt find?
Hi, In cakephp 2.5.x I am trying to download an uploaded file from the
server.
The code below works fine on my computer but when I upload the same code to
a copy of the same working cakephp project on a remote server I get this
503 error. If I remove the line to download
Hi, I am trying to open a file that has been uploaded to attachments folder
on a cakephp project. I have a list of files I select after uploading .
This works fine on my PC but on the remote server it is throwing a 503
error which I have no idea in what to do . The error logs show nothing.
Hi, In cakephp I cant set the selected option on a dropdown list when i
post.
Wjat happens is that I select an option and Post. Then the controller will
find the data and go back to the same page but the selected value in the
selected list is the the default.
So I should select a date from
To makes things clearer I can save multiple records at once. I can add
fields to these records manually as I need to add additional fields that
the user cant add in themselves.
The problem is also i dont want to save associated models and just 1 model,
so saveAssociated is not what i want. I
Hi, I have a simple question. I display some data from a table and all I
want is the user to check the checkbox and click a button.
The button will then pass all the data to the controller Post? and I just
go through an find out what checkboxes have been checked with the ID .
Like a list of
There has to be a simple answer but I cant add in a field to a array with
multiple records . I can do it with a single records but multiple
records are different. The below code doesnt allow me to save a record. I
can use another save command and add the records but no extra fields.
Hi , I just want to add a new row of a table from a form of an exisitng
table row.
The issue is I can get the data from the existing table called Tutor but I
cant save this data and other fileds I need to ass to the new table called
TutorEdie
public function tutor_edit($id = null) {
I cant get post to work and create a new row. I copy a table from an
existing table with new fields and this works if i use put (overwrites)but
I dont want put as i need a new row.
//controller
if ($this-request-is('post')) { //doesnt work
2.5 but I checked many posts on the issue and I dont think that makes any
difference.
The only solution was to chmod the app/tmp folders and subfolders but i did
that.
I am using cpanel and have no command prompt to run scripts
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us
Hi,
How do I pass the date field below entered as a parameter so I can search
the date?
echo $this-Form-input(
'custom date',
array(
'type' = 'date',
'selected' = array(
'year'=date('Y')
),
'minYear' = date('Y') ,
'maxYear' = date('Y')
I want to add a new record in a table called TutorsSubject. This table is
created from HABTM relationship of Tutor and Subject. Anyway I load the
subject names in a text box and I can select a subject name but I cant add
a new record. I need to set the id of the tutor_id.
There are 3 fields
But I dont need a saveall as I save to 1 table only ? Saveall is not
appropriate for this. I am not sure what to do here.
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the
Hi, I cant get this simple join to produce records. I am trying to link a
HABTM model with joins but I dont get any records from the joined tables.
I want all the subjects for tutor id =2 but as you see I get NULL and I
have tried different recursive levels. i should not get NULL in the other
I tried this and as expected it doesnt work and it cant work because HABTM
is a different case.
THis has to be the hardest framework to just get data to display from
tables. There just is no docs for a complete example.
$student= $this-Lesson-find('all', array('contain' = array( 'Student'
,
Hi Stephen,
Yes your example was a great effort and I solved the problem. The issue is
that I didnt add the fields argument in so this kept giving me undefined
errors.
I dont think your code will work as you dont specify fields.
Your models are setup like mine s that was really well done.
Also
I just need to get the details from a find all across 4 associated tables.
I looked at the docs and I can get the data from 2 tables but not the other
tables.
I have a lessons table where I get the relevant tutor id rows to display
only. This works fine. I have a lessons-students table related
I cant get the student name to appear or student id
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups
CakePHP group.
To unsubscribe from this group and stop
Hi ,
I have the odd situation where I can retrieve data from a HABTM model (from
debug array)but cant actually display any of it in the view. I keep getting
index undefined error for everything. I want data from both tables but it
doesnt work
//view doesnt work
foreach ($student as
I am having all sorts of problems and the docs for this is just awful. I
have looked into simply getting data from the linked tables and after HOURS
no one can give me a working example. I can only assume that this is hard
to do or maybe it cant be done?
'The relationships are
Lesson (main
No this is not what you do as the Student has a HABTM relationship and I am
told to do joins.
Also when saying adding something I NEED the code as please dont assume by
adding containable I know what your talking about or the docs explain
things.
I dont understand why simply getting
Hi ,
How do I display paginate data from a linked tables.
This is data from a Tutor table but I need data from the linked lesson
table which has a student_id and that lesson table is linked to the student
table.
So I have a tutor to lesson link in the model and a student to lesson link
in the
OK I have the answer. It isnt anything to do with htaccess or routing. This
is a authenticate issue as I thought it would be.
*property *AuthComponent::$unauthorizedRedirect
Controls handling of unauthorized access. By default unauthorized user is
redirected to the referrer URL or
The issue is that the router adding to the subfolder where the project
resides in and not the root dir which I cant access with routing.
I cant get to the desired page for unauthorized users.
Router::connect('/', array('controller' = 'users', 'action' = 'login'));
this routes to crm/crm/...
Hi,
I started it again and the problem was I had email as the username field.
Cakephp is looking for username
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups
Hi,
I can authenticate a user but I get problems when a user tries to access
from the address bar a webpage it hasnt got access to.
What happens is that I get routed to the base index file with
missingControler error.
SO my path is /crm/students on a webpage the user should not access and
This didnt work.
If the user tries to type the url manually in the adress bar then
isauthorized doesnt route the unauthorized user anywhere but root dir and
how do i code for this?
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You
//ajt
public $components = array(
Email,
'Session',
'Auth' = array(
'loginRedirect' = array('controller' = 'users', 'action' =
'dashboard'),
'logoutRedirect' = array('controller' = 'users','action' =
'login' ),
'authorize' = array
the user is not authenticated and if they try to access a webpage they
shouldnt then surely I can code for this .
The problem doesnt happen if authentiation isnt used so it must be able to
be controlled with authentication otherwise how does ./htaccess have any
idea
of what user is accessing a
I still cant get this to work, htaccess is not the answers for unauthroized
users.
If it is then could someone please show me the code.
How does cakephp handle unauthroized access from the address bat?
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter
the problem is that I can log in with any user when I shouldnt. if the user
isnt admin it will still access admin only webpages.
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to
This function wont work as I get no output
public function isAuthorized($user) {
// Admin can access every action
debug($user['role']);
debug(asdd);
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter
Hi, I cant authenticate users when I login in using appcontroller code . I
login with a non admin role and I still get through. . In fact I dont get
any error and no debug value appears so the isAuthorized($user) doesnt
work.l use the same code without email and used username in another
Hi,
I cant get the paginate to display with a condition,
I have checked the docs and other posts and cant see what I have done wrong.
I dont get an error but just no output
if (isset($this-request-query['address_suburb'])) {
$suburb=$this-request-query['address_suburb'];
Hi,
I am using paginate with a search box. It works fine until I use a drop
down box to select values rather than use a textbox.
I cant get the selected value from a dropdown box to appear in the
querystring.
So I just select a value in a textbox and then click search , i then get
the values
I actually get the index value if the drop down box and no the value.
How do I get the value as this doesnt get the value ? $tsub=
$this-request-query['address_suburb'];
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received
Hi,
How is Jpgraph supposed to integrate with cakephp? In the controller or the
view do i place the code to construct the jpgraph ?
The old way is to display a jgraph with an image which is a call to another
view but that way doesnt appear to work with currect cakephp.
The problem is that
Hi,
How is Jpgraph supposed to integrate with cakephp? In the controller or the
view do i place the code to construct the jpgraph ?
The old way is to display a jgraph with an image which is a call to another
view but that way doesnt appear to work with currect cakephp.
The problem is that
I found out I need to install highcharts with json and I am usure on what
to do.
I have run composer.exe
I am having an awful time creating a composer.json file to install
highchartsPHP for windows cakephp.
I dont know how exactly to create a file.
The examples I have for cakephp composer is for
it has been 2 days since I started and I have got no where fast.
Just tell me please how do I install higharts in cakephp so i can use it.
I need to load data from mysql to do the graph
JPgraph is another package and unless there is instructions on how to
install and use it with php code (not
Hi,
I tried to get this working but
I just get an error as there is no name anywhere on my computer
'ghunti/highcharts-php:~3.0'
composer require 'ghunti/highcharts-php:~3.0' gives an error of 'could not
parse version constraint ~3.0, UnexpectedValueException
1)I have the download called
If I run a cakephp script 'in a controller' with highcharts I just get a
highcharts not found error.
In vendors I have the highchartsphp dir with src files and I place these
files as well in highcharts.
I have the files and they seem in the right dir but I cant get this to work.
eg I have
I am trying to use highchart in cakephp
I still get a highchart not found.
I downloaded highchartPHP and placed all the 4 files in
`Vendor/HighchartsPHP`
In the layout I add the lines with the actual js files in `webroot/js`
echo $this-Html-script('jquery-1.9.1.min'); // Include jQuery
Hi,
I need to use cakephp with data from the mysql and your example is just a
jquery separate from cakephp.
.
I cant setup highchartswitjh cakephp as there is no instructions for use
with cakephp.
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter
To use highchart I follow the below and I get a highchart not found error.
This is really poorly explained and i have highchart.js, highchart.php in
vendor. There is 4 files on highchartPHP and they all go where?
what am I missing?
https://coderwall.com/p/c6yasq
--
Like Us on FaceBook
Hi,
I need to do some graphs in cakePHP and I am getting bigged down and wht to
use and how to install it.
1)Jgraph is used with cakephp but the examples are for cakephp v 1 and
dated 7 years ago. This looks outdated
http://bakery.cakephp.org/articles/cguyer/2007/12/26/using-jpgraph
Here is another which is explained better than highcharts
http://www.startutorial.com/articles/view/how-to-use-jqplot-in-cakephp
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to
Hi,
I am having problems finding a working acl example. This example points me
to the below links which doesnt work.
maybe I can fix these up if someone knows how.
So add some groups and users using the baked forms by browsing to
http://example.com/groups/add and http://example.com/users/add.
Hi,
I am trying to setup cake console in win7 and run cake bake as in the link
below.I set up the env variable in win7 as below with a php and cakeapp
entry in this Path.I have easyPHP 12.1 and php works fine. I get an error
with php in failing to load. dynamic library but the php dir is in
Hi,
In cakephp can you post data then display this data back on the same view /
I want the user to enter in data to search by and the results appear in the
same page.
I tried the below but I cant get anything to display on the same page.
public function displayform() {
if
ok this works. It displays the same function 2 times and just appends the
data to the same form
public function displayform() {
$test='hello';
$this-set('test',$test);
if ($this-request-is('post')) {
$t=$this-request-data;
$tt=
There just is no user being displayed with the below, there is with Teacher in
the find if I add it but every field is undefined in the view.
$this-Tutorsession-recursive = 2;
$contain = array('Teacher' = array('User'));
$this-set('tutor', $this-Tutorsession-find('first',array(
yes thats it, I just didnt know how I referenced it and with this code.
This took hours to solve so well done
$this-Tutorsession-recursive = 2;
$this-Tutorsession-Teacher-contain('User');
$this-set('tutor', $this-Tutorsession-find('first',
array(
I set recursive to -1 and it doesnt work as I get user error again.
Recursive set to 2 is what works
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups
CakePHP
Yes this works without recursive
$contain = array('Teacher' = array('User'),'Student' = array('User'));
$this-set('tutor', $this-Tutorsession-find('first',array(
'conditions' = array('Teacher.user_id' = $id),
'contain' = $contain
)));
--
Like Us on FaceBook
Hi,
I just want to display fields from 3 tables which I have checked on how to
do this and I am not clear on this. Examples I have found concentrate on 2
fields or keyed in conditions on multiple tables.
I have models all related in some way.
I want the username from a tutorsession table and
This doesnt work as I get an error when displaying the username from the
associated table.
I guess i am doing something wrong still.
$this-set('tutor', $this-Tutorsession-find('all',
array('conditions' = array('Teacher.user_id' = $id)
,array('contain' =
This still doesnt work as I get an error when I reference the user table
which should be linked unless I need to do this another way?
view
echo 'td'. $item['User']['username'].'/td'; ///error user undefined
$this-set(
'tutor',
$this-Tutorsession-find(
'first',
array(
'conditions' =
Hi, Is this is the correct way to find a 1 field in 1 row of data?
I just want the teacherID of a row of a given userID but I never get a
match
$currentuserid=AuthComponent::user('id');
$teacherid=$this-Teacher-find('first',array(
'conditions' = array('Teacher.user_id' =
Hi,
I am confused about how the User table is linked to other tables.
To keep things simple I have a working version of a linked cakephp/mysql
that can display ,add,edit records.
I add in security with a admin role who can see every page.
Everything is OK but I will need to add users with access
89 matches
Mail list logo