Re: How to set Cake 3.0 to save with different date format ?

2015-05-11 Thread Joe T.
are you saving the data, can you use gist to show all your code? return $this-_properties['ready_date']-format('Y-m-d'); On Monday, May 11, 2015 at 7:18:50 AM UTC+2, Joe T. wrote: i found this topic here and on Stack Overflow: https://stackoverflow.com/questions/29336852/how-to-format-date

Re: How to set Cake 3.0 to save with different date format ?

2015-05-10 Thread Joe T.
ready_date = '06/01/2015' , modified = '2015-05-11 05:00:54' WHERE id = 20 What do i try next? Thanks, joe t. On Thursday, 2 April 2015 14:56:29 UTC-4, José Lorenzo wrote: Read this: http://book.cakephp.org/3.0/en/orm/database-basics.html#parsing-localized-datetime-data On Thursday

Cake 3: Map Entity mutators/virtuals with a database type

2015-04-26 Thread Joe T.
some virtuals probably can't realistically do this (such as concatenating several fields together), but two of those are date-ish, and based on actual DATE-type columns. Any ideas? Perhaps alternatives to this approach? Thanks. -joe t. -- Like Us on FaceBook https://www.facebook.com/CakePHP

3.x: SessionHelper deprecated, what's the new version of this?

2015-04-21 Thread Joe T.
Looks like SessionHelper is/will be deprecated for 3.1 and request-session() is recommended... i have this chunk of code found in my Layout/default.ctp: div id=content ?= $this-Session-flash(); ? ?= $this-fetch('content'); ? /div i tried $this-request-session()-flash()

Re: Still having trouble with saving BelongsToMany data

2015-03-21 Thread Joe T.
José, Kevin, Breakthrough at last! https://github.com/cakephp/cakephp/issues/6100 Fixed validation other minor discrepancies in Table/Entity classes that may not have even affected things much, but didn't get any better results. Finally i had nothing left, so tried resetting indexes on the

Re: Still having trouble with saving BelongsToMany data

2015-03-13 Thread Joe T.
i tinkered with -link() a bit last night, but must have set up something wrong, as it tried to insert more than 1 link record for the same Listing ID / Attribute ID pair, violating the unique key. There was a guy on #cakephp IRC last night having the exact same problem i'm having, and

Re: Still having trouble with saving BelongsToMany data

2015-03-13 Thread Joe T.
UPDATE i worked with my form inputs and the Controller a bit, and i DO have functioning saves working again (for the next ten minutes until it breaks again). i'll describe what i had to do, and why i don't like it. Form inputs: Basically, i have to scrap the idea of the ORM carrying data to

Re: Still having trouble with saving BelongsToMany data

2015-03-12 Thread Joe T.
Somehow, i'm totally unsurprised. _ i'll take a look at the sample you uploaded tonight. You're right, without some UI controls, all the Attributes would require values for the Submit to save successfully. i have Javascript toggling the [disabled] property on the *_joinData.value* and hidden

Re: Still having trouble with saving BelongsToMany data

2015-03-12 Thread Joe T.
Specifically where it shows the calls to `Users-link($article, [$user])` On Thursday, March 12, 2015 at 3:09:54 PM UTC+1, Joe T. wrote: Somehow, i'm totally unsurprised. _ i'll take a look at the sample you uploaded tonight. You're right, without some UI controls, all the Attributes would require

Re: Still having trouble with saving BelongsToMany data

2015-03-12 Thread Joe T.
to that issue. Do you have any idea of what cake version you were using before updating? On Thursday, March 12, 2015 at 4:37:50 AM UTC+1, Joe T. wrote: i absolutely cannot believe this: it's broken again. i haven't done anything but run *composer update* and i'm back to losing the [_joinData][value

Re: Still having trouble with saving BelongsToMany data

2015-03-11 Thread Joe T.
. Is there any chance it's related to this issue? https://github.com/cakephp/cakephp/issues/6050 Now what? On Sunday, 8 March 2015 00:40:49 UTC-5, Joe T. wrote: Kevin, i'm so grateful for all your effort ideas. i don't fully grasp conditional validation yet, though i suspect i will have

Re: Still having trouble with saving BelongsToMany data

2015-03-07 Thread Joe T.
Kevin, i'm so grateful for all your effort ideas. i don't fully grasp conditional validation yet, though i suspect i will have to address that sooner or later. When i re-baked the models, -requirePresence('field_name', 'create') is already set by default in *AttributesTable*, so that got me

Re: Still having trouble with saving BelongsToMany data

2015-03-06 Thread Joe T.
Kevin, i'm still not sure that's a good idea. When an admin goes to update an Attribute, validation would allow them to leave required fields empty. The database would object, since those fields are set NOT NULL. i'm not sure how that objection is handled if i didn't prevent it with the

Re: Still having trouble with saving BelongsToMany data

