# |
Jan 23rd 2020, 13:01 |
neon1024 |
Yeah, just use the second param of email validation |
# |
Jan 23rd 2020, 12:56 |
etibor |
is it possible to check an email address if it real e-mail address?i have to send a confirmation email, but if it not valid i dont want to save anything to db |
# |
Jan 23rd 2020, 12:55 |
etibor |
hello mates |
# |
Jan 23rd 2020, 11:18 |
neon1024 |
Ah, I can include regular elements :thumbsup: Apologies, should have TIAS |
# |
Jan 23rd 2020, 11:16 |
neon1024 |
I presume, as they’re an instance of View, I can use Elements? |
# |
Jan 23rd 2020, 11:16 |
neon1024 |
How do I share markup when working in Cell templates? I have some shared HTML in my navigation cells |
# |
Jan 23rd 2020, 10:54 |
mark.mikkelson |
cheers |
# |
Jan 23rd 2020, 10:54 |
ndm |
if your cache isn't cleared properly in debug mode, check your `bootstrap.php`, the config change might be missing: https://github.com/cakephp/app/blob/3.7.1/config/bootstrap.php#L90-L95 |
# |
Jan 23rd 2020, 10:53 |
ndm |
no problem |
# |
Jan 23rd 2020, 10:52 |
mark.mikkelson |
thanks again! |
# |
Jan 23rd 2020, 10:52 |
mark.mikkelson |
clearly the last 4 hours driving my self nuts was the jeffing cache :) |
# |
Jan 23rd 2020, 10:51 |
mark.mikkelson |
i thought in debug mode caches refreshed constantly |
# |
Jan 23rd 2020, 10:51 |
mark.mikkelson |
that was it |
# |
Jan 23rd 2020, 10:51 |
mark.mikkelson |
thanks |
# |
Jan 23rd 2020, 10:51 |
mark.mikkelson |
oh god damn it! |
# |
Jan 23rd 2020, 10:50 |
ndm |
In that case maybe it's your route caching, you are still registering the CSRF middleware, so it might apply it for a cached route... ie clear the cache |
# |
Jan 23rd 2020, 10:50 |
mark.mikkelson |
i did look at this but have no idea how it's being included, without me going back through http and a bunch of other classes I found and commenting out/deleting all the csrf stuff? |
# |
Jan 23rd 2020, 10:48 |
mark.mikkelson |
"message": "Missing CSRF token cookie", "url": "/tickets/update", "code": 403, "file": "\vendor\\cakephp\\cakephp\\src\\Http\\Middleware\\CsrfProtectionMiddleware.php", "line": 196 |
# |
Jan 23rd 2020, 10:48 |
mark.mikkelson |
thanks |
# |
Jan 23rd 2020, 10:48 |
mark.mikkelson |
Oo |
# |
Jan 23rd 2020, 10:47 |
ndm |
may want to check my comment on SO |
# |
Jan 23rd 2020, 10:46 |
mark.mikkelson |
in 3.7 |
# |
Jan 23rd 2020, 10:46 |
mark.mikkelson |
is there somewhere else the CSRF middleware could be being loaded from? |
# |
Jan 23rd 2020, 10:45 |
mark.mikkelson |
anybody able to shed some light on disabling CSRF, it's been driving me nuts for a day now. I've got no CSRF mentioned in my routes.php nor in the applicaiton.php , yet I still get Missing CSRF token cookie when posting data in? |
# |
Jan 23rd 2020, 10:44 |
val |
thanks |
# |
Jan 23rd 2020, 10:43 |
ndm |
@val I tend to forget to tag people |
# |
Jan 23rd 2020, 10:42 |
ndm |
`$joinTable = $PostsTable->Tags->junction()` |
# |
Jan 23rd 2020, 10:33 |
val |
I don't use 'through' |
# |
Jan 23rd 2020, 10:32 |
neon1024 |
I’d escalate it to @admad ;) |
# |
Jan 23rd 2020, 10:31 |
neon1024 |
You could rely on convention to find it perhaps :thinking_face: |
# |
Jan 23rd 2020, 10:31 |
neon1024 |
If you’re using the automatic join table, I’m not too sure, sorry |
# |
Jan 23rd 2020, 10:31 |
neon1024 |
As it should be the `through` option if you’re using that |
# |
Jan 23rd 2020, 10:31 |
neon1024 |
As it’ll return a class instance from the collection I reckon |
# |
Jan 23rd 2020, 10:30 |
neon1024 |
The association class returned in the collection should have that |
# |
Jan 23rd 2020, 10:30 |
val |
`$this->associations()` do not have join model. F.ex. Post HABTM Tag. What I need is to get posts_tags table and its alias. |
# |
Jan 23rd 2020, 10:30 |
neon1024 |
So perhaps you can filter by `belongsToMany` |
# |
Jan 23rd 2020, 10:30 |
neon1024 |
Although this is in the core `foreach ($table->associations()->type('BelongsTo') as $assoc) {` |
# |
Jan 23rd 2020, 10:29 |
conehead |
@dereuromark sweet. On holiday? |
# |
Jan 23rd 2020, 10:27 |
neon1024 |
I *think* it’s `foreach ($this->associations() as $association => $tableName)` |
# |
Jan 23rd 2020, 10:26 |
neon1024 |
I tend to loop the associations, using `$this->associations()` |
# |
Jan 23rd 2020, 10:25 |
val |
What is the proper way to get join model alias and table name in HABTM in 3.x? |