This happens since #1988612: Apply formatters and widgets to rendered entity base fields, starting with node.title and #2141055: When multiple instances of the same entity on one page, only the first can be edited have landed: the former enabled in-place editing of node titles, the latter made it possible to have multiple instances of the same entity on the same page and still be able to use in-place editing.

Edit's JS tries to find the entity instance ID for the page title, but it fails to do so because the entity title is not in the expected location: it's no longer rendered inside of the entity DOM node, but outside of it. Hence we need special handling for this.

Comments

wim leers’s picture

Status: Active » Needs review
StatusFileSize
new1.18 KB

When looking at "the full entity view" (i.e. the node/NID path), it's not yet possible to in-place edit the entity title (promoted to the page title). But it will be.
In the Drupal 7 backport of Edit module, that's already possible (through hacks). The solution for Drupal 8 will be the same as the Drupal 7 solution. Hence this simple forwardport.

Status: Needs review » Needs work

The last submitted patch, 1: entity_title_page_title-2154589-1.patch, failed testing.

wim leers’s picture

Status: Needs work » Needs review
jessebeach’s picture

Status: Needs review » Needs work
StatusFileSize
new137.24 KB

We should change the cursor to a text cursor, especially for field like title which is a link. It doesn't seem editable with a point. So something like this.

div.edit-editing,
p.edit-editing,
span.edit-editing,
input.edit-editing,
a.edit-editing {
  cursor: text;
}

Also, is the entity title really supposed to be repeated in the entity node as a field and as the H1 of the page? I don't remember this in the past. Maybe something new in D8? If so, it seems weird :/

wim leers’s picture

Status: Needs work » Needs review
RE: invisible cursor
That's out of scope: it's not being introduced by this patch. I created a separate issue for that: #2154775: In-place editing of title: works, but cursor is invisible.
Repeated entity title
I saw that too, I was going to bet it's the latest D8 regression, but after doing a clean install… it's gone! If you can find the steps to reproduce, please create a new D8 issue and ping me. But in any case, that is out of scope as well.
wim leers’s picture

I now figured out how to reproduce the "repeated entity title" problem, new issue: #2154805: View Block containing node teaser causes node title to be rendered twice on full node view.

jessebeach’s picture

Status: Needs review » Reviewed & tested by the community

Ok, thanks for logging those issues Wim and tracking down the double-title problem. Those were my two issues with this patch and neither are blocking for this fix.

This patch addresses the title-promotion error issue. Small steps!

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.