2015-03-05 Thread Joe T.
Kevin, i can do that, but it doesn't make sense to me. i don't want my Listing to make any changes to the Attributes, so why is it attempting to do so? If i disable validation for updates, they won't be validated when the admin actually DOES edit an Attribute. Maybe a full end-to-end

Re: Still having trouble with saving BelongsToMany data

2015-03-04 Thread Joe T.
:05:11 UTC-5, José Lorenzo wrote: Can you show a debug of the resulting entity after patchEntity. Also, if you join the #cakephp IRC channel in freenode, I think we can help you faster :) On Tuesday, March 3, 2015 at 6:01:25 PM UTC+1, Joe T. wrote: José i appreciate your response. Please

Re: Still having trouble with saving BelongsToMany data

2015-03-04 Thread Joe T.
Kevin, i definitely need to spend some time getting XDebug running through my router, but currently no, i don't have it. i've relied on Log::debug for info on what's happening. There are lots of things i'd like to do to streamline this process (Vagrant, for one) but my enthusiasm for this

Re: Still having trouble with saving BelongsToMany data

2015-03-03 Thread Joe T.
don't get stuck as well in the same problem On Tuesday, March 3, 2015 at 7:25:01 AM UTC+1, Joe T. wrote: i'm REALLY sorry for the delay getting back to you. And unfortunately, i'm still not there. It's CLOSE though: i did exactly as you suggested in your last post. Set up my Entities

Re: Still having trouble with saving BelongsToMany data

2015-03-03 Thread Joe T.
*partially* worked so far, but you're telling me that's doing it wrong. So what's left? Thank you. On Tuesday, 3 March 2015 10:13:53 UTC-5, José Lorenzo wrote: On Tuesday, March 3, 2015 at 2:43:55 PM UTC+1, Joe T. wrote: 1. Had to add *`id`* to the Attributes *$_accessible* field array

Re: Still having trouble with saving BelongsToMany data

2015-03-03 Thread Joe T.
, March 3, 2015 at 6:01:25 PM UTC+1, Joe T. wrote: José i appreciate your response. Please forgive my frustration, i'm *trying* to learn what i'm doing wrong (and i do still believe i'm doing something wrong, but can't figure out WHAT). Your comments make sense, and i was originally working

Re: Still having trouble with saving BelongsToMany data

2015-03-02 Thread Joe T.
i'm REALLY sorry for the delay getting back to you. And unfortunately, i'm still not there. It's CLOSE though: i did exactly as you suggested in your last post. Set up my Entities Tables just as you described. Set up the controller to manually set the _joinData dirty and called the save. i

Re: Still having trouble with saving BelongsToMany data

