Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't edit Site metadata in /_edit Edit+ mode if index page configured #8

Closed
davidjb opened this issue Dec 9, 2016 · 3 comments
Closed

Comments

@davidjb
Copy link
Contributor

davidjb commented Dec 9, 2016

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.

The 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.

A 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.

@davidjb davidjb added the bug label Dec 9, 2016
@davidjb
Copy link
Contributor Author

davidjb commented Dec 9, 2016

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.

@davidjb
Copy link
Contributor Author

davidjb commented Dec 9, 2016

This long-standing issue in https://squizmap.squiz.net/matrix/4252 has been resolved. Released in 5.4.

@davidjb
Copy link
Contributor Author

davidjb commented Dec 9, 2016

This is also related to Edit+ users not being able to configure Index/Not Found assets. With the issue fixed above, these have been added into the Edit+ interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant