# |
May 25th 2016, 20:37 |
jefazos |
hello |
# |
May 25th 2016, 20:18 |
jefazos |
is there anyone here? |
# |
May 25th 2016, 20:17 |
jefazos |
if someone is open to help |
# |
May 25th 2016, 20:17 |
jefazos |
I need some help in finding the correct way to add a functionality to my app |
# |
May 25th 2016, 20:10 |
Eax |
Hey folks! Cake3 question: I have this LoginController: https://gist.github.com/eaxexe/64442df2e6465a67fe7a0fcd98ad27f7 (It uses Facebook to auth the login, hence no password checking) - My question is: Can anyone see why the cookie simply dissapears after being set and the user being redirected? Thanks! ð??? |
# |
May 25th 2016, 19:00 |
bravo-kernel |
thanks again for the framework guys, enjoy the fest |
# |
May 25th 2016, 18:59 |
slackebot |
Action: bravo-kernel gives everybody NL hugs, just because |
# |
May 25th 2016, 18:30 |
ionas |
anyone wants to go out and have a bite and resides near to the conference place? |
# |
May 25th 2016, 17:57 |
a.barclay |
will do, thanks for the help guys :slightly_smiling_face: |
# |
May 25th 2016, 17:57 |
nrother |
try removing unnecessary columns, so its easy to see the interesting things in the query ;) |
# |
May 25th 2016, 17:57 |
a.barclay |
Maybe the SQL example will help them see it's an issue, because that seems to be generated entirely by Paginator rather than any query I'm doing |
# |
May 25th 2016, 17:56 |
a.barclay |
Yeah that might be worth doing, though I can't see how I can make it simpler, there's only 3 models and 2 joins |
# |
May 25th 2016, 17:55 |
nrother |
you could try to create a simple example so its easier to see that there is actually a bug. |
# |
May 25th 2016, 17:54 |
a.barclay |
but I can't see any missing associations / joins |
# |
May 25th 2016, 17:53 |
a.barclay |
I was told "You'll have to sort out the missing associations/joins. That isn't a bug with CakePHP" |
# |
May 25th 2016, 17:53 |
a.barclay |
I tried filing a bug on GitHub and it was rejected |
# |
May 25th 2016, 17:53 |
nemmons |
Maybe posting this SQL to the thread you started will help other more experienced people see the issue more clearly? |
# |
May 25th 2016, 17:53 |
a.barclay |
Neither have I, but for this particular application it would be helpful to have that restriction in the model |
# |
May 25th 2016, 17:53 |
nemmons |
Sorry i can't be more help than that =\ |
# |
May 25th 2016, 17:53 |
nrother |
you can try filing a bug on github, maybe someone with more experience of the internals can help |
# |
May 25th 2016, 17:52 |
a.barclay |
Yeah. |
# |
May 25th 2016, 17:52 |
nemmons |
but i've never tried to paginate on a model containing an association defined by a custom finder, so there's a lot going on here |
# |
May 25th 2016, 17:52 |
nemmons |
There doesn't seem to be anything obviously wrong here |
# |
May 25th 2016, 17:52 |
a.barclay |
hehe, that's true :slightly_smiling_face: |
# |
May 25th 2016, 17:52 |
nemmons |
*course |
# |
May 25th 2016, 17:52 |
nemmons |
much easier said that done, of courese |
# |
May 25th 2016, 17:51 |
nemmons |
so the best advice that I could give would be to dig into CakePHP and try to understand exactly how the SQL is being constructed and whether it's possible to influence the order of the joins |
# |
May 25th 2016, 17:51 |
a.barclay |
Looks like it, yeah. |
# |
May 25th 2016, 17:51 |
nemmons |
So the problem is that the SQL is being generated in such a way that the order of the joins is 'incorrect' (meaning that it leads to a query that doesn't work) |
# |
May 25th 2016, 17:49 |
a.barclay |
and this only seems to error when paginating. For instance, if I go to /jobs/add, in the "Account Manager" drop down I only get users who have the User Type "Account Manager" |
# |
May 25th 2016, 17:48 |
a.barclay |
But obviously "Account Managers" is a aliased association with a custom finder, so I'm wondering if something there is messing it up. |
# |
May 25th 2016, 17:47 |
a.barclay |
Yeah, I'm just not sure where in my code I've gone wrong. As far as I'm aware, the association between Users and UserTypes is correct. |
# |
May 25th 2016, 17:45 |
nemmons |
i guess it's supposed to be inner joining UserTypes first |
# |
May 25th 2016, 17:45 |
a.barclay |
yeah I just noticed that too |
# |
May 25th 2016, 17:45 |
nemmons |
a.barclay interesting. so on like 15 it's trying to join jobs on account_managers but then it's referencing user_types in the ON clause, so there's definitely a problem there |
# |
May 25th 2016, 17:42 |
a.barclay |
@nemmons: Ok, I had to hack the MysqlStatement.php file to get it to output all the queries, and here they are: http://pastebin.com/f6Hn1YyJ |
# |
May 25th 2016, 17:40 |
nemmons |
there are a couple examples at the bottom of this section: http://book.cakephp.org/3.0/en/views/helpers/html.html#creating-links |
# |
May 25th 2016, 17:39 |
nemmons |
mrfeedback have you tried using Html->url instead, and passing `['escape' => false]` as the third parameter? |
# |
May 25th 2016, 17:37 |
mrfeedback |
(via js) like ##id## |
# |
May 25th 2016, 17:36 |
mrfeedback |
actually i am trying to build a placeholder which then will be replaced |
# |
May 25th 2016, 17:36 |
a.barclay |
I can't see the query on the error page. I can try and dump the SQL query, give me 2 minutes :) |