codeforcroatia / codeforcroatia.org

[Deprecated] Extended project of Laddr for Code for Croatia website
https://codeforcroatia.org
1 stars 2 forks source link

Error when updating About me - Unhandled Exception Reported: Unknown column 'Newsletter' in 'field list' #55

Closed schlos closed 3 years ago

schlos commented 3 years ago

Laddr version: 3.0.0 Location: http://cfc-staging-v3.poplar.phl.io/profile

Unhandled Exception: QueryException
Message
Query: UPDATE `people` SET `ID` = "2",`Class` = "Emergence\\People\\User",`Created` = "2014-03-25 18:45:05",`CreatorID` = "2",`Modified` = "2020-11-15 05:58:45",`ModifierID` = "2",`FirstName` = "Miroslav",`LastName` = "Schlossberg",`MiddleName` = NULL,`PreferredName` = NULL,`Gender` = NULL,`BirthDate` = NULL,`Email` = "[REDACTED]",`Phone` = NULL,`Location` = "Zagreb, Hrvatska",`About` = "Zalažem se za građansku uključenost i korištenje otvorenog koda u rješavanju probema.\r\n\r\nSupporter on civic engagement and #opensource coding in solving a problem.\r\n\r\n`#DIY` `#civiccoding` `#opengov` `#opendata` `#sustainability` `document`",`PrimaryPhotoID` = "16",`Username` = "schlos",`Password` = "[REDACTED]",`AccountLevel` = "Developer",`GitHubToken` = NULL,`Newsletter` = 1,`Twitter` = "darvvon" WHERE `ID` = 2
Reported: Unknown column 'Newsletter' in 'field list'
Code
1054
URI
/profile

Request Method
POST

Request Body
Username=schlos&AccountLevel=Developer&Class=Emergence%5CPeople%5CUser&Location=Zagreb%2C+Hrvatska&About=Zala%C5%BEem+se+za+gra%C4%91ansku+uklju%C4%8Denost+i+kori%C5%A1tenje+otvorenog+koda+u+rje%C5%A1avanju+probema.%0D%0A%0D%0ASupporter+on+civic+engagement+and+%23opensource+coding+in+solving+a+problem.%0D%0A%0D%0A%60%23DIY%60+%60%23civiccoding%60+%60%23opengov%60+%60%23opendata%60+%60%23sustainability%60+%60document%60&tags%5Btopic%5D%5B%5D=25&tags%5Btopic%5D%5B%5D=23&tags%5Btopic%5D%5B%5D=8&tags%5Btech%5D%5B%5D=12&tags%5Btech%5D%5B%5D=5&FirstName=Miroslav&LastName=Schlossberg&Email=[REDACTED]&Newsletter=0&Newsletter=1&Phone=&Twitter=darvvon

Referrer
http://cfc-staging-v3.poplar.phl.io/profile

User Agent
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/[REDACTED] Safari/537.36

Remote Address
[REDACTED]

