Log message #4198746

# At Username Text
# Aug 19th 2019, 14:15 ricksaccous you have to user the plugin prefix
# Aug 19th 2019, 14:14 wgon0001 I have put helper in corresponding folder and did set up the loadHelper function
# Aug 19th 2019, 14:13 slackebot <wgon0001>
# Aug 19th 2019, 14:12 ricksaccous @wgon0001 gist your app view code
# Aug 19th 2019, 14:08 wgon0001 And I installed it with composer require command
# Aug 19th 2019, 14:08 wgon0001 Hi everyone, here I am encountering a problem which to plugins (nnnick/ChartsJS) which require a helper to be loaded, I have tried to load it into AppView.php, but I am getting a fatal error with “Cannot declare a class ***\View\Helper\ChartjsHelper.php, because the name already in use on line0”, any ideas on how to load with plugins?
# Aug 19th 2019, 14:07 davorminchorov `->getSchema()->getColumnType('email_adddress')` returns null
# Aug 19th 2019, 14:07 dereuromark you could introspect the annotations on top :slightly_smiling_face:
# Aug 19th 2019, 14:07 dereuromark would be from outside
# Aug 19th 2019, 14:07 dereuromark nope
# Aug 19th 2019, 14:07 val is schema accessible in Entity?
# Aug 19th 2019, 14:07 dereuromark using the schema of table, sure.
# Aug 19th 2019, 14:06 val Is there an easy way to check whether the property in Entity class represents a column but not an association?
# Aug 19th 2019, 14:05 davorminchorov TypeMap shows the field as string using the getSchema() method
# Aug 19th 2019, 14:02 davorminchorov Thanks!
# Aug 19th 2019, 14:01 admad cya
# Aug 19th 2019, 14:00 admad the exception is thrown before the final query is even generted
# Aug 19th 2019, 14:00 davorminchorov That's how I usually check queries from the ORM in Laravel but I am asking if there's something similar in CakePHP
# Aug 19th 2019, 14:00 admad @dereuromark true, but that's unlikely
# Aug 19th 2019, 14:00 davorminchorov I am asking how to get the query
# Aug 19th 2019, 13:59 admad i'll move on if you are not interested in trying what i suggest :slightly_smiling_face:
# Aug 19th 2019, 13:58 davorminchorov Is there a toSql / event listener for queries like Laravel?
# Aug 19th 2019, 13:58 dereuromark or if the query is overwriting it somehow, thus the need to see the query :slightly_smiling_face:
# Aug 19th 2019, 13:57 admad actually that's what needed to be checked earlier instead of `getColumn()` :slightly_smiling_face:
# Aug 19th 2019, 13:56 admad check `debug($table->getSchema()->getColumnType('description'))` first
# Aug 19th 2019, 13:55 admad that would only happen if your app/plugin code is explicitly overriding the type
# Aug 19th 2019, 13:54 admad ok, so your table schema seems find, then somewhere in the query the field gets overridden to integer type
# Aug 19th 2019, 13:53 davorminchorov ``` array:8 [▼ "type" => "string" "length" => 255 "null" => true "default" => null "collate" => "latin1_swedish_ci" "comment" => "" "precision" => null "fixed" => null ] ```
# Aug 19th 2019, 13:50 admad or whatever the column/field is with the problem
# Aug 19th 2019, 13:50 admad @davorminchorov show the output of `debug($table->getSchema()->getColumn('description'))`
# Aug 19th 2019, 13:50 davorminchorov @admad clearing schema and orm cache did not help
# Aug 19th 2019, 13:49 admad debugkit has a panel which shows "auto tables" btw
# Aug 19th 2019, 13:49 val thanks, got it
# Aug 19th 2019, 13:49 admad it would return Cake\ORM\Entity instance only if "auto table" is used or you haven't created App\Model\Entity\Entity
# Aug 19th 2019, 13:49 ricksaccous if you have an entity class defined for that model it should use the entity class you created
# Aug 19th 2019, 13:48 val Is `$this->find()->first();` called in table class in 3.x supposed to return an instance of Cake\ORM\Entity but not Model\MyEntity?
# Aug 19th 2019, 13:46 alexdd55976 i am not even far enough to have that
# Aug 19th 2019, 13:45 admad @alexdd55976 assuming sessions are working on your shitty environment, a common cause for session being lost is links to non existent assets on pages
# Aug 19th 2019, 13:44 alexdd55976 `$this->Flash ` is not working either
# Aug 19th 2019, 13:44 alexdd55976 @ricksaccous i can not find any configuration key, that could help here... any idea? its a crappy windows machine with xampp
# Aug 19th 2019, 13:43 davorminchorov done that just now, let me see if that fixes it