Updated: Comment #0

Problem/Motivation

Right now, Edit's JS is being loaded on all pages, as long as the current user has the right permissions. That includes pages like admin or node/1/edit.

At some point we did prevent that from happening, but that changed (and I don't know when or where this was discussed), where we considered the possibility of having a dashboard-like module exposing blocks where you could edit those blocks with in-place editing. Clearly, though, that's an extreme edge case and we shouldn't make 100% of admin page loads slower/heavier because of this oddball use case. It's still possible for a module that wants to support that to load Edit's JS if they want to.

Proposed resolution

Disable it. Other modules can then still re-enable it using hook_page_build().

Remaining tasks

None.

User interface changes

None.

API changes

None.

CommentFileSizeAuthor
#1 disable_edit_admin-2160555-1.patch569 byteswim leers

Comments

wim leers’s picture

Title: Edit » Disable Edit on admin pages
Status: Active » Needs review
StatusFileSize
new569 bytes

I discussed this with nod_ and jessebeach (both contributed to Edit module) and they agree Edit should be disabled on admin pages.

wim leers’s picture

Issue tags: +Performance, +front-end performance

Status: Needs review » Needs work

The last submitted patch, 1: disable_edit_admin-2160555-1.patch, failed testing.

wim leers’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 1: disable_edit_admin-2160555-1.patch, failed testing.

wim leers’s picture

Version: 7.x-dev » 8.x-dev

I'M STUPID

wim leers’s picture

Status: Needs work » Needs review
nod_’s picture

shoudln't that be if (path_is_admin(current_path())) ?

wim leers’s picture

#8: current_path() is going away; the code being used here is already used elsewhere in core.

nod_’s picture

Status: Needs review » Reviewed & tested by the community
webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

wim leers’s picture

Issue tags: -sprint

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

yesct’s picture

Issue tags: -front-end performance +frontend performance

changing to use the more common tag, so the less common one can be deleted, so it does not show up in the auto complete and confuse people.