Category : cakephp

I have a CakePHP 2.5.1 website (although I’ve tested with an updated 2.10.18 version) running on PHP 5.3.29 (I know, old stuff). The issue I’m having is that flash messages, seemingly at random (but most of the times), don’t show when they’re supposed to, they show after I reload the page once more (or load ..

Read more

I’m using CakePHP 3.4 (can’t upgrade) and in order to protect the system from Cross Site Request Forgery I need to set the CSRF token cookie to SameSite = Strict. However, it seems this version of CakePHP can’t handle such setting. I have tried using the CsrfComponent class and loading the component in AppController $this->loadComponent(‘Csrf’, ..

Read more

The condition if that becomes invalidate is omitted. ‘test_field’ => [ ‘checkInList’ => [ ‘rule’ => [‘checkInList’, ‘test_field_list’], ‘message’ => ‘Before change’, ‘allowEmpty’ => false, ], ], ……… public function after Validate () { $ this-> invalidate (‘test_field’,’After change’); } I just want to change the wording <div class = "error-message"> <ul> <li class = ..

Read more

How to add a clickable link in an anchor inside php _e function <div class="custom-control custom-checkbox mb-3 mr-sm-2"> <input class="custom-control-input" id="rememberMe" type="checkbox" name="terms"> <label class="custom-control-label" for="rememberMe"><?php _e("Accept Terms & Conditions")?></label> </div> We want to add a clickable link eg: " https://website.com/terms_and_policies " in " Accept Terms & Conditions " Sourc..

Read more

i wrote.. $query->order([ ‘updated_at’ => ‘DESC NULL LAST’, ]); then… 2021-04-07 16:34:58 Notice: Deprecated (16384): Passing extra sort expressions by associative array is deprecated. Use QueryExpression or numeric array instead. – /var/www/shokunin3/vendor/cakephp/cakephp/src/Database/Expression/QueryExpression.php, line: 173 You can disable deprecation warnings by setting `Error.errorLevel` to `E_ALL & ~E_USER_DEPRECATED` in your config/app.php. in [/var/www/shokunin3/vendor/cakephp/cakephp/src/Core/functions.php, line 311] Request URL: ..

Read more

php I want to substract sqty(solded_prod_var) from qty(purchase_variations) and update it in qty column from purchase_variations..please help me in this prob. Thank you in advance.. ill tried this.. table name-purchase_variations: [id|1 2 3] [qty|11 12 13] table name-solded_prod_var: [vid|1 2 3] [sqty|1 2 3] enter code here <?php session_start(); include("config.php"); if (isset($_POST[‘sale’])) { $added_by = ..

Read more