{"action":"created","issue":{"url":"https://api.github.com/repos/madeyourday/contao-rocksolid-custom-elements/issues/57","labels_url":"https://api.github.com/repos/madeyourday/contao-rocksolid-custom-elements/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/madeyourday/contao-rocksolid-custom-elements/issues/57/comments","events_url":"https://api.github.com/repos/madeyourday/contao-rocksolid-custom-elements/issues/57/events","html_url":"https://github.com/madeyourday/contao-rocksolid-custom-elements/issues/57","id":114224718,"number":57,"title":"Contao tries database update for custom element field","user":{"login":"fritzmg","id":4970961,"avatar_url":"https://avatars.githubusercontent.com/u/4970961?v=3","gravatar_id":"","url":"https://api.github.com/users/fritzmg","html_url":"https://github.com/fritzmg","followers_url":"https://api.github.com/users/fritzmg/followers","following_url":"https://api.github.com/users/fritzmg/following{/other_user}","gists_url":"https://api.github.com/users/fritzmg/gists{/gist_id}","starred_url":"https://api.github.com/users/fritzmg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fritzmg/subscriptions","organizations_url":"https://api.github.com/users/fritzmg/orgs","repos_url":"https://api.github.com/users/fritzmg/repos","events_url":"https://api.github.com/users/fritzmg/events{/privacy}","received_events_url":"https://api.github.com/users/fritzmg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-10-30T08:36:51Z","updated_at":"2015-11-01T16:05:30Z","closed_at":null,"body":"Since 1.3.5 (I think) I have a weird problem with a specific custom element that I use in an installation.\r\n\r\nWhenever I want to insert a new Content Element into a fresh page, i.e. into an empty article, I get the following error:\r\n```\r\nFatal error: Uncaught exception Exception with message Query error: Unknown column 'rsce_field_floating' in 'field list' (INSERT INTO tl_content (type, floating, sortOrder, perRow, sliderSpeed, sliderStartSlide, com_order, com_template, sh5_type, rsce_field_floating, pid, sorting, ptable, tstamp) VALUES ('text', 'above', 'ascending', 4, 300, 0, 'ascending', 'com_default', 'div', 'none', 75, 128, 'tl_article', 0)) thrown in system/modules/core/library/Contao/Database/Statement.php on line 295\r\n\r\n#0 system/modules/core/library/Contao/Database/Statement.php(264): Contao\\Database\\Statement->query()\r\n#1 system/modules/core/drivers/DC_Table.php(685): Contao\\Database\\Statement->execute()\r\n#2 system/modules/core/classes/Backend.php(650): Contao\\DC_Table->create()\r\n#3 system/modules/core/controllers/BackendMain.php(131): Contao\\Backend->getBackendModule('article')\r\n#4 contao/main.php(20): Contao\\BackendMain->run()\r\n#5 {main}\r\n```\r\nFor some reason Contao tries to insert data into the database for the custom element field \"floating\" (`rsce_field_floating`), which I have defined in one of the custom elements.\r\n\r\nThe minimum config of the custom element, that causes this error looks like this:\r\n```php\r\n<?php\r\n\r\nreturn array(\r\n    'fields' => array(\r\n        'floating' => array(\r\n            'label' => array(\r\n                'de' => array('Textumfluss','Textumfluss Einstellungen des Elements.'),\r\n                'en' => array('Floating','Floating setting of the element.')\r\n            ),\r\n            'inputType' => 'radio',\r\n            'default'   => 'none',\r\n            'options'   => array('none','left','right'),\r\n            'reference' => &$GLOBALS['TL_LANG']['rsce_factbox_config']['floating']\r\n        )\r\n    )\r\n);\r\n```\r\nThe problem does not occur, if I try to insert a content element into an article, that already has other content elements, it only occurs within empty articles. This is within a Contao 3.5.4 installation, with Rocksolid Custom Elements 1.3.5. The internal cache is disabled and I also tried to delete the RSCE cache.\r\n\r\nThe problem might not even be specific to this custom element, may be it just happens to be the first one in the list of custom content elements (alphabetically).\r\n\r\nUnfortunately, I was not able to reproduce this problem in a separate fresh installation, even when I install all other extensions, that are present in the installation with the error.\r\n\r\nBut I was hoping that you might have a clue, why Contao would try to insert data into the database for a custom element field.\r\n\r\n// edit: I just found out that it also happens in Articles that already have content elements - but only if you try to insert the new content element on the first position."},"comment":{"url":"https://api.github.com/repos/madeyourday/contao-rocksolid-custom-elements/issues/comments/152840597","html_url":"https://github.com/madeyourday/contao-rocksolid-custom-elements/issues/57#issuecomment-152840597","issue_url":"https://api.github.com/repos/madeyourday/contao-rocksolid-custom-elements/issues/57","id":152840597,"user":{"login":"fritzmg","id":4970961,"avatar_url":"https://avatars.githubusercontent.com/u/4970961?v=3","gravatar_id":"","url":"https://api.github.com/users/fritzmg","html_url":"https://github.com/fritzmg","followers_url":"https://api.github.com/users/fritzmg/followers","following_url":"https://api.github.com/users/fritzmg/following{/other_user}","gists_url":"https://api.github.com/users/fritzmg/gists{/gist_id}","starred_url":"https://api.github.com/users/fritzmg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fritzmg/subscriptions","organizations_url":"https://api.github.com/users/fritzmg/orgs","repos_url":"https://api.github.com/users/fritzmg/repos","events_url":"https://api.github.com/users/fritzmg/events{/privacy}","received_events_url":"https://api.github.com/users/fritzmg/received_events","type":"User","site_admin":false},"created_at":"2015-11-01T16:05:30Z","updated_at":"2015-11-01T16:05:30Z","body":"Weird. I copied the custom content element (via the backend, not via MySQL) and deleted the original. Now the error does not occur anymore.\r\n\r\nI made an exact comparison of the old and the new SQL data, but the only difference are in the `id`, `sorting` and `tstamp` fields. Everything else is exactly the same."}}