{"action":"created","issue":{"url":"https://api.github.com/repos/jcu-eresearch/matrix-helpers/issues/8","repository_url":"https://api.github.com/repos/jcu-eresearch/matrix-helpers","labels_url":"https://api.github.com/repos/jcu-eresearch/matrix-helpers/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/jcu-eresearch/matrix-helpers/issues/8/comments","events_url":"https://api.github.com/repos/jcu-eresearch/matrix-helpers/issues/8/events","html_url":"https://github.com/jcu-eresearch/matrix-helpers/issues/8","id":194507918,"number":8,"title":"Can't edit Site metadata in /_edit Edit+ mode if index page configured","user":{"login":"davidjb","id":1002811,"avatar_url":"https://avatars.githubusercontent.com/u/1002811?v=3","gravatar_id":"","url":"https://api.github.com/users/davidjb","html_url":"https://github.com/davidjb","followers_url":"https://api.github.com/users/davidjb/followers","following_url":"https://api.github.com/users/davidjb/following{/other_user}","gists_url":"https://api.github.com/users/davidjb/gists{/gist_id}","starred_url":"https://api.github.com/users/davidjb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidjb/subscriptions","organizations_url":"https://api.github.com/users/davidjb/orgs","repos_url":"https://api.github.com/users/davidjb/repos","events_url":"https://api.github.com/users/davidjb/events{/privacy}","received_events_url":"https://api.github.com/users/davidjb/received_events","type":"User","site_admin":false},"labels":[{"id":397760402,"url":"https://api.github.com/repos/jcu-eresearch/matrix-helpers/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-09T03:53:55Z","updated_at":"2016-12-09T03:55:02Z","closed_at":null,"body":"Attempting to edit a Site asset via an /_edit URL results in a redirection to the site's index page, and there are no other ways to prevent this redirection taking place.\r\n\r\nThe JavaScript code that is present within easyedit.min.js (obfuscated, so impossible to reference a line number; grep for EasyEdit.redirect) in certain locations (page load, Asset Map) attempts to load the `asset_index_id` for the current asset.  On successfully retrieving a valid asset ID, the JS performs an EasyEdit.redirect() call, which 'redirects' user.\r\n\r\nA solution is to either don't redirect to the index page (eg people can get to an index page via the Asset Map anyway), or provide a clear/documented way of getting to Edit+ for a site (specific URL, request argument etc) to disable this behaviour.  With regards to Asset Maps, trying to access your Site asset should always edit the site asset."},"comment":{"url":"https://api.github.com/repos/jcu-eresearch/matrix-helpers/issues/comments/265927463","html_url":"https://github.com/jcu-eresearch/matrix-helpers/issues/8#issuecomment-265927463","issue_url":"https://api.github.com/repos/jcu-eresearch/matrix-helpers/issues/8","id":265927463,"user":{"login":"davidjb","id":1002811,"avatar_url":"https://avatars.githubusercontent.com/u/1002811?v=3","gravatar_id":"","url":"https://api.github.com/users/davidjb","html_url":"https://github.com/davidjb","followers_url":"https://api.github.com/users/davidjb/followers","following_url":"https://api.github.com/users/davidjb/following{/other_user}","gists_url":"https://api.github.com/users/davidjb/gists{/gist_id}","starred_url":"https://api.github.com/users/davidjb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidjb/subscriptions","organizations_url":"https://api.github.com/users/davidjb/orgs","repos_url":"https://api.github.com/users/davidjb/repos","events_url":"https://api.github.com/users/davidjb/events{/privacy}","received_events_url":"https://api.github.com/users/davidjb/received_events","type":"User","site_admin":false},"created_at":"2016-12-09T03:55:02Z","updated_at":"2016-12-09T03:55:02Z","body":"My workaround is to inject code into the Squiz_Matrix_API call for getting keyword replacements that tracks if anyone is asking for asset_index_id.  If this is seen, then change the replacement to something that doesn't exist and run the 'replacement'.  This essentially disables the redirection and allows users to correctly edit a Site. Users visiting the edit interface can still easily get to modify the index page, plus I provide a front end link to do so. "}}
{"actor":{"display_login":"davidjb"}}