Questions tagged [cakephp3]

30 questions
1
vote
0 answers

alpine docker image for cakephp

I am struggling trying to dockerize an app for CakePHP 3. I already did with a PHP apache image but it is pretty big, for that reason I am trying to dockerize the app in an alpine container. I also need npm, but I cannot install npm, I have received…
R0bertinski
  • 517
  • 6
  • 12
1
vote
1 answer

Xdebug is not launched in WSL2 in a docker CakePHP 3 application

I am struggling with Xdebug + WSL2 + CakePHP 3 + VSCode. Checking the debug console it seems that I have running Xdebug correctly, but when I run a script in the browser, the Xdebug is not launched. This is the code: Note: I forgot to mention that I…
R0bertinski
  • 517
  • 6
  • 12
1
vote
0 answers

how to ignore callback function?

I have a beforeFind callback in my model file. And in Controller file I have the below code : $this->Users->get($this->Auth->user('user_id')); . How can I add applyOptions here to ignore beforeFind() callback in UsersTable.php ?
web_developer
  • 71
  • 1
  • 9
0
votes
1 answer

Can not get paginate parameters using func_get_arg() function in Model

I'm updating cakephp2 to cakephp3. For model side, I can not get paginate parameters using func_get_arg() function in Model. How can I get it? I want to keep using func_get_arg() because other Model classes have also same logic. class TopController…
tkym
  • 43
  • 5
0
votes
1 answer

cakephp3 entities relationship error when login (the error is going after refresh)

I am struggling with this issue for a few days. I've tried to debug step by step with Xdebug, but I cannot find where it is the problem. Basically when login into the cakephp3.9 I get this error: App\Model\Table\UsersTable association "Roles" of…
R0bertinski
  • 517
  • 6
  • 12
0
votes
0 answers

cakephp 3 Bypassing a specific folder in webroot without using .htaccess

I have a specific folder containing ViewerJS that I want to bypass without using .htaccess The path I want to work is /ViewerJS/#/files/viewfile/version where version is some integer. The action viewerJS is not defined in AppController Error: Create…
bemoore
  • 84
  • 7
0
votes
1 answer

Cakephp 3 Save translation first. Original entity later

I'm implementing Cakephp 3 Translate behavior in my website but when I'm creating when the current language is not the default language all the other languages including the original entity are empty. For example the available languages are: English…
Maat
  • 21
  • 5
0
votes
0 answers

Cakephp ajax request without reload page

I have a table of categories and subcategories that I need, when the product is added and the user selects a category of my choice, the following list of subcategories should display only those subcategories that have ... I use ajah in my admint.ctp…
0
votes
1 answer

Cakephp 3 filter by a many to many associated relation

I have a users table, roles and users_roles as a join / pivot table. I am tryin to create a query to retrive all the users that HAVE NOT these roles: interventor, editor, chief At the moment this is my query but I am not getting the desiered…
R0bertinski
  • 517
  • 6
  • 12
0
votes
2 answers

How to iterate values in foreach and create array with new values in cakephp 3.x

I have below code from which i am getting Below data in response.. public function getCategory(){ $this->autoRender = False; $list = TableRegistry::get('Subproducts'); $supplierId = $this->request->data['supplierId']; …
0
votes
0 answers

Cakephp 3 Search Function

got a question about cakephp3 search function, is it possible to search among two tables/Controllers in a search form? this is the codes, am trying to search from categories name and also products name, their relationship is products has category…
Jean Val Jean
  • 13
  • 1
  • 7
0
votes
0 answers

Cake php Migration and Upgrade to version 4

I am upgrading and migration cake php from version 3.8 to 4 everything goes fine following the steps(https://book.cakephp.org/4/en/appendices/4-0-upgrade-guide.html) but as per the migration and upgrade documentation cake php version 4 supports…
0
votes
1 answer

Creating pdf with cakephp 3 and doompdf, the pdf is not being generated

I'm trying to create PDF reports with cakephp3 and doompdf but the pdf is not being generated, just the html. bootstrap.php: Plugin::load('Dompdf'); routes.php: Router::scope('/', function ($routes)…
André
  • 1
  • 2
0
votes
0 answers

can I add a 'span' after label using a FormHelper in CakePHP 3?

My code is: echo $this->Form->control('select', [ 'label' => 'sample label text', 'type' => 'select', 'multiple' => true, 'value' => [1,2], 'options' => ['a','b'] ]); The output is now:
web_developer
  • 71
  • 1
  • 9
0
votes
2 answers

Use a variabel as a class name in php or Cakephp 3

I am trying to run a array of command from another command. somthing similar to cronjob but with a view edit add option by end user. this is working : $fooCommand = new \App\Command\fooCommand(); $barCommand = new…
1
2