# |
Mar 6th 2018, 15:54 |
dereuromark |
for obvious reasons, better IDE support |
# |
Mar 6th 2018, 15:54 |
neon1024 |
Perhaps I’ll add a trait to my entities |
# |
Mar 6th 2018, 15:54 |
dereuromark |
it does? ok, I always use properties so far |
# |
Mar 6th 2018, 15:54 |
dereuromark |
oh |
# |
Mar 6th 2018, 15:54 |
neon1024 |
Entity get, not ORM get :slightly_smiling_face: |
# |
Mar 6th 2018, 15:53 |
dereuromark |
you can use find + redirect instead |
# |
Mar 6th 2018, 15:53 |
neon1024 |
Perhaps I need to wrap it my own helper |
# |
Mar 6th 2018, 15:53 |
Es0teric |
flavius its not in error.log... its failing silently even though i have all debug on |
# |
Mar 6th 2018, 15:53 |
neon1024 |
The objective should instead be to try and render something |
# |
Mar 6th 2018, 15:53 |
neon1024 |
Especially as it’s used so extensively in the templates, throwing a fatal bins my entire page |
# |
Mar 6th 2018, 15:52 |
neon1024 |
`->get()` throwing a fatal is a very frustrating behaviour for me |
# |
Mar 6th 2018, 15:51 |
flavius |
well something happens, and you can find the issue in logs/error.log |
# |
Mar 6th 2018, 15:51 |
Es0teric |
the problem is that the method is not accepting a multidimensional array as a return |
# |
Mar 6th 2018, 15:50 |
Es0teric |
i did not overwrite anything |
# |
Mar 6th 2018, 15:50 |
flavius |
es0teric then there's something else that you overwrote and broke your app? because after debug die it returns what you want, so what happens AFTER that breaks it, a cool way to debug your application is with xdebug and break points |
# |
Mar 6th 2018, 15:50 |
dereuromark |
similar to counter cache or slug behaviors |
# |
Mar 6th 2018, 15:49 |
dereuromark |
true, it can be a behavior driven read only cache field so to speak |
# |
Mar 6th 2018, 15:48 |
flavius |
you could make a new table field called full_name and save in it the contents of first_name and last_name to avoid this all together :slightly_smiling_face: |
# |
Mar 6th 2018, 15:48 |
Es0teric |
flavius i fixed that and still |
# |
Mar 6th 2018, 15:45 |
popperz0r |
will try |
# |
Mar 6th 2018, 15:45 |
dereuromark |
you need to repeat the exact condition in the other parts of the SQL ( in your case inside the conditions just as it was defined in fields) |
# |
Mar 6th 2018, 15:44 |
dereuromark |
somewhat this one https://github.com/cakephp/cakephp/issues/1835 (or other related ones) |
# |
Mar 6th 2018, 15:44 |
ghoritrilochan |
shreehariji.com link |
# |
Mar 6th 2018, 15:44 |
ghoritrilochan |
i was upload my project in server but css,js,img and link all was not work... plz help |
# |
Mar 6th 2018, 15:44 |
flavius |
somehow :P |
# |
Mar 6th 2018, 15:43 |
flavius |
try to make it look like `WHERE( (CONCAT(User.first_name, :param0, User.last_name)) like :c1` |
# |
Mar 6th 2018, 15:43 |
popperz0r |
:( |
# |
Mar 6th 2018, 15:42 |
dereuromark |
A known 2.x limitation |
# |
Mar 6th 2018, 15:42 |
flavius |
`WHERE (full_name` this is your problem |
# |
Mar 6th 2018, 15:42 |
popperz0r |
ffs |
# |
Mar 6th 2018, 15:42 |
slackebot |
LeadType ON LeadType.id = (UnqualifiedLead.lead_type_id) WHERE (full_name like :c1 AND Email.email like :c2) ORDER BY UnqualifiedLead.id desc``` |
# |
Mar 6th 2018, 15:42 |
popperz0r |
``` (CONCAT(User.first_name, :param0, User.last_name)) AS `full_name` FROM unqualified_lead UnqualifiedLead LEFT JOIN user User ON User.id = (UnqualifiedLead.user_id) LEFT JOIN phone Phone ON Phone.id = (UnqualifiedLead.phone_id) LEFT JOIN email Email ON Email.id = (UnqualifiedLead.email_id) LEFT JOIN city City ON City.id = (UnqualifiedLead.city_id) LEFT JOIN company Company ON Company.id = (UnqualifiedLead.company_id) LEFT JOIN lead_type |
# |
Mar 6th 2018, 15:42 |
popperz0r |
```Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'full_name' in 'where clause'``` |
# |
Mar 6th 2018, 15:42 |
popperz0r |
@jeremyharris after remaking my whole query :( |
# |
Mar 6th 2018, 15:42 |
jeremyharris |
then it’s a problem with whatever is consuming that array. doesn’t change the fact that you should fix your controller :) |
# |
Mar 6th 2018, 15:42 |
flavius |
https://kopy.io/shlHV#line-10 overwrites https://github.com/cakephp/cakephp/blob/2.x/lib/Cake/Controller/Controller.php#L319 |
# |
Mar 6th 2018, 15:41 |
Es0teric |
because when i make it a flat array, the app works as expected |
# |
Mar 6th 2018, 15:41 |
Es0teric |
it is |
# |
Mar 6th 2018, 15:38 |
jeremyharris |
esoteric ok, that’s just a refactoring of your searchByEmail method. the app breaking is not a result of that |
# |
Mar 6th 2018, 15:37 |
flavius |
app crashes because you arent supposed to overwrite `__construct` like that |
# |
Mar 6th 2018, 15:37 |
flavius |
at least call parent::__construct as well :)) |