Log message #4198699

# At Username Text
# Aug 19th 2019, 13:40 ricksaccous @alexdd55976 i assume you're using authComponent? make sure your settings are set up correctly, and make sure your session settings are set up correctly, I think you'll have to look at your app.php as well as your php configuration ini
# Aug 19th 2019, 13:40 admad @davorminchorov are you sure the db column types are varchar/text ?
# Aug 19th 2019, 13:39 dereuromark @davorminchorov What is the SQL query doing this? Can you post that?
# Aug 19th 2019, 13:39 alexdd55976 guys, what is going wrong if a session is not hold? i log in a user succesfully, but all data is gone after the login. ` $this->Auth->setUser($user);` this should do it, right?
# Aug 19th 2019, 13:38 davorminchorov Nope, nowhere to be found
# Aug 19th 2019, 13:36 admad check if you model class has _initializeSchema() method
# Aug 19th 2019, 13:35 davorminchorov It's being cast to int but not sure how and why: ``` #2 /var/www/html/vendor/cakephp/cakephp/src/Database/Statement/PDOStatement.php(69): Cake\Database\Statement\StatementDecorator->cast('Some Info about...', Object(Cake\Database\Type\IntegerType)) ```
# Aug 19th 2019, 13:34 admad go further
# Aug 19th 2019, 13:34 davorminchorov This looks like the issue ``` #3 /var/www/html/vendor/cakephp/cakephp/src/Database/ValueBinder.php(147): Cake\Database\Statement\PDOStatement->bindValue('c7', 'Some Info about...', 'integer') ```
# Aug 19th 2019, 13:32 admad follow the stack trace
# Aug 19th 2019, 13:32 davorminchorov I have no idea, new to the framework. Where can I check that?
# Aug 19th 2019, 13:31 admad why would those fields use `IntegerType`?
# Aug 19th 2019, 13:31 dereuromark if you change the field(type), make sure to clear cache
# Aug 19th 2019, 13:31 davorminchorov it's thrown for fields like description, email address etc
# Aug 19th 2019, 13:31 dereuromark sounds like a cache issue then
# Aug 19th 2019, 13:30 davorminchorov I meant to say string fields
# Aug 19th 2019, 13:30 admad instead the fix obvious? don't set non numeric string values for integer fields :slightly_smiling_face:
# Aug 19th 2019, 13:28 davorminchorov This is the error I am getting due to that change in some forms: ``` 2019-08-16 14:02:49 Error: [InvalidArgumentException] Cannot convert value of type `string` to integer in /var/www/html/vendor/cakephp/cakephp/src/Database/Type/IntegerType.php on line 64 ```
# Aug 19th 2019, 13:26 davorminchorov Hi. The following behavior change started causing issues for string values during an upgrade: ``` Cake\Database\Type\IntegerType will now raise an exception when values are not numeric when preparing SQL statements and converting database results to PHP types. ``` Any ideas how can I fix this issue?
# Aug 19th 2019, 13:20 alexdd55976 as there is a mandatory use of the authorization middleware from 4.x ... is it me or is the documentation not well written... or say.. i could not find a simple use case like `if user is logged in let him use this action`
# Aug 19th 2019, 12:54 Nitrogen alright, that was it. default redirect logic was messing things up. I guess is('json') check should suffice to have produce json the way I need it.
# Aug 19th 2019, 12:48 Nitrogen okay, the 'index.ctp' is likely coming from default redirect code in edit actions. still doesn't explain why it wants a separate template from me.
# Aug 19th 2019, 12:45 ricksaccous show the controller action code as well as a debug of the view class from the controller action
# Aug 19th 2019, 12:45 Nitrogen as if it took note of the 'Referer', because I submit my request from index page.
# Aug 19th 2019, 12:44 Nitrogen actually, not sure why it is expecting index.ctp, while I submit to edit action. this looks off.
# Aug 19th 2019, 12:43 Nitrogen Proxies is the name of controller here.
# Aug 19th 2019, 12:42 Nitrogen edit actually goes through, since after updating the page I see my entity modified. but I get a 500 response about missing template: message Template file "Proxies/json/index.ctp" is missing.
# Aug 19th 2019, 12:41 Nitrogen it submits to unmodified freshly-baked edit action.
# Aug 19th 2019, 12:41 Nitrogen this is an action fired on link being clicked.
# Aug 19th 2019, 12:41 Nitrogen well, it's real simple tbf https://pastebin.com/HYnLcxrW
# Aug 19th 2019, 12:35 ricksaccous at this point just show code, lol, because we can only stab in the dark without seeing the LOC
# Aug 19th 2019, 12:34 Nitrogen and I'm setting the header specifically, yes. And it is reflected in my browser's network monitor.
# Aug 19th 2019, 12:33 Nitrogen I'm making the conclusion that it does, given it complains about lack of json-template for my action.
# Aug 19th 2019, 12:33 ricksaccous yeah you can either ask explicitly for json or set that header in the request
# Aug 19th 2019, 12:32 admad extension are optional but then the client needs to set proper `Accept` so that requesthandler knows it has to switch response type
# Aug 19th 2019, 12:32 royalty show me the link you're generating in html
# Aug 19th 2019, 12:31 royalty why would you disable them?
# Aug 19th 2019, 12:31 Nitrogen hm, looks like extension routes are optional. and disabling them didn't change the outcome. to answer the rest of your questions. I'm not setting view classes explicitly. And RequestHandler is loaded.
# Aug 19th 2019, 12:18 Nitrogen esp. since I wasn't asking for .json
# Aug 19th 2019, 12:17 Nitrogen ah, got abandoned route extension for json. this might be it.
# Aug 19th 2019, 12:17 ricksaccous are you asking for .json