{"action":"closed","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/11088","repository_url":"https://api.github.com/repos/joomla/joomla-cms","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/11088/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/11088/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/11088/events","html_url":"https://github.com/joomla/joomla-cms/issues/11088","id":165230466,"number":11088,"title":"Backward compatible issue with JLoader change in Joomla 3.6.0","user":{"login":"joomdonation","id":977664,"avatar_url":"https://avatars.githubusercontent.com/u/977664?v=3","gravatar_id":"","url":"https://api.github.com/users/joomdonation","html_url":"https://github.com/joomdonation","followers_url":"https://api.github.com/users/joomdonation/followers","following_url":"https://api.github.com/users/joomdonation/following{/other_user}","gists_url":"https://api.github.com/users/joomdonation/gists{/gist_id}","starred_url":"https://api.github.com/users/joomdonation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joomdonation/subscriptions","organizations_url":"https://api.github.com/users/joomdonation/orgs","repos_url":"https://api.github.com/users/joomdonation/repos","events_url":"https://api.github.com/users/joomdonation/events{/privacy}","received_events_url":"https://api.github.com/users/joomdonation/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/joomla/joomla-cms/labels/No%20Code%20Attached%20Yet","name":"No Code Attached Yet","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2016-07-13T03:35:50Z","updated_at":"2016-10-12T01:13:03Z","closed_at":"2016-10-12T01:13:03Z","body":"First of all, I am sorry for could not test my extensions with Joomla 3.6.0 before it was released.\r\n\r\n#### Steps to reproduce the issue\r\nAfter updating to Joomla 3.6.0, our customers reported this fatal error with my extension Events Booking\r\n\r\n> Fatal error: Cannot redeclare EventbookingBuildRoute() (previously declared in /home1/alamode1/public_html/components/com_eventbooking/router.php:16) in /home1/alamode1/public_html/components/com_eventbooking/router.php on line 16\r\n\r\n\r\n#### Expected result\r\nEverything works well as in Joomla 3.5.1\r\n\r\n\r\n#### Actual result\r\nFatal error as stated above\r\n\r\n#### Additional comments\r\nI haven't had a enough time to find out the root of the error yet. However, I think it is related to this PR https://github.com/joomla/joomla-cms/pull/9541\r\n\r\n1. My component use JLoader::registerPrefix method for auto-loading component classes\r\n\r\n```php\r\nJLoader::registerPrefix('Eventbooking', JPATH_BASE . '/components/com_eventbooking');\r\n```\r\n\r\n2. Joomla routing tries to find the class EventbookingRouter for building SEF urls. As the router in the component still use old format (not class base routing), the class doesn't exist and it seems with the change in JLoader , the file components/com_eventbooking/router.php is included twice and it causes the fatal error.\r\n\r\nFor now, I fix the issue by changing component router code to use class\r\n\r\n```php\r\nclass EventbookingRouter extends JComponentRouterBase\r\n{\r\n         public function build(&$query)\r\n         {\r\n         }\r\n\r\n        public function parse(&$segments)\r\n        {\r\n        }\r\n}\r\n```\r\n"}}
{"actor":{"display_login":"joomdonation"}}