Logs for #cakephp

Page 7 of 36,154, showing 100 records out of 3,615,322 total, starting on record 601, ending on 700

# At Username Text
# Jun 11th, 21:28 ricksaccous how do i set the identifier
# Jun 11th, 19:52 challgren Sorry gotta jump on a conference call be back in 45 minutes but look at the ORM docs on book.cakephp.org
# Jun 11th, 19:52 rightscoreanalysis but it will be a rightJoin
# Jun 11th, 19:52 rightscoreanalysis I can get a similar result with a contain and a condition
# Jun 11th, 19:51 challgren I believe its whatever you have your relationship setup as
# Jun 11th, 19:51 challgren If you have your relationships setup
# Jun 11th, 19:51 rightscoreanalysis contain is rightJoin isn't it?
# Jun 11th, 19:51 challgren The contain will do that
# Jun 11th, 19:50 rightscoreanalysis what if I want a leftJoin though?
# Jun 11th, 19:50 challgren `$ListingsTable->find()->contain(['ListingImages'])`
# Jun 11th, 19:48 rightscoreanalysis which doesn't work incidently
# Jun 11th, 19:48 rightscoreanalysis $query->select(['ListingImages.*']);
# Jun 11th, 19:47 rightscoreanalysis eg. $query->select(['ListingImages.id', 'Listings.id']);
# Jun 11th, 19:46 rightscoreanalysis hi - anyone know if when I am building an array can I use a wildcard to select all table columns, instead of explicitly specifying each
# Jun 11th, 18:57 challgren <script>alert(‘This is injected js’);</script>
# Jun 11th, 18:56 ricksaccous yeah, you'll have to think of things like that
# Jun 11th, 18:56 challgren But doing so is risky because anyone that can insert a record into the db can potentially introduce javascript
# Jun 11th, 18:56 ricksaccous then when you display it don't use h() on it
# Jun 11th, 18:55 ricksaccous save it normally
# Jun 11th, 18:55 noel How can one save HTML content to the db and then get it out again and display it as HTML content in the template
# Jun 11th, 18:20 admad @noel since you are in controller just use `$this->loadModel('Articles')`
# Jun 11th, 18:19 skie there is MethodTest class where exists example how to call method inside package
# Jun 11th, 18:17 noel I'm trying to work with the ORM (https://book.cakephp.org/3.0/en/orm/query-builder.html)and having some trouble. I have a controller and I want to work with a particular table. I've tried this: `$articles = TableRegistry::getTableLocator()->get('Articles');` but it's giving me an error: `Class 'TableRegistry' not found`. Any clues?
# Jun 11th, 18:16 skie Did you checked tests cases, in the oracle driver plugin?
# Jun 11th, 18:15 skie ck
# Jun 11th, 18:12 challgren @noel if you use mac this https://getgrav.org/blog/macos-mojave-apache-multiple-php-versions is the best guide
# Jun 11th, 18:09 nucc1 Arckame: if you are writing the plain query yourself, i believe you have to list all the fields you want. (i don't know if cake has special sauce to do different though).
# Jun 11th, 16:57 noel never mind.. malformed URL
# Jun 11th, 16:50 noel When I use the cake Http Client for a given GET request I get no body in the response and 301 http code. When I do the same request from POSTMAN I get the expected response with body. What am I missing?
# Jun 11th, 15:58 noel bizarrely after all my failed attempts to install intl.. I tried composer again and now it's working :man-shrugging:
# Jun 11th, 15:48 hochwender Reporting my question: I'm using attempting to use the CakePHP 3 Driver for Oracle Database to call a stored procedure. Can someone point me to a working example? I'm unable to make it work.
# Jun 11th, 15:47 noel Also just noticed that my PHP info seems to think that intl is configured. It shows `--enable-int`
# Jun 11th, 15:41 steinkel try using --ignore-platform-reqs
# Jun 11th, 15:40 steinkel composer is the problem?
# Jun 11th, 15:33 noel @steinkel problem is that cakephp won't even install for me without intl.
# Jun 11th, 15:33 Arckame using a manual 'join' in a query don't return the joined table fields. Did i miss something or the fields must be manually added in 'select()'
# Jun 11th, 15:32 Arckame hello
# Jun 11th, 15:30 steinkel @noel check https://github.com/CakeDC/Intl it could help to bypass this issue if you don't really need intl
# Jun 11th, 15:28 JDD_Canada I have thre dev machines, both win and *nix, I use docker, just sync my docker file, it works a treat for dev
# Jun 11th, 15:24 ricksaccous lol
# Jun 11th, 15:24 ricksaccous disregard it actually
# Jun 11th, 15:24 ricksaccous that was written in 2014
# Jun 11th, 15:23 ricksaccous https://pagegwood.com/web-development/how-to-enable-intl-extension-mamp-osx-10-9-2/
# Jun 11th, 15:13 noel Still don't understand why none of this was a problem on my last Mojave MAMP PRO setup. I never went through any of this... it just worked out the box.
# Jun 11th, 15:13 JDD_Canada looking like*
# Jun 11th, 15:13 JDD_Canada This is loking liek a rabbit hole right now
# Jun 11th, 15:12 JDD_Canada doh, sorry, my mac experience is limited ot an old junker I have only to run xcode like, once every two years. It might be easier to either setup a docker in your ide, or re download mamp , and check for options to include intl
# Jun 11th, 15:11 noel https://bugs.php.net/bug.php?id=72879
# Jun 11th, 15:10 noel ... which I solved with `brew install icu4c`... but then `make` fails :face_vomiting:
# Jun 11th, 15:05 noel which I solved with `brew install autoconf` however `pecl install intl` then asks: `Specify where ICU libraries and headers can be found [DEFAULT]`. I assume I don't have the ICU libraries and headers?
# Jun 11th, 15:02 noel @JDD_Canada `pecl install intl` gives the following error: `Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script. ERROR: `phpize' failed`
# Jun 11th, 14:18 JDD_Canada then it should show up in your php.ini
# Jun 11th, 14:18 JDD_Canada in a terminal do pecl install intl
# Jun 11th, 14:18 JDD_Canada ah , it might be a bit different on mac...you might need to install it
# Jun 11th, 14:16 noel @JDD_Canada thanks that sounds easy! However I'm not seeing a line like that in the php.ini file.
# Jun 11th, 14:14 conehead ``` object(Cake\Chronos\MutableDateTime) { 'hasFixedNow' => false, 'time' => '2020-01-01 13:37:12.000000', 'timezone' => 'Europe/Berlin' } ```
# Jun 11th, 14:14 conehead @kaliel This is working fine for me. But I have to leave now :( ``` $date = new FrozenDate('2020-01-01'); $time = new FrozenTime('2020-02-02 13:37:12'); $time = $time->toMutable(); $time->setDate($date->year, $date->month, $date->day); ```
# Jun 11th, 14:11 JDD_Canada in your mamp, click the config under apache, select php.. in the php.ini file, remove the ; from the line that says extension intl
# Jun 11th, 14:10 noel re: vagrant, oh god no.. been there, done that, got the tomb stone.
# Jun 11th, 14:09 ricksaccous if you want a consistent dev env use vagrant
# Jun 11th, 14:08 ricksaccous who knows, lol
# Jun 11th, 14:08 ricksaccous you probably just have to uncomment a line in your php ini then restart it or something
# Jun 11th, 14:07 noel Yeah, I get that but I've never installed extensions for MAMP PRO and it has worked in the past. So I don't understand why it doesn't work now.
# Jun 11th, 14:06 ricksaccous you don't have the intl extension installed
# Jun 11th, 14:06 ricksaccous the error is pretty self-explanatory
# Jun 11th, 14:06 noel Hi all. I'm trying to install CakePHP 3.7 on MacOS Mojave and MAMP PRO 5 – and getting errors: ``` - cakephp/cakephp 3.7.8 requires ext-intl * -> the requested PHP extension intl is missing from your system. ``` I didn't have this issue on my previous computer (which was exactly the same stack). Any clues?
# Jun 11th, 13:52 kaliel i trioed to use $datetime->toMutable() but it returns a date without time :S
# Jun 11th, 13:51 conehead Well you can still create a new FrozenDate-Object with the data of those two
# Jun 11th, 13:50 kaliel @conehead yes !!! i'll try it but since it's immutable i htink it will fail
# Jun 11th, 13:33 conehead `$time->setDate($date->year, $date->month, $date->day);`?
# Jun 11th, 13:29 conehead What do you mean by merging? Adding dates? Change the date from the FrozenTime to the date of the FrozenDate?
# Jun 11th, 13:22 kaliel Hi everyone, is there a quick way to merge a FrozenDate with a FrozenTime ? Thanks
# Jun 11th, 13:13 hochwender I'm using attempting to use the CakePHP 3 Driver for Oracle Database to call a stored procedure. Can someone point me to a working example? I'm receiving an error that procedure isn't found.... Almost like, it's being called on the wrong database connection.
# Jun 11th, 08:34 conehead I slowly think this is a bug in cake. I can't just get saving through to workin "properly". Is there no way to setup the data in beforeMarshal so that existing entries do not change their id?
# Jun 11th, 07:14 mehov Ah, good point. I made it empty because the docs say *If you use the default for this option (empty), it will not render a separator.* Turns out I had to remove that argument altogether and it works. Thank you!
# Jun 11th, 07:12 kgb.acct.personal Add content to `separator` then check if it displays in the middle
# Jun 11th, 07:11 kgb.acct.personal It's the separator
# Jun 11th, 07:10 mehov Hi guys, still getting breadcrumbs to work ```` $this->Breadcrumbs->add( 'Products', ['controller' => 'products', 'action' => 'index'] ); $this->Breadcrumbs->add( 'Add Product', ['controller' => 'products', 'action' => 'add'] ); echo $this->Breadcrumbs->render( ['class' => 'breadcrumb'], ['separator' => ''] ); ```` Results in: ```` <ol class="breadcrumb"> <li><a href="/stock/products">Products</a></li>
# Jun 11th, 07:10 slackebot1 <li><span></span></li> <li><a href="/stock/products/add">Add Product</a></li> </ol> ```` My question is where does that middle empty breadcrumb come from?
# Jun 11th, 07:03 conehead Good mornin
# Jun 11th, 06:46 imonsei hello everybooty o/
# Jun 11th, 03:18 kgb.acct.personal How do I validate belongsToMany association if they exist?
# Jun 11th, 02:16 ricksaccous @stephenzgalbraith I think you just beforeMarshall the request data from comma delimited to hasMany form
# Jun 11th, 01:11 stephenzgalbraith Perhaps I'm just extremely tired, but I can't seem to figure out how I would do the following: In a form, let's say I have two fields: page and action --- I want to be able to write a comma separated list into the action field and have individual records entered for the page field and then each individual action once the field is exploded by the comma. I'm figuring it has something to do with saving multiple entities at once, but I
# Jun 11th, 01:11 slackebot1 am not sure how to go about modifying the request data while rewriting the least amount of code.
# Jun 10th, 20:26 nucc1 hi, i'm running a cakephp site out of my home directory, and I thought if i simply made the tmp/ directory (recursively) writable by the webserver user, it would be fine, but I keep getting filesystem errors, is there something i'm missing?
# Jun 10th, 18:46 challgren Im gonna have to play around and see what I can hack together
# Jun 10th, 18:39 challgren Thanks JDD
# Jun 10th, 18:15 wbprgrmr86 Awesome! Thanks @jeremyharris!
# Jun 10th, 18:14 jeremyharris @wbprgrmr86 yes! you can pass a query object to it
# Jun 10th, 18:02 JDD_Canada Not sure if that will fit your layout, but I thought Id throw the idea at you
# Jun 10th, 18:01 JDD_Canada @challgren I am doing something similar, each item in my app needs to be updated, and they want to see a timeline, I decided to make the item static, and added a new object "interaction", i moved some of the fields to it, and they operate on it - I use the interaction object to show the changes, generate a timeline
# Jun 10th, 17:47 wbprgrmr86 is it possible in ```$this->paginate()``` to have a where clause option?
# Jun 10th, 16:43 challgren Hehe yep! I mean I do charge per post, so I could duplicate it and charge double my comission :P
# Jun 10th, 16:39 jeremyharris too bad clients pay the bills, eh? :)
# Jun 10th, 16:38 challgren Hmm ok Im gonna have to think this through a bit, client wanted to just duplicate the Posts but has already complained the Posts list is too many. Told them <sarcasm>yeah duplicating them wont solve that problem at all </sarcasm>
# Jun 10th, 16:37 jeremyharris then you know what hasMany tags version to pull
# Jun 10th, 16:37 jeremyharris you could maybe add a tag_version_id and update that as well at the time
# Jun 10th, 16:36 challgren I do update the “Post” when the tags have been changed, via counter cache and manually updating the modified time
# Jun 10th, 16:35 jeremyharris I use that version plugin as well, but your requirement doesn’t quite fit what it does. You might be able to align version_ids (if you use those) but that can be problematic as well