# |
Mar 7th 2019, 16:14 |
slackebot1 |
(e.g. if i was trying to post to /posts/add, i can see that even though the request was black-holed, the controller action was executed and a record was written to the database) |
# |
Mar 7th 2019, 16:14 |
nemmons |
Hey all, i'm noticing something odd in the behavior surrounding the Security Component and the blackhole callback. I'm currently on 3.5.4 and I have the following black hole callback setup in my controller: https://hastebin.com/kucamorovi.php and i have noticed that if my request gets black-holed due to form-tampering protection, it returns the redirect as expected _but it simultaneously executes the blackholed controller action anyway_ |
# |
Mar 7th 2019, 14:06 |
acosonic |
I've finally assembled (generated from cakphp's missing controllers, a comprehensive bad-bot fail2ban blocking filter...) It's as it is, only cleaned a littlebit to make it work... https://github.com/acosonic/fail2ban_custom_rules/blob/master/filter.d/apache-script-hackbots.conf |
# |
Mar 7th 2019, 14:05 |
acosonic |
@endersaka Me, why? |
# |
Mar 7th 2019, 13:41 |
endersaka |
anyone here uses Atom as his PHP editor? |
# |
Mar 7th 2019, 12:40 |
grossolive4 |
I did not find any delete event in behavior translate https://book.cakephp.org/3.0/en/orm/behaviors/translate.html |
# |
Mar 7th 2019, 12:38 |
grossolive4 |
hello everyone, I have a question how to delete i18n after model -> delete ? |
# |
Mar 7th 2019, 12:32 |
mrfeedback |
kan do you have an actual question? |
# |
Mar 7th 2019, 10:32 |
kan |
anyone has Done G suite API ? |
# |
Mar 7th 2019, 10:23 |
neon1024 |
:rubberduck: |
# |
Mar 7th 2019, 10:23 |
neon1024 |
Woo, so it’s `$View->getVars()`, to get the array keys, then `$View->get($viewVar)`, not quite sure how I missed that :face_palm: |
# |
Mar 7th 2019, 10:22 |
neon1024 |
..and the View uses the same Trait |
# |
Mar 7th 2019, 10:21 |
neon1024 |
Which it does! |
# |
Mar 7th 2019, 10:21 |
neon1024 |
Unless `set()` in a controller proxies the View |
# |
Mar 7th 2019, 10:21 |
neon1024 |
..and why would a controller do `$this->set('examples', $examples)` and then the View class `$this->set('examples', $undefinedVariable)` |
# |
Mar 7th 2019, 10:20 |
neon1024 |
The View class builds data and a template into a response right? So why would the View class not be able to access the data set to the view |
# |
Mar 7th 2019, 10:20 |
neon1024 |
I don’t understand that :thinking_face: |
# |
Mar 7th 2019, 10:18 |
neon1024 |
Kinda strange as the deprecation points to using `set()` and not `get()` |
# |
Mar 7th 2019, 10:18 |
neon1024 |
Ah, seems it’s `$View->viewVars` even though it’s been deprecated |
# |
Mar 7th 2019, 10:16 |
neon1024 |
Has anyone implemented the Fractal library? Is creating a custom View class the way to approach it? I can’t find anything in the View class which has the data set to the view. I thought it was `$View->getViewVars()` |
# |
Mar 7th 2019, 10:09 |
tjkalinowski |
Hello to all :) hello @neon1024 |
# |
Mar 7th 2019, 10:09 |
neon1024 |
That doesn’t sound right |
# |
Mar 7th 2019, 10:00 |
willem |
strange that it won’t do what you expect…. i changed the jointype in the table to inner and use contain now |
# |
Mar 7th 2019, 09:56 |
willem |
i need a leftjoin and an innerjoin, but the default type is LEFT in the Table |
# |
Mar 7th 2019, 09:52 |
neon1024 |
`$articles = $this->Articles->find()->contain(['Authors']);` |
# |
Mar 7th 2019, 09:52 |
neon1024 |
Why aren’t you using `contain()` ? |
# |
Mar 7th 2019, 09:50 |
willem |
->enableAutoFields(true) is doing nothing |
# |
Mar 7th 2019, 09:49 |
willem |
using the select method, what if i need all fields? will be a long list. |
# |
Mar 7th 2019, 09:49 |
neon1024 |
As you’re working on the same query instance |
# |
Mar 7th 2019, 09:49 |
neon1024 |
You only need to apply it once |
# |
Mar 7th 2019, 09:49 |
willem |
i tried the enableAutoFields, but that had no effect. (i put it on the find()->enable.. and on the leftJoin->enabel… ) |
# |
Mar 7th 2019, 09:47 |
neon1024 |
or `$query->enableAutoFields(true)` I think the method is called |
# |
Mar 7th 2019, 09:46 |
neon1024 |
`$query->select(['Articles.id', 'Authors.id'])` |
# |
Mar 7th 2019, 09:45 |
willem |
hi, when using this type of query ``` $query = $articles->find(); $query->leftJoin( ['Authors' => 'authors'], ['Authors.id = Articles.author_id']); ``` the result would only have the columns for the articles table. how can i also get the columns from the joined tables ? |
# |
Mar 7th 2019, 09:19 |
endersaka |
it seems I'm resolving: the cause is probably a Firefox extension... |
# |
Mar 7th 2019, 09:09 |
neon1024 |
Morning all |
# |
Mar 7th 2019, 09:07 |
endersaka |
Hi, I have a problem with the configuration of CakePHP and Apache (I guess). In Chrome everything works (even if there is a little glitch that I will explain later) but in Firefox I get a message "The connection has been cancelled" when I try to access the /articles/ page (made following the CMS tutorial). Everything is installed locally (Apache 2.4, PHP 7.2) and I access it via http://localhost/~username/appname/articles/ |
# |
Mar 7th 2019, 08:26 |
josbeir |
@chan if you want to do emails the cool way check out https://mjml.io/ |
# |
Mar 7th 2019, 07:24 |
acosonic |
@chan gmail strips everything in head... https://stackoverflow.com/questions/19572437/gmail-css-styling |
# |
Mar 7th 2019, 05:40 |
chan |
mr. @admad i write css in head of html block, but does not work css in gmail. which one is wrong? thank your advise. |
# |
Mar 7th 2019, 05:37 |
slackebot1 |
bgcolor="#5B9BD5"> <span style="color: #FFFFFF;">Recent job vacancies</span> </td> </tr> </table> </section> </div> </body> </html> ``` |