Questions tagged [cakephp-3.4]

Questions about the 3.4.x branch of the CakePHP MVC framework. Use this tag in combination with the general [cakephp] tag. If your question applies to CakePHP more generally, use only the [cakephp] tag.

CakePHP 3.4

CakePHP is a PHP development framework using Associative Data Mapping, Front Controller and MVC design patterns.

Version 3.4.0 was released in February 2017.

Resources

138 questions
0
votes
1 answer

build full url for directory inside webroot in cakephp 3

I'm working in CakePHP 3.4. I have an image outside img directory, in files directory under webroot I have a files directory inside webroot along with css, img, js. I tried using it like $this->Html->image(WWW_ROOT . 'files' . DS .…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
0
votes
0 answers

CakePHP3: can't get localisation working

According to the doc, I prepared my localisation files: /src /Locale /... /es_ES default.po my default.po contains something like msgid "Oui" msgstr "Sí" msgid "Non" msgstr "Non" msgid "Continuer" msgstr…
fralbo
  • 2,534
  • 4
  • 41
  • 73
0
votes
1 answer

CakePHP3.4: Why Request::getHeader() returns an array?

I have the following request: 2017-04-05 06:53:31 Error: Cake\Http\ServerRequest Object ( ... [_environment:protected] => Array ( [HTTP_REGISTRATION] => eur73_9lhfQ:...SJMryPxCNzKcqSufdpFMOaux ... ) …
fralbo
  • 2,534
  • 4
  • 41
  • 73
0
votes
2 answers

label not working with date select in cakephp 3

I'm using form helper to input date select as follows echo $this->Form->date('date_from', [ 'empty' => [ 'year' => 'Choose Year', 'month' => 'Choose Month', 'day' => 'Choose Date' ], 'label' => 'Date…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
0
votes
2 answers

CakePHP 3.4: how to cache virtual fields

Is there a way to cache virtual fields? I mean automatically, with the entity to which they belong, because I understand that, even if an entity is retrieved from the cache, virtual fields are generated whenever it is necessary. Obviously I know I…
Mirko Pagliai
  • 1,220
  • 1
  • 19
  • 36
0
votes
1 answer

Trigger event every X seconds in Cakephp3

I'm currently developing a system in Cakephp 3.4 which needs to check for connectivity with another machine every X seconds by sending a 'ping'. I've read the cookbook section about Events in the docs but I couldn't find any Events that trigger…
AronNeewart
  • 461
  • 6
  • 18
0
votes
1 answer

rendering view on ajax response in cakephp 3

I'm working in CakePHP 3.4 I'm making an Ajax request to controller for fetching some data from database and response it back to the view. Since, the data returned is a set of data which can be from 1 row to 100 rows. I want to make a separate view…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
0
votes
0 answers

button in an mdl template in cakephp

I am creating a cakephp blog essentially from the blog tutorial(in the official cakephp cookbook for version 3.4) and using a template from mdl(material design lite). this is the one : this one I have two questions here... 1.I need to use the custom…
0
votes
1 answer

CakePHP 3.4.2 Testing POST's response always returning NULL

i'm currently testing an app that simply searches a record by the given id. It works fine but the testing refuses to return the response in the code. Strangely it is ONLY shown in the CLI. I'm using phpunit provided by cakephp: "phpunit/phpunit":…
Marco
  • 129
  • 1
  • 1
  • 9
0
votes
2 answers

Cakephp 3.4 - Email setTemplate() seems to be not working

I have upgraded to Cakephp 3.4 and now doing my code migrations. I modified my email functions to the following: $email->setTemplate('welcome', 'registration') ->setSubject($subject) ->setEmailFormat('html') …
EssEss
  • 73
  • 10
0
votes
1 answer

CakePhp 3.4 User table records not getting

I am trying to fetch all records from users table as below code: $this->loadModel('User'); $users_list = $this->User->find('all'); pr($users_list); but the resulting page shows like below: Cake\ORM\Query Object ( [_hasFields:protected] => …
0
votes
0 answers

CakePHP 3.4 - Array to string conversion warning calling setTemplates()

I need to change the CSS class name on the wrapping div and therefore tried to use setTemplates example from CakePHP book. I have just copied and pasted the following lines from the example: $myTemplates = [ 'inputContainer' => '
Morpheus
  • 8,829
  • 13
  • 51
  • 77
-1
votes
1 answer

Validation message not showing below the field in cakephp 3 latest version

I am trying to validate a multiple select field that have jquery chosen applied. Validation is working perfectly but only problem is that validation message is not showing below the input field. Here is my files. profile_edit.ctp
Arshad Hussain
  • 765
  • 5
  • 22
-1
votes
1 answer

Multiple File Upload With Cakephp 3

'Unexpected field 'img.0.error' in POST data, Unexpected field 'img.0.name' in POST Cake\Controller\Exception\AuthSecurityException
-1
votes
1 answer

static arrays in cakephp3 for use in form selects

I've just had a v1.3 site upgraded to v3 and it's buggy as all hell, the developer is away for the weekend and I'm trying to get things fixed. So in both my v1.3 site and my v2 site I'm able to have an array declared against a model eg My Person…
Sarah K
  • 363
  • 2
  • 15
1 2 3
9
10