Forum Replies Created
-
AuthorPosts
-
Thanks Yigit!
Have a great day.
Tim
This one can be closed, thanks.
Thanks a lot Gunter, have a great weekend.
Tim.
Awesome, sounds great! Thanks Yigit :)
Hi Gunter,
We briefly tested the dev version and it seems to have fixed those issues, thank you very much.
If you can think of any other element or feature that may be missing image sizes in a similar way that these ones were, please add them in also. If I spot any more I’ll be sure to let you know.
Thanks again,
Tim.
Hey Yigit,
Thanks for the quick response and for forwarding that on.
I appreciate your suggestions too, I was aware of the WooCommerce one, but hadn’t thought of using the notification element in the top bar, that could work. Although if you need the top bar PLUS a notification, then that may not work entirely.
Thanks Yigit, have a great day.
Tim
Hi Gunter,
Sounds great, thanks so much.
Tim
Hey Gunter,
Thanks so much for looking into it.
So we think just adding in the image sizes should be enough, but unfortunately we won’t know for sure until we can test it and see if something else in the steps that are run messes up the image proxy. But hopefully just the image sizes will be enough, maybe we just start there?
Thanks again,
Tim
Ah I see, thanks for the explanation Gunter, and thank you so much again for helping us work through these two issues, it really has been a big help.
I haven’t gotten around to test the gallery retina tweaks, but will look out for it in the next version.
Thanks again Gunter.
Tim
Hey Gunter,
That’s brilliant thank you so much! lifesaver!
There was one problem with the code provided. It threw this fatal error:
PHP Fatal error: Uncaught TypeError: custom_avf_masonry_flex_image_html(): Argument #4 ($config) must be of type array, null given, called in /wp-includes/class-wp-hook.php on line 303 and defined in /wp-content/themes/enfold-child/functions.php:16
Because $this->config doesn’t exist. We just removed the $config from both functions and it works.
Hi Gunter,
Hope you had some time off!
Wanted to get back to you on the issue mentioned above that we need your help with.
We seem to have tracked down where the problem occurs with Imgix images and any masonry style ALB element (since they use the same core files). In the av-helper-masonry.php file it calls the make_image_responsive function and passes this string to it:
$img_html = '<img src="'. $attachment[0] . '" title="' . $img_title . '" alt="' . $alt . '" />';
Eventually the WordPress function wp_filter_content_tags attaches a width and height HTML attribute to the string because it’s not in the string. Because the way Imgix works (server.com/imgname.jpg?w=123&h=456), and every other image proxy service, WordPress looks up the details for imgname.jpg which it gets the full size width and height, it then adds these dimensions to the HTML rather than the width and height it’s requesting.
By comparing the code in other elements such as the easy slider or the image element (which work fine) we noticed that the difference in the way they works is that when these functions call the make_image_responsive function they pass in the width and height into this function. Eg.
$img_tag = "<img src='{$img[0]}' width='{$img[1]}' height='{$img[2]}'
This then stops WordPress later on looking up of the attachment details and adding the width and height. So how ever you pre-lookup the width and height in these other elements works fine.
So can you see the best way for us to get around this so that we can use Imgix and others can use other image proxy services without issue? We are not experts but thought of a few ways:
1. Should a lookup of the width and height happen and it be add to the HTML string before calling make_image_responsive like the other elements do?
2. Should we intercept the function that WordPress makes ( these is a hook there) and extract the width and height from the string Eg (server.com/imgname.jpg?w=123&h=456)
3. Some other better way that you think it should be done?The first option seems the best as this problem only seems to be effecting the masonry element and option 1 is specific to masonry code.
Option 2 I worry will impact other unforeseen things and is unnecessary for all other elements as they work fine.
- This reply was modified 2 years, 10 months ago by THP Studio.
Brilliant, thanks again Gunter! Will have a play with it as soon as I see it available.
Regards
Tim
Hey Gunter,
Amazing turn around time on that fix, thanks so much!
Yeah I would love a copy to try out if I can please.
Thanks again
Tim
- This reply was modified 2 years, 11 months ago by THP Studio.
Perfect, thanks again Gunter.
Hey Gunter,
That’s brilliant, thank you, really appreciate it.
Tim.
Hey Gunter,
Thanks for the responses, and for changing the input fields to allow variants other than pixels, that will be great.
I’ll wait to work on this for my clients until that functionality is added.
Have a great week
Tim.
Hey Gunter,
I have just started playing the the new responsive typography feature, and I wanted to say a big thank you for implementing this suggestion.
I’ve only just started with it, so sorry if I’m missing something or don’t understand something fully, but I had a few questions/suggestions on it’s implementation.
1. In the articles I linked to when I started this thread, and in the ones you link to from the Enfold theme settings, to achieve the best responsive results they usually use em or rem units for font sizes. However, I can only select pixel sizes in the Enfold settings. Is there a reason for this? As a suggestion, could we do away with the drop down list of pixel sizes, and instead use a text entry box where we can enter a value that we want, such as 1em, 2vw, 1.5rem, 10px etc? This would provide a lot more flexibility, plus also I think would be quicker than using a drop down list for all of these sections. Then it would be easy to implement the typographic scales you link to in the articles for instance by simply copying/pasting the em values if we wanted to.
2. Would it be possible to add an option in for each h1-h6 section along the lines of “override individual page settings”? For instance, on some sites before this feature was added, I’ve customised the Special Headings using the responsive settings in the ALB element. But now with these global features, I have to find each one I customised and revert it to default for this new feature to take affect on it. Another possibility to help with this could be a global option “set all heading elements responsive styles to default” which as a one-time thing when starting to work with the new responsive typography element you can select it and know that any custom headings/special headings that you’ve ever customised over time are now back to defaults, so you can start using the new responsive typography without any surprises. (I think I prefer this second option)
3. How does this feature interact with the Advanced Styling tab? For instance, if values are set in responsive typography, and values for a H1 exist in the Advanced Styling tab, does the AS tab take priority? (It seems that way, but just want to be sure).
Thanks again Gunter for your brilliant work implementing these and other features.
Regards,
Tim
- This reply was modified 2 years, 11 months ago by THP Studio.
Thanks a lot Yigit, have a great weekend.
Hi Gunter,
Thanks again
Tim
Oh I’m sorry, I misunderstood what the filters where there for, thanks for clarifying and for putting in place the fix, I really do appreciate it.
Tim.
Hi Gunter, that’s really great thank you for that.
Just out of curiosity, what was the reason to keep the current functionality and use filters for this fix? (rather than maybe the other way around)
Thanks so much for improving this for us.
Tim.
- This reply was modified 2 years, 12 months ago by THP Studio.
Thanks Gunter, you too.
Tim
Hey Gunter,
Brilliant, that seems to have fixed it, thanks for such a speedy fix.
Have a great weekend,
Tim
Great, thanks Yigit, I appreciate it.
Tim
HI Yigit,
Regards
Tim
Hey Gunter,
Thanks for the positive feedback as always.
Glad to hear there’s a lot on the roadmap at the moment, can’t wait to see it.
Tim.
This can be closed, thanks.
This can be closed, thank you.
Hey Gunter,
Ah ok sorry I didn’t see that other thread.
That is a strange one. Maybe someone with some ARIA experience (not me!) can shed some light on it for the forum.
Thanks for getting back to me so quickly.
Tim
Brilliant, thanks Gunter. Enjoy your weekend too.
Tim
-
AuthorPosts