Support has been upgraded!
The Support Forum is closed. Not to worry! Providing the top quality support you expect and we're known for will continue! We're not ending support, just changing where you submit requests. This will provide you with the best experience possible.
Premium Support
Have you purchased an addon for Connections such as one of our premium templates or extensions with a valid license and you need help?
Please open a Support Ticket in your user account.
Free Support
Are you using the free Connections plugin? Don't worry, you are still very important to us! We are still providing you with the same high quality support that we're known for.
Please open a new support topic in the WordPress support forums for Connections.
Tagged: 8.1.5, cMap, html5, picturefill, polyfill, template, Tile Plus, wp_footer()
- This topic has 5 replies, 2 voices, and was last updated 11 years, 7 months ago by
Steven Zahm.
-
AuthorPosts
-
01/03/2015 at 11:20 am #313993
matthew1035
ParticipantSteve,
I have been using connections with tile-plus for about 2 years. We are creating a new site and I have updated wordpress to 4.1, the theme is atahualpa 3.7.18, and the tile-plus version is 4.1. The pages look like I expected with one exception the images in my test version are not showing and I see the Alt text instead.
Everything about the file name is correct and I can load that file name into other test pages. However the attributes in the tile-plus display
tag sent to the page look wrong.
Example,
<div style="float: left; margin-right: 10px;"></div>If you look closely into the code generated for the page starting on line 2 I see an attribute SIZES that I do not recognize, but more importantly the SRC attribute is SRCSET which I also do not recognize.
The source string:
“http://www.nuestrabodega.com/wp-content/uploads/connections-images/john-alston/Matt_180-f1b738dcbcab73764db0f0cffdda296a.jpg is the valid url of the correct photo and displays in a test post on the site using the src attribute.The site name is http://www.nuestrabodega.com
The “individual directory” is on the page called:
http://www.nuestrabodega.com/la-guia.The system at the moment has only a limited set of records that are there just to verify functionality.
Three of the test records have a valid photo in the form as the “photo” the “Logos” are not being used. Each record that has no photo displays exactly as they have before but each one with a photo has collapsed to a text string of the alt text and the image is not there.
I use a child theme on this site because I wrote custom page templates to display the sign up form and the directory display pages, and this template has the code for the function I created to sort the directory by City, state, country. This code uses page variables to load the shortcode for the page and has input fields above the display. This code did not affect the images prior to updating the system.
Any ideas what is wrong?
Matt Alston
01/03/2015 at 7:14 pm #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
01/04/2015 at 9:17 pm #314014matthew1035
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/05/2015 at 10:29 am #314026Steven Zahm
Keymaster@ matthew1035
You need to undo the changes you made to the Connections code changing
srcsettosrc. This is valid HTML5 markup for the new picture element to support HiDPI (Retina) images. Here’s a great article on the attribute..As you see many browsers do support it:
http://caniuse.com/#feat=srcsetFor those that do not, a polyfill called Picturefill is loaded by Connections to enable support.
The reason you see only the Alt text is likely you were viewing the page in a browser that does not support the new element and a bug in the theme.
It appears the theme is missing the wp_footer() template tag. This will break a great many plugins. You’ll need to contact the theme dev to have them fix that.
The single display seems to working just fine, it is using the single view of the cMap template (it has a different design which should be more inline of the theme’s page template). When you filter by the region, locality, organization and such, you’re being shown the results in the result list view of cMap.
Hope that helps!
01/06/2015 at 9:50 am #314103Steven Zahm
KeymasterNOTE: replied via email:
Steve,
Thanks for the update on srcset I see now what it does and why.
You were right about the theme error concerning the footer function
wp_footer(). They have an option to display the footer full width and
the wp_footer() call is in that if statement as well by accident. They
had already done an update fixing that and with it installed
everything now works well.It is funny how situational these issues can be. If I had done the
upgrade work today instead of last friday then when I updated all the
components of the site including my theme I would have already had the
wp_footer() problem resolved and none of this dialog would have even
taken place.The system is working much as I had wanted now so I will get on with
deploying link and login.Great job Steve keep it up.
Matt
01/06/2015 at 9:52 am #314104Steven Zahm
Keymaster@ Matt
Thanks … great to hear that it is working again!
If you have a moment, I would truly appreciate a review as they really do make a difference. Many thanks in advance!
https://wordpress.org/support/view/plugin-reviews/connections -
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.
