Support from Acquia helps fund testing for Drupal Acquia logo

Comments

loopduplicate’s picture

Assigned: Unassigned » loopduplicate
loopduplicate’s picture

Assigned: loopduplicate » Unassigned
Status: Active » Needs work
FileSize
15.82 KB

Although beta13 isn't out yet, I decided to see if the latest from core worked with this profile. I found that the markup for titles in views was improperly escaped. When I inspected the markup, I knew what to do :) I updated the view to change the markup of the title by removing the rewrite rule. The rule included an inline css style that was being stripped anyway. The rule also made it so an h3 element contained a div, which isn't really the best. I think that is why core now escapes this rewrite. See my notes below for details.

I'm attaching a patch that shouldn't be committed. It has the make file updated to test this with the latest from core. When beta13 comes out, the patch can be updated so the make file uses beta13. I re-exported the view config file instead of manually updating it. That's why it's so different. My notes below should clarify what I did.

###
# Beta 12
###

# View settings

Title
* plain text
* linked to content
* style: field HTML element: H3 (H2 for the other display) with default classes
* rewrite:
** <div style="text-align: center;">{{title}}</div>

# Resultant markup:

<h3 class="field-content"><div><a href="/node/1" hreflang="en">Artist Lofts in New York City</a></div></h3>

###
# Beta 13 (it's not out yet; this based on rev 4988a81a75ffa1aecec69586ca19be042a839bbb)
###

# View settings

Same as Beta 12

# Resultant markup:

<h3 class="field-content">&lt;div&gt;&lt;a href=&quot;/node/1&quot; hreflang=&quot;en&quot;&gt;Artist Lofts in New York City&lt;/a&gt;&lt;/div&gt;</h3>

###
# Proposed change
###

# View settings

Same as Beta 12 except no rewriting.

# Resultant markup:

<h3 class="field-content"><a href="/node/1" hreflang="en">Artist Lofts in New York City</a></h3>


loopduplicate’s picture

Here's the new patch for when beta13 comes out, which I think might be later today.

loopduplicate’s picture

Status: Needs work » Postponed

marking this postponed until beta13 comes out

Gábor Hojtsy’s picture

Status: Postponed » Needs review

Its out now!

loopduplicate’s picture

Simplytest is having troubles now so I didn't test there but I did test locally and everything looks good :) I think this is ready to commit.

  • Gábor Hojtsy committed 3a87182 on 8.x-1.x
    Issue #2537456 by loopduplicate: Update to Drupal 8 beta 13
    
Gábor Hojtsy’s picture

Status: Needs review » Fixed

I could not verify the patch either on simplytest.me and did not have time to test locally but I trust your judgement. I removed the uuid from the view on commit. Why were all those updates needed to that view? Eg. the altered title view?

Gábor Hojtsy’s picture

Still does not work after I committed, so opened #2542882: Multilingual demo dependencies problem.

loopduplicate’s picture

The profile works on simplytest.me now. See #2542882

Gábor Hojtsy’s picture

Yay, thanks a lot!

Kristen Pol’s picture

It's working fine on simplytest.me now. Oh, @loopduplicate already said that in #10. :)

Gábor Hojtsy’s picture

Just opened #2546220: Update to Drupal 8 beta 14, that is also out now :)

Status: Fixed » Closed (fixed)

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