Forum Replies Created
-
AuthorPosts
-
01/04/2015 at 9:17 pm in reply to: Images not displaying in tile-plus, html attributes seem to be errors #314014
matthew1035
ParticipantSteve,
the code delivering the image into the record for display produces this string where the SRC string is supposed to be:
srcset=”http://www.nuestrabodega.com/wp-content/uploads/connections-images/john-alston/Matt_180-f1b738dcbcab73764db0f0cffdda296a.jpg 1x”
This is a broken link and always forces a default to the alt text.
I tried every combination of settings I could think of, changed image sizes. left default images, deleted and reprogrammed records, and more.
Finally the only way I could get it to work was to edit the file class.entry-output.php where the html code was being generated.
I made this change:
Line 374
// The inner is required for responsive image support. This markup also makes it IE8 compatible.
$out = sprintf( '%3$s
%5$s‘,
empty( $atts[‘style’] ) ? ” : ‘ style=”‘ . implode( ‘; ‘, $atts[‘style’] ) . ‘;”‘,
absint( $image[‘width’] ),
empty( $anchorStart ) ? ” : $anchorStart,
implode( ‘ ‘, $tag ),
empty( $anchorStart ) ? ” : ‘‘
);/* repair elements in the output string */
$out1 = $out; $out2 = str_replace("srcset", "src", $out1); $out3 = str_replace(".jpg 1x", ".jpg", $out2); $out = $out3;which does a string replace to change srcset to src and .jpg 1x to .jpg
This comes from displaying the image in tile-plus.
I am not sure where the bug is in the code of public function getImage but you may be able to find it more easily with this input.
I am surprised that no one else has seen this issue as far as I can see on the forums but I hope this helps.
you can see the code working at http://www.nuestrabodega.com/la-guia for the directory but I still have some issues with the single display function. When you jump with the name link you get a different result than with the other links.
when I use a name link I get the right page but the wrong template:
http://www.nuestrabodega.com/artist-single-display/individual/john-alstonWhen I use other links in the directory card I get the right page and the template I wanted as it acts like a filtered input.
http://www.nuestrabodega.com/artist-single-display/organization/Designs+in+Focus%2C+LLC
I will be using link and login so people can build their own record and maintain it. The directory has 2 separte pages one for individuals and one for businesses. I need to be able to jump from the directory cards to the larger single display with more information from either directory.
I will take the entry forms down once I get the link version working.
Any suggestions you have are certainly welcome in how to get all the links from a directory card to jump to the larger display that will be showing more information.
Thanks
Matt
01/03/2015 at 7:14 pm in reply to: Images not displaying in tile-plus, html attributes seem to be errors #314008matthew1035
ParticipantI had included a snippet of code from the page where the problem is and the editor processed it as html displaying only the alt text here. This is the same code snippet with the “<” and “>” removed to stop it being processed as html
span class=”cn-image-style”
span style=”display: block; max-width: 100%; width: 100px” ( two width attributes in one line)
img height=”150″ width=”100″ sizes=”100vw” class=”cn-image photo” (sizes is not an attribute I recognize)
alt=”Photo of john Alston”
title=”Photo of john Alston”
srcset=”http://www.nuestrabodega.com/wp-content/uploads/connections-images/john-alston/Matt_180-f1b738dcbcab73764db0f0cffdda296a.jpg 1x” ( I recongize the attribute of img called SRC but not SRCSET)
/span /span
You can of course load the page and read the same source code from the site but these are the places that seem to be affecting the display of the image.
I appreciate any assistance you can provide.
Matt
-
AuthorPosts
