Log message #4199911

# At Username Text
# Aug 27th 2019, 12:47 np Hello, `'orderDate' => $request->created->format('Y-m-d'),` > Accessing created on the interface Cake\Datasource\EntityInterface suggest that you code against a concrete implementation. How to fix this?
# Aug 27th 2019, 12:32 vossen.steven https://github.com/dereuromark/cakephp-tools/blob/master/docs/Entity/Enum.md
# Aug 27th 2019, 12:31 conehead https://www.dereuromark.de/2010/06/24/static-enums-or-semihardcoded-attributes/
# Aug 27th 2019, 12:31 conehead @turkles Maybe have a look at this
# Aug 27th 2019, 12:24 turkles Howdy, if I have a set of values (like.. V. Poor, Poor, Avg, Good, V.Good) is there an easy way to show these as text but save in my db as a tinyint where my model switches them as it sets/gets?
# Aug 27th 2019, 10:45 neon1024 Ah, actually, I’ll add a condition to the association
# Aug 27th 2019, 10:44 neon1024 When I am using `belongsToMany()` with `through` option, how can I sort on a field in the through table? Do I need to expand the association to belongsTo and hasMany?
# Aug 27th 2019, 09:04 koeller Nevermind, after some more testint I found it. The key config is not necessary, just had to pass the key of my actual configuration to change, like: ``` $this->Crud->mapAction('edit', [ 'className' => '\App\Crud\Action\Data\EditAction', 'MessageCenter' => Configure::read('TableMessageCenter.Table') ]); ````
# Aug 27th 2019, 08:52 slackebot2 <koeller>
# Aug 27th 2019, 08:46 challgren Well its really late evening, here
# Aug 27th 2019, 08:28 conehead good mornin
# Aug 27th 2019, 08:27 challgren morning
# Aug 27th 2019, 08:03 vossen.steven o/
# Aug 27th 2019, 07:57 neon1024 Morning all :wave:
# Aug 27th 2019, 01:58 challgren https://github.com/cakephp/debug_kit/releases/tag/3.20.2
# Aug 27th 2019, 01:58 ricksaccous Awesome ;)
# Aug 27th 2019, 01:57 challgren @ricksaccous DebugKit is fixed now
# Aug 26th 2019, 21:57 slackebot2 ProductsTable and Product respectively, which does not seem to be the case I, for example, use Table->getAlias() and Entity->getSource() and both of these return RecommendedProducts instead of Products, meaning I get errors due to unkown table/entity. Now my question is how would I setup the relationship properly to get the results I need, or am I going about this the wrong way? An example of my use case is that I have meta_tags that have a foreign_id
# Aug 26th 2019, 21:57 slackebot2 $itemTable = TableRegistry::getTableLocator()->get($this->getSource()); $metaTags = $metaTagsTable->find() ->cache(sprintf('meta_tags_%s_%s', $itemTable->getAlias(), $this->id), '_meta_tags_') ->where([ $metaTagsTable->aliasField('foreign_id') => $this->id, $metaTagsTable->aliasField('foreign_model') => $itemTable->getAlias(), ])
# Aug 26th 2019, 21:57 slackebot2 ->first(); if ($metaTags !== null) { $this->_metaTags = $metaTags->value; } } return $this->_metaTags; } ```
# Aug 26th 2019, 21:57 slackebot2 + foreign_model, which I fetch and cache in my default entity, but since my Table->getAlias() and Entity->getSource() return the wrong values I can't get the right meta tag ``` DefaultEntity /** @var string|null */ private $_metaTags; /** * @return string|null */ protected function _getMetaTags() { if ($this->_metaTags === null) { $metaTagsTable = TableRegistry::getTableLocator()->get('MetaTags');
# Aug 26th 2019, 21:57 vossen.steven Hey guys, got a question about self referencing BelongsToMany I have Products with a BelongsToMany to RecommendedProducts ``` ProductsTable $this->belongsToMany('RecommendedProducts', [ 'className' => 'Products', 'joinTable' => 'products_recommended_products', ]); ``` Now on to the problem, for me it seemed logical that both the RecommendedProductsTable and RecommendedProduct would reference
# Aug 26th 2019, 18:52 ricksaccous i just threw in an issue
# Aug 26th 2019, 18:52 ricksaccous nah it's a bug i believe
# Aug 26th 2019, 18:38 lpj145 and install or update again...
# Aug 26th 2019, 18:38 lpj145 try delet vendors folder
# Aug 26th 2019, 18:35 ricksaccous has anyone else run into this yet?
# Aug 26th 2019, 18:34 ricksaccous ``` Undefined index: plugin [ROOT/vendor/cakephp/debug_kit/src/Panel/RoutesPanel.php, line 43] ```
# Aug 26th 2019, 18:34 ricksaccous i'm getting an error with debugkit routes
# Aug 26th 2019, 18:33 slackebot2 <lpj145>
# Aug 26th 2019, 18:32 lpj145 thanks bro!
# Aug 26th 2019, 18:32 lpj145 is a old legacy system!
# Aug 26th 2019, 18:32 slackebot2 <lpj145>
# Aug 26th 2019, 18:32 lpj145 ok, i'm solved my issue!
# Aug 26th 2019, 18:24 lpj145 if i put id session from root dir to subfolder cakephp application this works as expected.
# Aug 26th 2019, 18:23 lpj145 someone know how solve this ?
# Aug 26th 2019, 18:23 lpj145 Cakephp try submodule folder api initialize session with another id and lost session data on root dir...
# Aug 26th 2019, 18:22 lpj145 is about session id...
# Aug 26th 2019, 18:22 lpj145 ok, now i'm can understando what is wrong...
# Aug 26th 2019, 18:05 lpj145 can understand me ?
# Aug 26th 2019, 18:05 lpj145 i need to check some custom data session by other application...