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:-)
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | twig-fix-table-sort-inidcator-1860858-3.patch | 1.53 KB | joelpittet |
| #1 | twig-fix-table-sort-inidcator-1860858-1.patch | 1.99 KB | joelpittet |
Comments
Comment #1
joelpittetComment #2
joelpittetComment #3
joelpittetLet's try that again, this time hopefully it will apply nicely and I fixed the else { for coding standards.
Comment #4
jpamental commentedLooks like this one is already committed to the front-end repository. Setting to Fixed.
Comment #6
joelpittet