The wrong variables for the image template and theme are passed through the table indicator's preprocessor.

Here's a patch to fix that, have a look see. Main reason for the structure changes is that the image preprocess function rewrites the src attribute based on the uri, so I added that back into the variables. And shortcut-ted the alt/title duplication call to the t() function while I as in there. And changed the include to a {{ theme() }} call in twig with the _context passed along.

Looks like who started this wanted to move the src building to the indicator preprocessor, that won't happen due to the image preprocess I mentioned above. But we could check to see if the src already exists before trying to replace the src tag in preprocess_image? Not sure the direction to take... let preprocess_image build the src or create it earlier on... right now it kinda does both for no good reason but it works and kinda future proof(inefficient) if you decide to change preprocess_image:-)

Comments

joelpittet’s picture

joelpittet’s picture

Status: Active » Needs review
joelpittet’s picture

Let's try that again, this time hopefully it will apply nicely and I fixed the else { for coding standards.

jpamental’s picture

Status: Needs review » Fixed

Looks like this one is already committed to the front-end repository. Setting to Fixed.

Status: Fixed » Closed (fixed)

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

joelpittet’s picture

Project: » Drupal core
Version: » 8.0.x-dev
Component: Twig templates conversion (front-end branch) » ajax system
Assigned: joelpittet » Unassigned
Issue summary: View changes