Logs for #cakephp

Page 6 of 36,249, showing 100 records out of 3,624,835 total, starting on record 501, ending on 600

# At Username Text
# Aug 19th, 22:16 rightscoreanalysis are they both pointing to the same folder
# Aug 19th, 22:16 D-rex i added the rewritebase
# Aug 19th, 22:16 D-rex i tried that unless im missing something else
# Aug 19th, 22:16 rightscoreanalysis hthaccess?
# Aug 19th, 22:14 D-rex i have tried numerous different configs and setting changes
# Aug 19th, 22:14 D-rex need some assistance. site ran fine on localhost but just went to upload it to webserver and now im getting error 500
# Aug 19th, 21:41 rightscoreanalysis I tried: $routes->connect('articles/view/:slug', ['controller' => 'Articles', 'action' => 'view'], ['pass' => ['slug']]);
# Aug 19th, 21:41 rightscoreanalysis anyone know how to connect slug route sin the routes.php
# Aug 19th, 19:36 btx @kailas do prod/dev have different OS? the case-sensitivity of the host OS changes results with mysql
# Aug 19th, 16:36 kailas and again, the SQL matches
# Aug 19th, 16:36 kailas @admad yeah… it’s weird that the 100s of other queries wouldn’t have an issue, though
# Aug 19th, 15:58 admad @kailas the disparity in local and prod PHP version is concerning
# Aug 19th, 15:44 kailas downstream of executing the SQL that is
# Aug 19th, 15:44 kailas feels like it could be something like that. but it’d have to be downstream of getting the results of the query, right?
# Aug 19th, 15:43 kailas hrm. where would that be changed/twiddled?
# Aug 19th, 15:43 josbeir maybe some kind of escaping or encoding issue
# Aug 19th, 15:42 kailas @josbeir yeah, I’ve been looking through the log files and broken it down to just that one finder.
# Aug 19th, 15:40 josbeir @kalias if debugging is enabled on production you would not see a possible error, check the debug and error logfiles to make sure nothing fishy is happening
# Aug 19th, 15:36 admad @vossen.steven per url local storage is also an option. Similar to GH
# Aug 19th, 15:36 kailas I’ve also tried clearing cache
# Aug 19th, 15:36 kailas In my code I have a finder that returns no result on my production server, but proper results on my local dev environment. - I’ve looked at the SQL log on the production server and the SQL is identical. - If i execute that SQL from mysql command line on the production server, I get proper results (as well as any other connection to the production SQL server) totally stumped. any ideas?
# Aug 19th, 15:33 vossen.steven session is already done, so will check out the cookie thingy, tyvm!
# Aug 19th, 15:32 dereuromark yeah it would need maybe a more global JS based solution then ;) easiest is to fix the session/cookie part for now to hit this less likely
# Aug 19th, 15:31 vossen.steven was thinking of saving drafts in 5min intervals, but seems to me it's a lot of overhead, if I have to do it for every form
# Aug 19th, 15:31 dereuromark session often has a set limit for timeout (fixed date), if not reactivated/refreshed again.
# Aug 19th, 15:30 vossen.steven yea noticed a lot of apps have the same problem, I thought it was a session problem so I increased the timeout to 24 hours, but it seems to be an auth problem
# Aug 19th, 15:29 dereuromark the persisting and restore is used by github for example
# Aug 19th, 15:29 dereuromark otherwise try the higher session and cookie relogin times, but it can still happen then.
# Aug 19th, 15:29 dereuromark you can persist the draft via ajax in intervals if you wanna make sure
# Aug 19th, 15:28 dereuromark many apps and users have that problem :slightly_smiling_face:
# Aug 19th, 15:27 vossen.steven current problem is users starting to fill in a form, going afk for an hour, coming back to complete the form, and when hitting save they get redirected to login due being unauthenticated, obviously losing all the data nad being pissed off they have to restart...
# Aug 19th, 15:24 dereuromark together with proper config of course
# Aug 19th, 15:23 dereuromark cookie (re)login, there should be a plugin around
# Aug 19th, 15:22 vossen.steven Is there a reliable way to prevent a user getting logged out after x amount of inactivity?
# Aug 19th, 14:59 wgon0001 Thanks, will try it out
# Aug 19th, 14:50 dereuromark you could rather load them as documented and per framework way and then see if that class exists and is loaded properly
# Aug 19th, 14:49 dereuromark bad idea
# Aug 19th, 14:49 wgon0001 So I thought I have put all of them to corresponding place at first stages
# Aug 19th, 14:48 wgon0001 But I am not sure if the plugin has been loaded as it having its own webroot, composer.json and that helper
# Aug 19th, 14:42 dereuromark extending sth from core or plugin should be the absolute exception, not the rule
# Aug 19th, 14:41 dereuromark you destroy the whole idea of plugin using this way
# Aug 19th, 14:41 dereuromark yeah, why the copy into App view?
# Aug 19th, 14:41 wgon0001 Am I wrong on that step?
# Aug 19th, 14:41 wgon0001 But just make another copy into view helper
# Aug 19th, 14:40 wgon0001 I am did using plugins helper
# Aug 19th, 14:40 dereuromark @davorminchorov looks then somewhat like this for your helper calls: https://github.com/dereuromark/cakephp-ide-helper/blob/master/docs/img/model_autocomplete_loadmodel.png
# Aug 19th, 14:31 dereuromark magic strings on their own are evil, prevent them for this and many other reasons.
# Aug 19th, 14:31 dereuromark Tip: Once loaded the plugin, use IdeHelper and always use autocomplete for your phpstorm IDE to auto-display possible values here for the loadHelper() method :slightly_smiling_face:
# Aug 19th, 14:29 ricksaccous @wgon0001 i thought you were using the plugin's helper?
# Aug 19th, 14:29 ricksaccous wait why does he have his own helper there
# Aug 19th, 14:29 ricksaccous that is his app code based on what he's saying
# Aug 19th, 14:28 dereuromark Or is that in your app code?
# Aug 19th, 14:28 dereuromark You should always load the helper with proper plugin prefix.
# Aug 19th, 14:16 ricksaccous like ChartsJS.Chartjs
# Aug 19th, 14:16 ricksaccous or I think you have to use a period
# Aug 19th, 14:16 ricksaccous ;)
# Aug 19th, 14:16 ricksaccous ChartsJS/Chartjs might be what you need to load
# Aug 19th, 14:15 ricksaccous when loading a helper from a plugin
# Aug 19th, 14:15 ricksaccous you have to user the plugin prefix
# Aug 19th, 14:14 wgon0001 I have put helper in corresponding folder and did set up the loadHelper function
# Aug 19th, 14:13 slackebot <wgon0001>
# Aug 19th, 14:12 ricksaccous @wgon0001 gist your app view code
# Aug 19th, 14:08 wgon0001 And I installed it with composer require command
# Aug 19th, 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, 14:07 davorminchorov `->getSchema()->getColumnType('email_adddress')` returns null
# Aug 19th, 14:07 dereuromark you could introspect the annotations on top :slightly_smiling_face:
# Aug 19th, 14:07 dereuromark would be from outside
# Aug 19th, 14:07 dereuromark nope
# Aug 19th, 14:07 val is schema accessible in Entity?
# Aug 19th, 14:07 dereuromark using the schema of table, sure.
# Aug 19th, 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, 14:05 davorminchorov TypeMap shows the field as string using the getSchema() method
# Aug 19th, 14:02 davorminchorov Thanks!
# Aug 19th, 14:01 admad cya
# Aug 19th, 14:00 admad the exception is thrown before the final query is even generted
# Aug 19th, 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, 14:00 admad @dereuromark true, but that's unlikely
# Aug 19th, 14:00 davorminchorov I am asking how to get the query
# Aug 19th, 13:59 admad i'll move on if you are not interested in trying what i suggest :slightly_smiling_face:
# Aug 19th, 13:58 davorminchorov Is there a toSql / event listener for queries like Laravel?
# Aug 19th, 13:58 dereuromark or if the query is overwriting it somehow, thus the need to see the query :slightly_smiling_face:
# Aug 19th, 13:57 admad actually that's what needed to be checked earlier instead of `getColumn()` :slightly_smiling_face:
# Aug 19th, 13:56 admad check `debug($table->getSchema()->getColumnType('description'))` first
# Aug 19th, 13:55 admad that would only happen if your app/plugin code is explicitly overriding the type
# Aug 19th, 13:54 admad ok, so your table schema seems find, then somewhere in the query the field gets overridden to integer type
# Aug 19th, 13:53 davorminchorov ``` array:8 [▼ "type" => "string" "length" => 255 "null" => true "default" => null "collate" => "latin1_swedish_ci" "comment" => "" "precision" => null "fixed" => null ] ```
# Aug 19th, 13:50 admad or whatever the column/field is with the problem
# Aug 19th, 13:50 admad @davorminchorov show the output of `debug($table->getSchema()->getColumn('description'))`
# Aug 19th, 13:50 davorminchorov @admad clearing schema and orm cache did not help
# Aug 19th, 13:49 admad debugkit has a panel which shows "auto tables" btw
# Aug 19th, 13:49 val thanks, got it
# Aug 19th, 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, 13:49 ricksaccous if you have an entity class defined for that model it should use the entity class you created
# Aug 19th, 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, 13:46 alexdd55976 i am not even far enough to have that
# Aug 19th, 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, 13:44 alexdd55976 `$this->Flash ` is not working either
# Aug 19th, 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, 13:43 davorminchorov done that just now, let me see if that fixes it
# Aug 19th, 13:43 admad or just manually delete files in cache/models