User
array (
  'ID' => 2,
  'Class' => 'Emergence\\People\\User',
  'Created' => 1395787505,
  'CreatorID' => 2,
  'RevisionID' => NULL,
  'Modified' => 1605437925,
  'ModifierID' => 2,
  'FirstName' => 'Miroslav',
  'LastName' => 'Schlossberg',
  'MiddleName' => NULL,
  'PreferredName' => NULL,
  'Gender' => NULL,
  'BirthDate' => NULL,
  'Email' => '[REDACTED]',
  'Phone' => NULL,
  'Location' => 'Zagreb, Hrvatska',
  'About' => 'Zalažem se za građansku uključenost i korištenje otvorenog koda u rješavanju probema.

Supporter on civic engagement and #opensource coding in solving a problem.

`#DIY` `#civiccoding` `#opengov` `#opendata` `#sustainability` `document`',
  'PrimaryPhotoID' => 16,
  'Username' => 'schlos',
  'AccountLevel' => 'Developer',
  'Newsletter' => 1,
  'Twitter' => 'darvvon',
)
Backtrace
Array
(
    [0] => Array
        (
            [function] => handleException
            [class] => Site
            [type] => ::
            [args] => Array
                (
                    [0] => QueryException Object
                        (
                            [message:protected] => Query: UPDATE `people` SET `ID` = "2",`Class` = "Emergence\\People\\User",`Created` = "2014-03-25 18:45:05",`CreatorID` = "2",`Modified` = "2020-11-15 05:58:45",`ModifierID` = "2",`FirstName` = "Miroslav",`LastName` = "Schlossberg",`MiddleName` = NULL,`PreferredName` = NULL,`Gender` = NULL,`BirthDate` = NULL,`Email` = "[REDACTED]",`Phone` = NULL,`Location` = "Zagreb, Hrvatska",`About` = "Zalažem se za građansku uključenost i korištenje otvorenog koda u rješavanju probema.\r\n\r\nSupporter on civic engagement and #opensource coding in solving a problem.\r\n\r\n`#DIY` `#civiccoding` `#opengov` `#opendata` `#sustainability` `document`",`PrimaryPhotoID` = "16",`Username` = "schlos",`Password` = "[REDACTED]",`AccountLevel` = "Developer",`GitHubToken` = NULL,`Newsletter` = 1,`Twitter` = "darvvon" WHERE `ID` = 2
Reported: Unknown column 'Newsletter' in 'field list'
                            [string:Exception:private] => 
                            [code:protected] => 1054
                            [file:protected] => /usr/lib/node_modules/emergence/php-bootstrap/lib/DB.class.php
                            [line:protected] => 462
                            [trace:Exception:private] => Array
                                (
                                    [0] => Array
                                        (
                                            [file] => /usr/lib/node_modules/emergence/php-bootstrap/lib/DB.class.php
                                            [line] => 64
                                            [function] => handleError
                                            [class] => DB
                                            [type] => ::
                                            [args] => Array
                                                (
                                                    [0] => UPDATE `people` SET `ID` = "2",`Class` = "Emergence\\People\\User",`Created` = "2014-03-25 18:45:05",`CreatorID` = "2",`Modified` = "2020-11-15 05:58:45",`ModifierID` = "2",`FirstName` = "Miroslav",`LastName` = "Schlossberg",`MiddleName` = NULL,`PreferredName` = NULL,`Gender` = NULL,`BirthDate` = NULL,`Email` = "[REDACTED]",`Phone` = NULL,`Location` = "Zagreb, Hrvatska",`About` = "Zalažem se za građansku uključenost i korištenje otvorenog koda u rješavanju probema.\r\n\r\nSupporter on civic engagement and #opensource coding in solving a problem.\r\n\r\n`#DIY` `#civiccoding` `#opengov` `#opendata` `#sustainability` `document`",`PrimaryPhotoID` = "16",`Username` = "schlos",`Password` = "[REDACTED]",`AccountLevel` = "Developer",`GitHubToken` = NULL,`Newsletter` = 1,`Twitter` = "darvvon" WHERE `ID` = 2
                                                    [1] => Array
                                                        (
                                                            [query] => UPDATE `people` SET `ID` = "2",`Class` = "Emergence\\People\\User",`Created` = "2014-03-25 18:45:05",`CreatorID` = "2",`Modified` = "2020-11-15 05:58:45",`ModifierID` = "2",`FirstName` = "Miroslav",`LastName` = "Schlossberg",`MiddleName` = NULL,`PreferredName` = NULL,`Gender` = NULL,`BirthDate` = NULL,`Email` = "[REDACTED]",`Phone` = NULL,`Location` = "Zagreb, Hrvatska",`About` = "Zalažem se za građansku uključenost i korištenje otvorenog koda u rješavanju probema.\r\n\r\nSupporter on civic engagement and #opensource coding in solving a problem.\r\n\r\n`#DIY` `#civiccoding` `#opengov` `#opendata` `#sustainability` `document`",`PrimaryPhotoID` = "16",`Username` = "schlos",`Password` = "[REDACTED]",`AccountLevel` = "Developer",`GitHubToken` = NULL,`Newsletter` = 1,`Twitter` = "darvvon" WHERE `ID` = 2
                                                            [time_start] => 1605437926,003231
                                                        )

                                                )

                                        )

                                    [1] => Array
                                        (
                                            [file] => /emergence/sites/cfc-staging-v3/data/2711
                                            [line] => 957
                                            [function] => nonQuery
                                            [class] => DB
                                            [type] => ::
                                            [args] => Array
                                                (
                                                    [0] => UPDATE `%s` SET %s WHERE `%s` = %u
                                                    [1] => Array
                                                        (
                                                            [0] => people
                                                            [1] => `ID` = "2",`Class` = "Emergence\\People\\User",`Created` = "2014-03-25 18:45:05",`CreatorID` = "2",`Modified` = "2020-11-15 05:58:45",`ModifierID` = "2",`FirstName` = "Miroslav",`LastName` = "Schlossberg",`MiddleName` = NULL,`PreferredName` = NULL,`Gender` = NULL,`BirthDate` = NULL,`Email` = "[REDACTED]",`Phone` = NULL,`Location` = "Zagreb, Hrvatska",`About` = "Zalažem se za građansku uključenost i korištenje otvorenog koda u rješavanju probema.\r\n\r\nSupporter on civic engagement and #opensource coding in solving a problem.\r\n\r\n`#DIY` `#civiccoding` `#opengov` `#opendata` `#sustainability` `document`",`PrimaryPhotoID` = "16",`Username` = "schlos",`Password` = "[REDACTED]",`AccountLevel` = "Developer",`GitHubToken` = NULL,`Newsletter` = 1,`Twitter` = "darvvon"
                                                            [2] => ID
                                                            [3] => 2
                                                        )

                                                )

                                        )

                                    [2] => Array
                                        (
                                            [file] => /emergence/sites/cfc-staging-v3/data/2660
                                            [line] => 141
                                            [function] => save
                                            [class] => ActiveRecord
                                            [type] => ->
                                            [args] => Array
                                                (
                                                    [0] => 1
                                                )

                                        )

                                    [3] => Array
                                        (
                                            [file] => /emergence/sites/cfc-staging-v3/data/2415
                                            [line] => 120
                                            [function] => save
                                            [class] => VersionedRecord
                                            [type] => ->
                                            [args] => Array
                                                (
                                                    [0] => 1
                                                )

                                        )

                                    [4] => Array
                                        (
                                            [file] => /emergence/sites/cfc-staging-v3/data/2646
                                            [line] => 78
                                            [function] => save
                                            [class] => Emergence\People\User
                                            [type] => ->
                                            [args] => Array
                                                (
                                                )

                                        )

                                    [5] => Array
                                        (
                                            [file] => /emergence/sites/cfc-staging-v3/data/2646
                                            [line] => 34
                                            [function] => handleEditRequest
                                            [class] => ProfileRequestHandler
                                            [type] => ::
                                            [args] => Array
                                                (
                                                )

                                        )

                                    [6] => Array
                                        (
                                            [file] => /emergence/sites/cfc-staging-v3/data/2992
                                            [line] => 3
                                            [function] => handleRequest
                                            [class] => ProfileRequestHandler
                                            [type] => ::
                                            [args] => Array
                                                (
                                                )

                                        )

                                    [7] => Array
                                        (
                                            [file] => /usr/lib/node_modules/emergence/php-bootstrap/lib/Site.class.php
                                            [line] => 356
                                            [args] => Array
                                                (
                                                    [0] => /emergence/sites/cfc-staging-v3/data/2992
                                                )

                                            [function] => require
                                        )

                                    [8] => Array
                                        (
                                            [file] => /usr/lib/node_modules/emergence/php-bootstrap/lib/Site.class.php
                                            [line] => 235
                                            [function] => executeScript
                                            [class] => Site
                                            [type] => ::
                                            [args] => Array
                                                (
                                                    [0] => SiteFile Object
                                                        (
                                                            [_handle:SiteFile:private] => profile.php
                                                            [_record:SiteFile:private] => Array
                                                                (
                                                                    [ID] => 2992
                                                                    [CollectionID] => 137
                                                                    [Handle] => profile.php
                                                                    [Status] => Normal
                                                                    [SHA1] => 2b62348c4754327ee5aaae976b02638fa818deba
                                                                    [Size] => 53
                                                                    [Type] => application/php
                                                                    [Timestamp] => 2020-11-14 13:39:04
                                                                    [AuthorID] => 
                                                                    [AncestorID] => 
                                                                )

                                                            [_author:protected] => 
                                                            [_collection] => SiteCollection Object
                                                                (
                                                                    [_handle:protected] => site-root
                                                                    [_record:protected] => Array
                                                                        (
                                                                            [ID] => 137
                                                                            [Site] => Local
                                                                            [Handle] => site-root
                                                                            [Status] => Normal
                                                                            [Created] => 2019-08-20 18:21:34
                                                                            [CreatorID] => 0
                                                                            [ParentID] => 
                                                                            [PosLeft] => 1
                                                                            [PosRight] => 92
                                                                        )

                                                                    [_fullPath:protected] => Array
                                                                        (
                                                                            [0] => site-root
                                                                        )

                                                                    [_parent] => 
                                                                )

                                                        )

                                                )

                                        )

                                    [9] => Array
                                        (
                                            [file] => /usr/lib/node_modules/emergence/php-bootstrap/web.php
                                            [line] => 9
                                            [function] => handleRequest
                                            [class] => Site
                                            [type] => ::
                                            [args] => Array
                                                (
                                                )

                                        )

                                )

                            [previous:Exception:private] => 
                        )

                )

        )

)
schlos commented 3 years ago

Check: https://github.com/CodeForPhilly/laddr/commit/9cd30cd1d2565aad5e28a2c4db94fe6237e77c40

schlos commented 3 years ago

Not reproducible anymore: https://codeforcroatia.org/profile?status=saved