{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/8268","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/8268/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/8268/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/8268/events","html_url":"https://github.com/joomla/joomla-cms/pull/8268","id":115015362,"number":8268,"title":"Fix: utf8mb4 database errors","user":{"login":"zero-24","id":2596554,"avatar_url":"https://avatars.githubusercontent.com/u/2596554?v=3","gravatar_id":"","url":"https://api.github.com/users/zero-24","html_url":"https://github.com/zero-24","followers_url":"https://api.github.com/users/zero-24/followers","following_url":"https://api.github.com/users/zero-24/following{/other_user}","gists_url":"https://api.github.com/users/zero-24/gists{/gist_id}","starred_url":"https://api.github.com/users/zero-24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zero-24/subscriptions","organizations_url":"https://api.github.com/users/zero-24/orgs","repos_url":"https://api.github.com/users/zero-24/repos","events_url":"https://api.github.com/users/zero-24/events{/privacy}","received_events_url":"https://api.github.com/users/zero-24/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/joomla/joomla-cms/labels/PR-staging","name":"PR-staging","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/joomla/joomla-cms/milestones/7","html_url":"https://github.com/joomla/joomla-cms/milestones/Joomla!%203.5.0","labels_url":"https://api.github.com/repos/joomla/joomla-cms/milestones/7/labels","id":944889,"number":7,"title":"Joomla! 3.5.0","description":"","creator":{"login":"rdeutz","id":467356,"avatar_url":"https://avatars.githubusercontent.com/u/467356?v=3","gravatar_id":"","url":"https://api.github.com/users/rdeutz","html_url":"https://github.com/rdeutz","followers_url":"https://api.github.com/users/rdeutz/followers","following_url":"https://api.github.com/users/rdeutz/following{/other_user}","gists_url":"https://api.github.com/users/rdeutz/gists{/gist_id}","starred_url":"https://api.github.com/users/rdeutz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rdeutz/subscriptions","organizations_url":"https://api.github.com/users/rdeutz/orgs","repos_url":"https://api.github.com/users/rdeutz/repos","events_url":"https://api.github.com/users/rdeutz/events{/privacy}","received_events_url":"https://api.github.com/users/rdeutz/received_events","type":"User","site_admin":false},"open_issues":33,"closed_issues":286,"state":"open","created_at":"2015-01-21T08:12:44Z","updated_at":"2015-11-04T09:56:22Z","due_on":"2015-11-03T23:00:00Z","closed_at":null},"comments":3,"created_at":"2015-11-04T09:55:34Z","updated_at":"2015-11-04T10:22:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/8268","html_url":"https://github.com/joomla/joomla-cms/pull/8268","diff_url":"https://github.com/joomla/joomla-cms/pull/8268.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/8268.patch"},"body":"This Fixes the issues introduced here: https://github.com/joomla/joomla-cms/pull/7173 and reported here: https://github.com/joomla/joomla-cms/issues/8267\r\n\r\nMaybe @nikosdion can have a look here.\r\nmaybe he has a idea to fix for hosts that don't support utf8mb4:\r\n\r\n```\r\nAn error has occurred.\r\n\r\n    1115 Unknown character set: 'utf8mb4' SQL=ALTER TABLE `osvlt_banners` MODIFY `alias` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT ''; \r\n```\r\n\r\nAs the file is preset in the update SQL Directory it will be picked up by the default updater anyway. Maybe just move the file (https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_admin/sql/updates/mysql/3.5.0-2015-07-01.sql) to another directory?\r\n\r\n@zjw \r\n\r\nHere I'm fixing your point 1 and 2 the third point (`Unknown character set: 'utf8mb4'`) is not fixed yet.\r\n\r\n#### Original Issue\r\n\r\n-----\r\n\r\nTested with Joomla 3.5.0-dev, current master (as of 7abe00f).\r\n\r\nDatabase Version \tMySQL 5.1.73 (mysqlnd 5.0.10)\r\nDatabase Connection Collation \tutf8_general_ci\r\nPHP Version \t5.4.16 \r\n\r\nTo test (requires using a system that does not support utf8mb4 -- see PR #7173):\r\n* Perform a fresh install using the \"Test English (GB) Sample Data\"\r\n* Log in and configure:\r\n   * Global Configuration->System Settings:  Debug system = yes\r\n    * Global Configuration->Server Settings:  Error Reporting = Development\r\n\r\nGo to Extensions->Manage->Database:\r\n\r\nNote the errors shown:\t\r\n\r\n```\r\n8 Database Problems found:\r\n    Table 'osvlt_banners' does not have column 'alias' with type 'varchar(191)'. (From file 3.5.0-2015-07-01.sql.)\r\n    Table 'osvlt_categories' does not have column 'alias' with type 'varchar(191)'. (From file 3.5.0-2015-07-01.sql.)\r\n    Table 'osvlt_contact_details' does not have column 'alias' with type 'varchar(191)'. (From file 3.5.0-2015-07-01.sql.)\r\n    Table 'osvlt_content' does not have column 'alias' with type 'varchar(191)'. (From file 3.5.0-2015-07-01.sql.)\r\n    Table 'osvlt_menu' does not have column 'alias' with type 'varchar(191)'. (From file 3.5.0-2015-07-01.sql.)\r\n    Table 'osvlt_newsfeeds' does not have column 'alias' with type 'varchar(191)'. (From file 3.5.0-2015-07-01.sql.)\r\n    Table 'osvlt_tags' does not have column 'alias' with type 'varchar(191)'. (From file 3.5.0-2015-07-01.sql.)\r\n    Table 'osvlt_ucm_content' does not have column 'core_alias' with type 'varchar(191)'. (From file 3.5.0-2015-07-01.sql.)\r\n```\r\n\r\nTap the \"Fix\" button.  Note the error:\r\n\r\n```\r\nAn error has occurred.\r\n\r\n    1115 Unknown character set: 'utf8mb4' SQL=ALTER TABLE `osvlt_banners` MODIFY `alias` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT ''; \r\n```\r\n\r\nThe errors obviously relate to PR #7173.\r\n\r\nI'm not sure what the proper fix is,  but I do see a couple things in that PR that I have questions about:\r\n\r\n1.  [ administrator/components/com_installer/models/database.php, line 266](https://github.com/joomla/joomla-cms/commit/aa8631411570ff488c455bd1dfff59da70b51ac8#diff-4fe6ecdcec6bf7e2bb71003122b749a9R266) has a hard-coded file name which doesn't actually exist:  `$fileName = JPATH_ADMINISTRATOR . \"/components/com_admin/sql/updates/$serverType/3.5.0-2015-01-01.sql\";`.   I believe the file it is referring to is actually `mysql/3.5.0-2015-07-01.sql` (note the different date).\r\n\r\n2.  As noted in the errors above, Numerous columns are reported as having an incorrect type.  The SQL file attempts to set the type to `varchar(191)`, but the actual type found in the database is `varchar(255)`.  So the SQL file is obviously not being applied properly (hence the errors).  But that also raises the point that the default schema (`installation/sql/mysql/joomla.sql`) needs updating so that the columns at issue are created as `varchar(191)`, not `varchar(255)`.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/153672777","html_url":"https://github.com/joomla/joomla-cms/pull/8268#issuecomment-153672777","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/8268","id":153672777,"user":{"login":"zero-24","id":2596554,"avatar_url":"https://avatars.githubusercontent.com/u/2596554?v=3","gravatar_id":"","url":"https://api.github.com/users/zero-24","html_url":"https://github.com/zero-24","followers_url":"https://api.github.com/users/zero-24/followers","following_url":"https://api.github.com/users/zero-24/following{/other_user}","gists_url":"https://api.github.com/users/zero-24/gists{/gist_id}","starred_url":"https://api.github.com/users/zero-24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zero-24/subscriptions","organizations_url":"https://api.github.com/users/zero-24/orgs","repos_url":"https://api.github.com/users/zero-24/repos","events_url":"https://api.github.com/users/zero-24/events{/privacy}","received_events_url":"https://api.github.com/users/zero-24/received_events","type":"User","site_admin":false},"created_at":"2015-11-04T10:22:13Z","updated_at":"2015-11-04T10:22:13Z","body":">@zero-24 can you please add that to your PR?\r\n\r\nThanks @nikosdion done with: https://github.com/joomla/joomla-cms/commit/ed0e3e750c93cb23b1e44f12952f876378c4ce90\r\n\r\n@zjw can you please try the changes with this patch applyed? If you need help to apply the patch please have a look here: https://joom.la/patchtesting\r\n"}}