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

cakephp 3.4 mySQL to orm convert

my Current MYSQL query is SELECT cl.user_id, COUNT(q.id) as completed_questions, ( SELECT SUM(points) FROM completed_levels WHERE user_id = cl.user_id ) as…
Noman iqbal
  • 71
  • 1
  • 8
0
votes
1 answer

cakephp 3.4 friendsofcake/csvview associated tables issue

I'm currently trying to generate a csv file using FriendsOfCake/csvView. The thing is, the table I'm trying to get the file from, has many associated tables (about 11). so the file gets exported looking something like this: CODE | NAME |…
DanielHolguin
  • 305
  • 4
  • 13
0
votes
0 answers

CakePHP 3.4 auth redirect

From version 3.4, CakePHP always adding redirect URL in query string, if action is not allowed for user. It was described on https://book.cakephp.org/3.0/en/appendices/3-4-migration-guide.html#behavior-changes (3rd paragraph). It is possible to…
kicaj
  • 2,881
  • 5
  • 42
  • 68
0
votes
1 answer

cakephp 3.4- Paginating belongsToMany associations

I have 3 Models. Menus -> BelongsToMany -> Tags -> BelongsToMany -> Posts. I am getting menu_slug as Input and I have to Paginate the Posts that are coming. The query that I wrote is working as expected but I am not able to Paginate it according to…
Sainesh Mamgain
  • 754
  • 1
  • 10
  • 32
0
votes
0 answers

CakePHP 3 validation input messages

I have problem with validations in CakePHP 3. I preapre some code with validation for email field, like this: $validator ->email('email') ->notEmpty('email') ->add('email', 'correct',[ 'rule' => [ …
kicaj
  • 2,881
  • 5
  • 42
  • 68
0
votes
0 answers

changing theme on the fly for elements

Is it possible to change the theme for an element on the fly? $this->theme('Theme1'); echo $this->element('Plugin.view'); // will be overiden by theme1 view $this->theme('Theme2'); echo $this->element('Plugin.view'); // will be overiden by theme2…
jurrieb
  • 248
  • 5
  • 14
0
votes
2 answers

Cakephp 3: How to do an aggregate select statement within an inner join using Cakephp's Query Builder?

Well I just can't seem to figure this out. I'm on day two of messing around with this and it's time to enlist some help. Here's the SQL that works: SELECT rt1.request_id, rt1.status FROM request_transactions rt1 INNER JOIN ( SELECT max(id) AS…
JKaht
  • 11
  • 2
0
votes
1 answer

Build custom input field list with display field from associated model in cakephp 3

I have three tables campaign_social_accounts, social_accounts, and social_networks SocialNetworks contains are networks which user can connect to with columns as +-----+--------+ | id | title | +-----+--------+ SocialAccounts has the all accounts…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
0
votes
1 answer

Getting events to work in cakephp 3.4

I am trying to get the events functionality of cakephp to work in cakephp 3.4 and its taking me centuries to figure it out. Will appreciate all the help I can get. I want verification email to be sent to users after saving their information. In the…
medhybrid
  • 48
  • 6
0
votes
1 answer

How to filter based on I18n content with pagination component?

I have comeup with strange problem in cakephp 3.4. I am running filter query on i18n content like this. if($this->request->query("q")){ $this->paginate["conditions"][$this->ContractTypes->translationField('title').' LIKE'] =…
user753317
0
votes
1 answer

cakephp 3.x and datatable example

i am new with cake php 3.4 and i am trying to build an example with ajax request and datatable here is my controller: public function getdata(){ if ($this->request->is('ajax')) { $cc = array( array('nome'=>'parvez',…
bitdiego
  • 113
  • 10
0
votes
1 answer

CakePHP Exception: Shell class for "..." could not be found

The following is a snippet from my console, I baked a shell, and immediately try to use it, it should output getOptionParser, but it throws a MissingShell Exception instead, any ideas? └──╼ bin/cake bake shell coin --plugin WalletManager Welcome to…
Jeffrey L. Roberts
  • 2,844
  • 5
  • 34
  • 69
0
votes
1 answer

access jquery unserialized data using getData in cakephp 3

I'm using cakephp 3.4 I have a form to submit values using ajax. Form->create(null, ['id' => 'search-form']) ?> Form->control('keyword') ?> Form->button(__('Search'), ['id' => 'search-submit']); ?>
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
0
votes
2 answers

Call to member function format() on boolean in CakePHP 3

I'm using CakePHP 3.4 I'm getting visitors count from LogProfileVisits table using $profile_visit_logs = $this->Users->LogProfileVisits->find() ->where(['user_id' => $user->id]); $profile_visit_logs->select([ 'total_count' =>…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
0
votes
0 answers

The localhost page isn’t working localhost is currently unable to handle this request in cakephp 3.4

I'm using apache server to run my cakephp 3.4 version application on ubuntu, I'm getting strange problem as below The localhost page isn’t working localhost is currently unable to handle this request. HTTP ERROR 500 But It's working fine in…
Ashok
  • 184
  • 2
  • 14