2015-02-24 Thread Joe T.
Okay, i've tried again, but i'm still not there. i think i need a little more detail / hand-holding... LISTING Entity: protected $_accessible = [ // All table columns = true, except id (not listed) // ... 'attributes' = true ]; Table: public function initialize() { // Calls to

Re: Still having trouble with saving BelongsToMany data

2015-02-23 Thread Joe T.
i agree. If you'd like to do the honor, i think you have a clearer grasp of what's happening in the background. i just know it's not happening as advertised. As for getting the primary Listings record to save, i'll follow up when i get home with the configuration that gets that far, but

Re: Still having trouble with saving BelongsToMany data

2015-02-23 Thread Joe T.
Thanks again! i'll try to move forward by kludging around this with a separate Entity for ListingsAttributes see if that manages to work. -joe On Monday, 23 February 2015 15:11:05 UTC-5, heavyKevy wrote: You are welcome... By the way, others have already submitted bug reports for this

Re: Still having trouble with saving BelongsToMany data

2015-02-23 Thread Joe T.
i took a look at the issues tonight myself and saw the same. i'll run the update re-bakes tomorrow to test it out. Thanks for all your help. -joe On Tuesday, 24 February 2015 02:09:55 UTC-5, heavyKevy wrote: Joe, Looking more carefully, I see that the tickets are recently closed. I did a

Re: Still having trouble with saving BelongsToMany data

2015-02-22 Thread Joe T.
Thanks for responding. So i might NOT be crazy??? The 3 you identified as the ID isn't - it's the array index for that listing field. See the inputs again. Parking is index 3, its record ID is 1. i wouldn't want to insert 3 as the *listings_attributes.attribute_id*. i re-baked the Tables,

Re: Still having trouble with saving BelongsToMany data

2015-02-22 Thread Joe T.
Also, just to clarify, i'm not adding new Attributes in the Listing form. i'm displaying them, and when the user checks them, a text input is shown for those that require it. The only data i need to save apart from the Listing is in ListingsAttributes: attribute_id : 1 (Attribute's checkbox

Still having trouble with saving BelongsToMany data

2015-02-21 Thread Joe T.
So, i had a thread going here: https://groups.google.com/forum/#!topic/cake-php/PMtHkEvIURo Never got anywhere on solving this. Decided a new thread was called for because tables have changed documentation has been updated, but i'm having the same problem. i'll try to explain as clearly as i

Re: 3.0 - Cakephp plugins gone from /plugins

2015-01-31 Thread Joe T.
. Install the php xdebug extension, that should help. On Wednesday, January 28, 2015 at 3:14:02 AM UTC+1, Joe T. wrote: i recently did a *composer update* for my dev site, and all the Cake plugins that were under /plugins were removed: /plugins - /Bake (gone) - /DebugKit (gone

3.0 - Cakephp plugins gone from /plugins

2015-01-27 Thread Joe T.
i recently did a *composer update* for my dev site, and all the Cake plugins that were under /plugins were removed: /plugins - /Bake (gone) - /DebugKit (gone) - /Migrations (gone) However, there are new(?) directories under /vendor/cakephp corresponding to the same plugins:

Re: 3.0: Saving new entity with belongsToMany data

2015-01-22 Thread Joe T.
at 5:39:21 AM UTC+1, Joe T. wrote: Did i get lost in the shuffle? i confess i've been busy with other things myself, but have been checking here to see if there was any response with some ideas what i'm doing wrong... Any help? Please? :) Always appreciated. -joe On Tuesday, 13

Re: 3.0: Saving new entity with belongsToMany data

2015-01-21 Thread Joe T.
Did i get lost in the shuffle? i confess i've been busy with other things myself, but have been checking here to see if there was any response with some ideas what i'm doing wrong... Any help? Please? :) Always appreciated. -joe On Tuesday, 13 January 2015 08:04:37 UTC-5, Joe T. wrote

Re: CakePHP 2.0 authentication(login) without ctp files but other types

2015-01-13 Thread Joe T.
you, tech_me On Tuesday, January 6, 2015 at 9:11:07 AM UTC+9, Joe T. wrote: Is that the actual data in `users`, or just simplified for example? Just want to clarify. Manually adding records won't work in this case. It is the actual data which is storing in my `users` table. If '123

Re: 3.0: Saving new entity with belongsToMany data

2015-01-13 Thread Joe T.
think you should put your code somewhere so we can take a look, otherwise trying to guess what the problem is will take a while. On Tuesday, January 13, 2015 at 4:02:56 AM UTC+1, Joe T. wrote: Wondering if someone can help me take a closer look at this... i'm still not having any luck

Re: 3.0: Saving new entity with belongsToMany data

2015-01-12 Thread Joe T.
2014 01:52:54 UTC-5, Joe T. wrote: i figured out part of my trouble, but the purpose of the original post still remains. The parent record in Listings wasn't saving correctly because i didn't have an `active` field in the form (*facepalm*). Corrected that. Still having trouble with the date

Re: CakePHP 2.0 authentication(login) without ctp files but other types

2015-01-05 Thread Joe T.
needs. What this means? Are you talking about the usage in my controller but not html(TAL) files for login? Regards, tech_me On Tuesday, December 23, 2014 11:35:40 PM UTC+9, Joe T. wrote: Is that the actual data in `users`, or just simplified for example? Just want to clarify. Manually

Re: 3.0: Saving new entity with belongsToMany data

2014-12-29 Thread Joe T.
missing that it won't save that data? Remember, `value` is optional to the data record, it's controlled by the UI. So both of those records *should be* valid. Why then is neither of them being saved? Any additional help here is appreciated. -joe t. On Monday, 22 December 2014 22:54:12 UTC-5

Re: CakePHP 2.0 authentication(login) without ctp files but other types

2014-12-23 Thread Joe T.
' in the database after Auth encrypts it. Look here for how to set up adding/editing users: http://book.cakephp.org/2.0/en/tutorials-and-examples/blog-auth-example/auth.html Obviously, adapt the CTP form to your TAL needs. Hope that helps... -joe t. On Monday, 22 December 2014 20:42:33 UTC-5

Re: 3.0: Saving new entity with belongsToMany data

2014-12-22 Thread Joe T.
On Friday, 19 December 2014 11:29:12 UTC-5, José Lorenzo wrote: You should post a property called listings_attrs, check your entity $_accessible array to make sure the property is also writable with request data. On Friday, December 19, 2014 6:29:43 AM UTC+1, Joe T. wrote: i've seen a couple

3.0: Saving new entity with belongsToMany data

2014-12-18 Thread Joe T.
i've seen a couple similar threads about this, but not my exact problem. i'm trying to follow the guide here: http://book.cakephp.org/3.0/en/orm/saving-data.html#converting-request-data-into-entities and coming up short. *i'm not getting any errors* (except a date field that constantly fails

Re: 3.0b3 - label[for] input[id] discrepancies

2014-12-03 Thread Joe T.
? Or is there an issue in checkbox() that it's not outputting the generated ID to HTML? *Question 2*: Any suggestions how to get the wrapping label's [for] to match the checkbox's [id] until one of the above is addressed? Thanks. -joe t. -- Like Us on FaceBook https://www.facebook.com/CakePHP