With Edit enabled, my views have extra classes and other HTML tags which significantly break correct display of the page; for example:

<div class="view-content">
        <div class="views-row views-row-1 views-row-odd views-row-first views-row-last">
    <article class="node node-practitioner-listing node-promoted node-published node-not-sticky self-posted author-johndoe odd clearfix" id="node-practitioner-listing-2071">
        <header>
    <h2 class="node-title"><a href="/practitioners/sally.smith" title="<div data-edit-id="node/2071/title/en/full"><div class="field-item">Sally Helen Smith</div></div>"><div data-edit-id="node/2071/title/en/full"><div class="field-item">Sally Helen Smith</div></div></a></h2>
  </header>

This appears to be same issue described in here: http://drupal.org/node/1895458

However, that issue is marked fixed without any indication of how it was fixed or what I can do. Can someone clarify this for me?

Comments

nod_’s picture

Title: Duplicate data-edit-id attribute for node title from Edit module not fixed » Edit adds wrapper markup to views fields and node titles

What you're describing is a different issue from the other.

There is not much we can do here since this markup is required for edit to work. If we remove it it's not possible to use edit with views fields ot node titles.

wim leers’s picture

Status: Active » Postponed (maintainer needs more info)
Issue tags: +sprint, +Spark

What #1 says.

It's vital.

Can you describe *how* this breaks your "correct display of the page"? I.e. how does Edit's CSS break things, *or* (more likely), how does your theme's CSS make assumptions that Edit is now breaking?

seafront’s picture

I've run into this today. Edit's extra markup can be easily adjusted to when it adds its tags correctly. But I've found in Views it sometimes strips other tags from elements and leaves them empty and orphaned - and this is much more serious.

For instance in Views, it happens when you customize field HTML in the style settings. But only with some tags - for instance paragraph tags.

<p>Views Field in Question with custom field HTML in Style Settings</p>

becomes

<div data-edit-etc>Views Field in Question with custom field HTML in Style Settings</div>
<p></p>

Oddly this doesn't seem to happen if you use a Div instead. These are fine & using them in place of the elements that break might be a workaround for anyone experiencing this problem until the issue is fixed.

wim leers’s picture

Title: Edit adds wrapper markup to views fields and node titles » Views sometimes strip tags, causing Edit & display to break
Component: Code » Views integration
Priority: Major » Normal
Issue tags: -sprint

This is due to our currently very, very limited Views integration. Please see #1830518-15: Views integration (use Views' render pipeline to re-render edited fields in Views).


#3: If you can clarify further how and why some of those elements are becoming empty and are getting orphaned (seems like the only plausible explanation is some Views setting?), then please comment on this issue.

wim leers’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Closing due to lack of response. Feel free to reopen.