{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/7654","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/7654/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/7654/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/7654/events","html_url":"https://github.com/joomla/joomla-cms/pull/7654","id":99739890,"number":7654,"title":"Make metadata.xml in view optional.","user":{"login":"Bakual","id":1018684,"avatar_url":"https://avatars.githubusercontent.com/u/1018684?v=3","gravatar_id":"","url":"https://api.github.com/users/Bakual","html_url":"https://github.com/Bakual","followers_url":"https://api.github.com/users/Bakual/followers","following_url":"https://api.github.com/users/Bakual/following{/other_user}","gists_url":"https://api.github.com/users/Bakual/gists{/gist_id}","starred_url":"https://api.github.com/users/Bakual/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bakual/subscriptions","organizations_url":"https://api.github.com/users/Bakual/orgs","repos_url":"https://api.github.com/users/Bakual/repos","events_url":"https://api.github.com/users/Bakual/events{/privacy}","received_events_url":"https://api.github.com/users/Bakual/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":null,"comments":8,"created_at":"2015-08-07T22:20:14Z","updated_at":"2015-10-15T12:15:07Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/7654","html_url":"https://github.com/joomla/joomla-cms/pull/7654","diff_url":"https://github.com/joomla/joomla-cms/pull/7654.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/7654.patch"},"body":"### Issue\r\nAs explained in https://github.com/joomla/joomla-cms/issues/7649, currently we are required to have a `metadata.xml` present in the view folder and that file needs to have a title specified.\r\nBut that title isn't used for anything, the menumanager (items view) only uses the title from the layout.\r\nIf the metadata.xml isn't present, the menumanager will not show the layout title but instead shows the name (as it appears in the URL!) of the view.\r\nSee picture for what I mean\r\n![menumanager](https://cloud.githubusercontent.com/assets/1018684/9146759/beaf84a2-3d5f-11e5-8feb-53c6aeea13df.PNG)\r\n\r\n### Solution\r\nThis PR proposes to make the whole file optional and as well the title attribute. If the title is specified and it is a translated string, it assumes that the developer wants to show the view title in the menu manager. The following table tries to show what changed. View and Layout column refers to if the file is present and contains a title.\r\n\r\nView | Layout | Before | After\r\n------ | ---------| ---------| ------\r\nX | X | Component » Layout | Component » View » Layout\r\nX | - | Component | Component » View\r\n- | X | Component » Untranslated Viewname (URL) |  Component » Layout\r\n- | - | Component » Untranslated Viewname (URL) | Component » Untranslated Viewname (URL)\r\n\r\n#### Backward Compatibility\r\nAs you see in the above table, there is some difference in behavior. Hopefully you all agree that it makes more sense now :smile: \r\nTo avoid showing now untranslated view strings (remember, those are currently required to be in the view metadata,xml!), I added a check into that part which only shows the view title if the string is in the language file.\r\nYou can test this easily with menu items from com_content. All metadata.xml files from this extension contain an untranslated title there. So those should not show up after the PR is applied.\r\n\r\n### Testing\r\nAfter applying patch, there should be no difference for most extensions.\r\nThe only core extension which will have a difference is com_wrapper. Instead of \"Wrapper » Iframe Wrapper\" it will now show \"Wrapper » Wrapper » Iframe Wrapper\".\r\nCom_content should behave the same because the view title isn't translated.\r\nTo test, you can delete the metadata.xml of a given view and see if something changes. For the wrapper, the view should vanish and only the layout show. For com_content menuitems there should be no change.\r\nIf you delete both the xml for the layout (usually default.xml) and the view (metadata.xml) you will see that untranslated viewname from the URL."},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/148368645","html_url":"https://github.com/joomla/joomla-cms/pull/7654#issuecomment-148368645","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/7654","id":148368645,"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-10-15T12:15:07Z","updated_at":"2015-10-15T12:15:07Z","body":"@Bakual can you sync to fix the conflicts here?"}}