# |
Aug 28th 2019, 06:47 |
slackebot2 |
<javier.villanueva> |
# |
Aug 28th 2019, 06:46 |
admad |
show the full error message, along with the paths it checked in |
# |
Aug 28th 2019, 06:44 |
javier.villanueva |
public function export() { $data = [ ['a', 'b', 'c'], [1, 2, 3], ['you', 'and', 'me'], ]; $_serialize = 'data'; $this->setResponse($this->getResponse()->withDownload('inventory.csv')); $this->viewBuilder()->setClassName('CsvView.Csv'); $this->set(compact('data', '_serialize')); } |
# |
Aug 28th 2019, 06:44 |
admad |
show your method code |
# |
Aug 28th 2019, 06:34 |
javier.villanueva |
I am trying to export to csv file an entity list. I have used FriendsOfCake/cakephp-csvview with their most basic example, but always instead download file I have a "missing template export.ctp" error. Anyone could help me? Thanks |
# |
Aug 28th 2019, 06:32 |
javier.villanueva |
hi all |
# |
Aug 28th 2019, 06:12 |
admad |
yes setting up the auth libs will be a bit more involved |
# |
Aug 28th 2019, 06:10 |
challgren |
I'll have to look a bit more most of the time I just use cakedc users so I don't have to think as much |
# |
Aug 28th 2019, 06:09 |
challgren |
Well wondering the right approach |
# |
Aug 28th 2019, 04:39 |
admad |
Even if someone hasn't you still can :slightly_smiling_face: |
# |
Aug 28th 2019, 04:05 |
challgren |
I’m thinking of upgrading my Cake 2 app to Cake 3 and in that 3 different prefixes use 3 different authentication tables |
# |
Aug 28th 2019, 04:02 |
challgren |
So has anyone gotten the new Authentication Middleware to run on different prefixes with different settings? |
# |
Aug 27th 2019, 21:45 |
ricksaccous |
@ndm thanks, this thing is running a bit too slow i'm approaching it another way with cached queries |
# |
Aug 27th 2019, 21:42 |
ndm |
@ricksaccous There's probably 1000 and 1 ways... for example put both conditions in the HAVING clause, or split the query in two and use a UNION, or use the query with the HAVING clause as a subquery in an `OR IN ( ... )` condition, or or or... |
# |
Aug 27th 2019, 20:31 |
kiwi_64 |
i selected 7.0 in cPanel and it gives me this error |
# |
Aug 27th 2019, 20:31 |
kiwi_64 |
*Your version of PHP is 7.0.33 The version should be 7.0 |
# |
Aug 27th 2019, 20:31 |
kiwi_64 |
any idea how to fix this error 'Your version of PHP is 5.6.40 The version should be 7.0' |
# |
Aug 27th 2019, 20:07 |
ricksaccous |
where 'Model.id' => $id or $query->having(['field <=' 100]) |
# |
Aug 27th 2019, 20:06 |
ricksaccous |
how would you do |
# |
Aug 27th 2019, 18:58 |
ricksaccous |
https://github.com/dereuromark/cakephp-geo/blob/master/src/Model/Behavior/GeocoderBehavior.php |
# |
Aug 27th 2019, 18:57 |
ricksaccous |
it seems i found something |
# |
Aug 27th 2019, 18:49 |
ricksaccous |
what was your goto method for doing that? |
# |
Aug 27th 2019, 18:49 |
ricksaccous |
has anyone had to do distance calculations between two lat/long points? |
# |
Aug 27th 2019, 16:32 |
ricksaccous |
x) |
# |
Aug 27th 2019, 16:31 |
neon1024 |
Later everyone :wave: |
# |
Aug 27th 2019, 16:31 |
neon1024 |
:) |
# |
Aug 27th 2019, 16:31 |
ricksaccous |
honestly i was kind of guessing |
# |
Aug 27th 2019, 16:31 |
ricksaccous |
maybe you were right then, no problem |
# |
Aug 27th 2019, 16:31 |
neon1024 |
Thanks for your time @ricksaccous :thumbsup: |
# |
Aug 27th 2019, 16:31 |
ricksaccous |
oh dang it |
# |
Aug 27th 2019, 16:31 |
neon1024 |
Hm, well that’s the end of the day for me |
# |
Aug 27th 2019, 16:30 |
neon1024 |
Well adding `_joinData` to the `$_accessible` of my `Question` entity has prevented the join data marhslling into an entity |
# |
Aug 27th 2019, 16:30 |
ricksaccous |
lol |
# |
Aug 27th 2019, 16:29 |
ricksaccous |
but i'm too lazy |
# |
Aug 27th 2019, 16:29 |
slackebot2 |
<neon1024> |
# |
Aug 27th 2019, 16:29 |
ricksaccous |
prob allowing each field specifically is better though |
# |
Aug 27th 2019, 16:29 |
ricksaccous |
i generally just leave my entities 'id' => false, '*' => true when it comes to accessibility |
# |
Aug 27th 2019, 16:28 |
neon1024 |
Hm, I don’t see it anywhere. I’ll give that a try |
# |
Aug 27th 2019, 16:28 |
ricksaccous |
i don't think cake just allows it magically unfortunately |
# |
Aug 27th 2019, 16:28 |
neon1024 |
As it’s generated by the join |
# |
Aug 27th 2019, 16:28 |
ricksaccous |
it does, and it should show up in the accessible array |