{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/13856","repository_url":"https://api.github.com/repos/joomla/joomla-cms","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/13856/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/13856/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/13856/events","html_url":"https://github.com/joomla/joomla-cms/pull/13856","id":204904643,"number":13856,"title":"[imp] New plugin that displays a warning whenever an menu item's alias has changed","user":{"login":"marrouchi","id":1827776,"avatar_url":"https://avatars.githubusercontent.com/u/1827776?v=3","gravatar_id":"","url":"https://api.github.com/users/marrouchi","html_url":"https://github.com/marrouchi","followers_url":"https://api.github.com/users/marrouchi/followers","following_url":"https://api.github.com/users/marrouchi/following{/other_user}","gists_url":"https://api.github.com/users/marrouchi/gists{/gist_id}","starred_url":"https://api.github.com/users/marrouchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marrouchi/subscriptions","organizations_url":"https://api.github.com/users/marrouchi/orgs","repos_url":"https://api.github.com/users/marrouchi/repos","events_url":"https://api.github.com/users/marrouchi/events{/privacy}","received_events_url":"https://api.github.com/users/marrouchi/received_events","type":"User","site_admin":false},"labels":[{"id":198658453,"url":"https://api.github.com/repos/joomla/joomla-cms/labels/Language%20Change","name":"Language Change","color":"eb6420","default":false},{"id":60721348,"url":"https://api.github.com/repos/joomla/joomla-cms/labels/PR-staging","name":"PR-staging","color":"c7def8","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2017-02-02T15:23:57Z","updated_at":"2017-02-02T15:56:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/13856","html_url":"https://github.com/joomla/joomla-cms/pull/13856","diff_url":"https://github.com/joomla/joomla-cms/pull/13856.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/13856.patch"},"body":"A new core plugin that displays a warning message whenever a menu item's alias has been updated. The message suggests to the admin user to create a new redirection to the old alias in order to avoid 404 errors from existing urls.\r\n\r\nPull Request for Issue #13851.\r\n\r\n### Summary of Changes\r\nAdd a new content plugin name `menu`. The plugin contains two methods : \r\n- onContentbeforeSave : Check if the menu item's alias has changed. If it's the case, then display a warning message that suggests to the admin user to create a redirection to the old alias.\r\n- onContentPrepareForm : Alter menu item edit form whenever there's GET params (old_alias & new_alias) in order to set default values for the fields `old_url` & `new_url`\r\n\r\n### Testing Instructions\r\n1. Edit an existing menu item and change the alias. Then hit the Save button.\r\n2. A warning message should be displayed that says : \"You should create a new redirection to avoid 404 errors that could be generated by the old alias's urls : **Create a new redirection**\"\r\n3. Click on the link `**Create a new redirection**` and you should be redirected to a new redirection form with the two fields `old_url` & `new_url` filled with default values. Hit the Save button.\r\n4. Access the old URL in frontend (that uses the old alias) and you should be redirected to the new one.\r\n\r\n### Documentation Changes Required\r\nNo."},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/276996982","html_url":"https://github.com/joomla/joomla-cms/pull/13856#issuecomment-276996982","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/13856","id":276996982,"user":{"login":"tonypartridge","id":1400982,"avatar_url":"https://avatars.githubusercontent.com/u/1400982?v=3","gravatar_id":"","url":"https://api.github.com/users/tonypartridge","html_url":"https://github.com/tonypartridge","followers_url":"https://api.github.com/users/tonypartridge/followers","following_url":"https://api.github.com/users/tonypartridge/following{/other_user}","gists_url":"https://api.github.com/users/tonypartridge/gists{/gist_id}","starred_url":"https://api.github.com/users/tonypartridge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tonypartridge/subscriptions","organizations_url":"https://api.github.com/users/tonypartridge/orgs","repos_url":"https://api.github.com/users/tonypartridge/repos","events_url":"https://api.github.com/users/tonypartridge/events{/privacy}","received_events_url":"https://api.github.com/users/tonypartridge/received_events","type":"User","site_admin":false},"created_at":"2017-02-02T15:56:13Z","updated_at":"2017-02-02T15:56:13Z","body":"I don't think so? Just remove this plugin from your GIT and add the changes to the system and push your changes they should come through for us to review again."}}
{"actor":{"display_login":"tonypartridge"}}