timetracker icon indicating copy to clipboard operation
timetracker copied to clipboard

Create project generates error

Open okko7 opened this issue 3 years ago • 5 comments

When I try to create a project, I get a simple "error" message. See attached screenshot.

Running nextcloud 21.0.5 with time tracker 0.0.72.

okko7 avatar Nov 11 '21 19:11 okko7

Here's the screenshot. As I'm using a hosted instance, I don't have access to the server itself to give you details the server configurations etc.

image

okko7 avatar Nov 11 '21 20:11 okko7

Hello

What database backend are you using?

mtierltd avatar Jan 12 '22 12:01 mtierltd

I have to admit that I don't know. I just rent that from a specialised nextcloud hosting provider. Should I ask him what database backend he uses?

okko7 avatar Jan 12 '22 12:01 okko7

Please provide the nextcloud logfile from the time this error happened.

mtierltd avatar Jan 17 '22 13:01 mtierltd

I believe I can reproduce the same issue with the mysql dbtype.

Relevant parts of the stack trace:

{
	"level": 3,
	"user": "sewie",
	"app": "index",
	"method": "POST",
	"url": "/apps/timetracker/ajax/add-project/test-sw",
	"message": "An exception occurred while executing a query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'color' in 'field list'",
	"version": "23.0.0.10",
	"exception": {
		"Exception": "Doctrine\\DBAL\\Exception\\InvalidFieldNameException",
		"Message": "An exception occurred while executing a query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'color' in 'field list'",
		"Code": 1054,
		"Trace": [
			{
				"file": "/var/www/html/3rdparty/doctrine/dbal/src/Connection.php",
				"line": 1780,
				"function": "convert",
				"class": "Doctrine\\DBAL\\Driver\\API\\MySQL\\ExceptionConverter",
				"type": "->",
				"args": [
					{
						"__class__": "Doctrine\\DBAL\\Driver\\PDO\\Exception"
					},
					{
						"__class__": "Doctrine\\DBAL\\Query"
					}
				]
			},
			{
				"file": "/var/www/html/3rdparty/doctrine/dbal/src/Connection.php",
				"line": 1719,
				"function": "handleDriverException",
				"class": "Doctrine\\DBAL\\Connection",
				"type": "->",
				"args": [
					{
						"__class__": "Doctrine\\DBAL\\Driver\\PDO\\Exception"
					},
					{
						"__class__": "Doctrine\\DBAL\\Query"
					}
				]
			},
			{
				"file": "/var/www/html/3rdparty/doctrine/dbal/src/Statement.php",
				"line": 193,
				"function": "convertExceptionDuringQuery",
				"class": "Doctrine\\DBAL\\Connection",
				"type": "->",
				"args": [
					{
						"__class__": "Doctrine\\DBAL\\Driver\\PDO\\Exception"
					},
					"INSERT INTO `oc_timetracker_project`(`name`,`color`,`created_at`,`created_by_user_uid`,`client_id`) VALUES(?,?,?,?,?)",
					{
						"1": "test-sw",
						"2": "#34495e",
						"3": 1643834410,
						"4": "sewie",
						"5": 26
					},
					{
						"1": 2,
						"2": 2,
						"3": 1,
						"4": 2,
						"5": 1
					}
				]
			},
			{
				"file": "/var/www/html/lib/private/DB/PreparedStatement.php",
				"line": 87,
				"function": "execute",
				"class": "Doctrine\\DBAL\\Statement",
				"type": "->",
				"args": [
					null
				]
			},
			{
				"file": "/var/www/html/lib/public/AppFramework/Db/Mapper.php",
				"line": 252,
				"function": "execute",
				"class": "OC\\DB\\PreparedStatement",
				"type": "->",
				"args": [

				]
			},
			{
				"file": "/var/www/html/lib/public/AppFramework/Db/Mapper.php",
				"line": 127,
				"function": "execute",
				"class": "OCP\\AppFramework\\Db\\Mapper",
				"type": "->",
				"args": [
					"INSERT INTO `*PREFIX*timetracker_project`(`name`,`color`,`created_at`,`created_by_user_uid`,`client_id`) VALUES(?,?,?,?,?)",
					[
						"test-sw",
						"#34495e",
						1643834410,
						"sewie",
						26
					]
				]
			},
			{
				"file": "/var/www/html/custom_apps/timetracker/lib/Controller/AjaxController.php",
				"line": 569,
				"function": "insert",
				"class": "OCP\\AppFramework\\Db\\Mapper",
				"type": "->",
				"args": [
					{
						"__class__": "OCA\\TimeTracker\\Db\\Project",
						"id": null,
						"name": "test-sw",
						"color": "#34495e",
						"clientId": 26,
						"createdByUserUid": "sewie",
						"createdAt": 1643834410,
						"locked": null,
						"archived": null
					}
				]
			},
			{
				"file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
				"line": 217,
				"function": "addProject",
				"class": "OCA\\TimeTracker\\Controller\\AjaxController",
				"type": "->",
				"args": [
					"test-sw"
				]
			},
			{
				"file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
				"line": 126,
				"function": "executeController",
				"class": "OC\\AppFramework\\Http\\Dispatcher",
				"type": "->",
				"args": [
					{
						"__class__": "OCA\\TimeTracker\\Controller\\AjaxController"
					},
					"addProject"
				]
			},
			{
				"file": "/var/www/html/lib/private/AppFramework/App.php",
				"line": 157,
				"function": "dispatch",
				"class": "OC\\AppFramework\\Http\\Dispatcher",
				"type": "->",
				"args": [
					{
						"__class__": "OCA\\TimeTracker\\Controller\\AjaxController"
					},
					"addProject"
				]
			},
			{
				"file": "/var/www/html/lib/private/Route/Router.php",
				"line": 302,
				"function": "main",
				"class": "OC\\AppFramework\\App",
				"type": "::",
				"args": [
					"OCA\\TimeTracker\\Controller\\AjaxController",
					"addProject",
					{
						"__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
					},
					{
						"name": "test-sw",
						"_route": "timetracker.ajax.add_project"
					}
				]
			},
			{
				"file": "/var/www/html/lib/base.php",
				"line": 1006,
				"function": "match",
				"class": "OC\\Route\\Router",
				"type": "->",
				"args": [
					"/apps/timetracker/ajax/add-project/test-sw"
				]
			},
			{
				"file": "/var/www/html/index.php",
				"line": 36,
				"function": "handleRequest",
				"class": "OC",
				"type": "::",
				"args": [

				]
			}
		],
		"File": "/var/www/html/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php",
		"Line": 65,
		"Previous": {
			"Exception": "Doctrine\\DBAL\\Driver\\PDO\\Exception",
			"Message": "SQLSTATE[42S22]: Column not found: 1054 Unknown column 'color' in 'field list'",
			"Code": 1054,
			"Trace": [
				{
					"file": "/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
					"line": 94,
					"function": "new",
					"class": "Doctrine\\DBAL\\Driver\\PDO\\Exception",
					"type": "::",
					"args": [
						{
							"__class__": "PDOException",
							"errorInfo": [
								"42S22",
								1054,
								"Unknown column 'color' in 'field list'"
							]
						}
					]
				},
				{
					"file": "/var/www/html/3rdparty/doctrine/dbal/src/Statement.php",
					"line": 189,
					"function": "execute",
					"class": "Doctrine\\DBAL\\Driver\\PDO\\Statement",
					"type": "->",
					"args": [
						null
					]
				},
				{
					"file": "/var/www/html/lib/private/DB/PreparedStatement.php",
					"line": 87,
					"function": "execute",
					"class": "Doctrine\\DBAL\\Statement",
					"type": "->",
					"args": [
						null
					]
				},
				{
					"file": "/var/www/html/lib/public/AppFramework/Db/Mapper.php",
					"line": 252,
					"function": "execute",
					"class": "OC\\DB\\PreparedStatement",
					"type": "->",
					"args": [

					]
				},
				{
					"file": "/var/www/html/lib/public/AppFramework/Db/Mapper.php",
					"line": 127,
					"function": "execute",
					"class": "OCP\\AppFramework\\Db\\Mapper",
					"type": "->",
					"args": [
						"INSERT INTO `*PREFIX*timetracker_project`(`name`,`color`,`created_at`,`created_by_user_uid`,`client_id`) VALUES(?,?,?,?,?)",
						[
							"test-sw",
							"#34495e",
							1643834410,
							"sewie",
							26
						]
					]
				},
				{
					"file": "/var/www/html/custom_apps/timetracker/lib/Controller/AjaxController.php",
					"line": 569,
					"function": "insert",
					"class": "OCP\\AppFramework\\Db\\Mapper",
					"type": "->",
					"args": [
						{
							"__class__": "OCA\\TimeTracker\\Db\\Project",
							"id": null,
							"name": "test-sw",
							"color": "#34495e",
							"clientId": 26,
							"createdByUserUid": "sewie",
							"createdAt": 1643834410,
							"locked": null,
							"archived": null
						}
					]
				},
				{
					"file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
					"line": 217,
					"function": "addProject",
					"class": "OCA\\TimeTracker\\Controller\\AjaxController",
					"type": "->",
					"args": [
						"test-sw"
					]
				},
				{
					"file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
					"line": 126,
					"function": "executeController",
					"class": "OC\\AppFramework\\Http\\Dispatcher",
					"type": "->",
					"args": [
						{
							"__class__": "OCA\\TimeTracker\\Controller\\AjaxController"
						},
						"addProject"
					]
				},
				{
					"file": "/var/www/html/lib/private/AppFramework/App.php",
					"line": 157,
					"function": "dispatch",
					"class": "OC\\AppFramework\\Http\\Dispatcher",
					"type": "->",
					"args": [
						{
							"__class__": "OCA\\TimeTracker\\Controller\\AjaxController"
						},
						"addProject"
					]
				},
				{
					"file": "/var/www/html/lib/private/Route/Router.php",
					"line": 302,
					"function": "main",
					"class": "OC\\AppFramework\\App",
					"type": "::",
					"args": [
						"OCA\\TimeTracker\\Controller\\AjaxController",
						"addProject",
						{
							"__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
						},
						{
							"name": "test-sw",
							"_route": "timetracker.ajax.add_project"
						}
					]
				},
				{
					"file": "/var/www/html/lib/base.php",
					"line": 1006,
					"function": "match",
					"class": "OC\\Route\\Router",
					"type": "->",
					"args": [
						"/apps/timetracker/ajax/add-project/test-sw"
					]
				},
				{
					"file": "/var/www/html/index.php",
					"line": 36,
					"function": "handleRequest",
					"class": "OC",
					"type": "::",
					"args": [

					]
				}
			],
			"File": "/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php",
			"Line": 26,
			"Previous": {
				"Exception": "PDOException",
				"Message": "SQLSTATE[42S22]: Column not found: 1054 Unknown column 'color' in 'field list'",
				"Code": "42S22",
				"Trace": [
					{
						"file": "/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
						"line": 92,
						"function": "execute",
						"class": "PDOStatement",
						"type": "->",
						"args": [
							null
						]
					},
					{
						"file": "/var/www/html/3rdparty/doctrine/dbal/src/Statement.php",
						"line": 189,
						"function": "execute",
						"class": "Doctrine\\DBAL\\Driver\\PDO\\Statement",
						"type": "->",
						"args": [
							null
						]
					},
					{
						"file": "/var/www/html/lib/private/DB/PreparedStatement.php",
						"line": 87,
						"function": "execute",
						"class": "Doctrine\\DBAL\\Statement",
						"type": "->",
						"args": [
							null
						]
					},
					{
						"file": "/var/www/html/lib/public/AppFramework/Db/Mapper.php",
						"line": 252,
						"function": "execute",
						"class": "OC\\DB\\PreparedStatement",
						"type": "->",
						"args": [

						]
					},
					{
						"file": "/var/www/html/lib/public/AppFramework/Db/Mapper.php",
						"line": 127,
						"function": "execute",
						"class": "OCP\\AppFramework\\Db\\Mapper",
						"type": "->",
						"args": [
							"INSERT INTO `*PREFIX*timetracker_project`(`name`,`color`,`created_at`,`created_by_user_uid`,`client_id`) VALUES(?,?,?,?,?)",
							[
								"test-sw",
								"#34495e",
								1643834410,
								"sewie",
								26
							]
						]
					},
					{
						"file": "/var/www/html/custom_apps/timetracker/lib/Controller/AjaxController.php",
						"line": 569,
						"function": "insert",
						"class": "OCP\\AppFramework\\Db\\Mapper",
						"type": "->",
						"args": [
							{
								"__class__": "OCA\\TimeTracker\\Db\\Project",
								"id": null,
								"name": "test-sw",
								"color": "#34495e",
								"clientId": 26,
								"createdByUserUid": "sewie",
								"createdAt": 1643834410,
								"locked": null,
								"archived": null
							}
						]
					},
					{
						"file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
						"line": 217,
						"function": "addProject",
						"class": "OCA\\TimeTracker\\Controller\\AjaxController",
						"type": "->",
						"args": [
							"test-sw"
						]
					},
					{
						"file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
						"line": 126,
						"function": "executeController",
						"class": "OC\\AppFramework\\Http\\Dispatcher",
						"type": "->",
						"args": [
							{
								"__class__": "OCA\\TimeTracker\\Controller\\AjaxController"
							},
							"addProject"
						]
					},
					{
						"file": "/var/www/html/lib/private/AppFramework/App.php",
						"line": 157,
						"function": "dispatch",
						"class": "OC\\AppFramework\\Http\\Dispatcher",
						"type": "->",
						"args": [
							{
								"__class__": "OCA\\TimeTracker\\Controller\\AjaxController"
							},
							"addProject"
						]
					},
					{
						"file": "/var/www/html/lib/private/Route/Router.php",
						"line": 302,
						"function": "main",
						"class": "OC\\AppFramework\\App",
						"type": "::",
						"args": [
							"OCA\\TimeTracker\\Controller\\AjaxController",
							"addProject",
							{
								"__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
							},
							{
								"name": "test-sw",
								"_route": "timetracker.ajax.add_project"
							}
						]
					},
					{
						"file": "/var/www/html/lib/base.php",
						"line": 1006,
						"function": "match",
						"class": "OC\\Route\\Router",
						"type": "->",
						"args": [
							"/apps/timetracker/ajax/add-project/test-sw"
						]
					},
					{
						"file": "/var/www/html/index.php",
						"line": 36,
						"function": "handleRequest",
						"class": "OC",
						"type": "::",
						"args": [

						]
					}
				],
				"File": "/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
				"Line": 92
			}
		},
		"CustomMessage": "--"
	},
}

wiedi avatar Feb 02 '22 20:02 wiedi