Forum Replies Created
-
AuthorPosts
-
Michael Samson
ParticipantHi Ernest,
Our pleasure. The credit goes to our senior developer who found this issue and patched it.
Thank you for including the fix in core. I’ll keep an eye out for it!
All my best,
~ Michael
Michael Samson
ParticipantHi Ernest,
Thank you for explaining to me what blocking is all about. That was helpful!
From what you’ve said there is actually no problem here. I think this is probably only affecting the stats in GTmetrix. I’ve learned to take the metrics in GTmetrix with a grain of salt, as they never appear to be UX time-frames. By comparison the total times provided in Pingdom tend to be more what the user actually expreriences. I use GTmetrix because it is very detailed, and helps to identify problems.
I’m in the middle of a lot of performance related work, so when I saw that 6 second blocking I assumed it was part of the problem. Thanks for clearing this up!
The only icons that we’re using are the checkmark, search icon, and settings icon. You know, I think there is room for a feature here. Many people already load FontAwesome in one version or another. I often see it loaded by multiple plugins. It would be a good settings option to disable it from loading in ASP when it is already loaded elsewhere. I’ve seen plugins offer options like this to avoid loading fonts multiple times.
I may experiment here with removing the font file just to see what happens. But either way, this would be a great option to have in settings.
Food for thought!
Thank you as always for the fast help… =)
~ Michael
Michael Samson
ParticipantIs there a way I can completely disable this file from loading? We may not actually need this…
Michael Samson
ParticipantOk, so bad news. I completely disabled W3 Total Cache and removed all the rewrite rules from .htaccess, and this made no difference!
Please look at the screenshot I’ve attached here. As you can see this file is taking 6.1 seconds just for blocking.
You know, we already load FontAwesome elsewhere. I’m wondering if we even need to load this at all from within ASP…
~ Michael
Michael Samson
ParticipantHi Ernest,
Thank you for the quick response!
I did a quick check and there is indeed a rewrite rule for this that is used by W3 Total Cache for the Browser Caching functionality. I’ve been experimenting with W3 Total Cache, and the plan was probably to only use it for browser caching.
I’ll do a quick test here to disable these rules completely, and see if it makes a difference. This will take me a few minutes as it requires a full deployment. I’ll message back here shortly with the results…
~ Michael
Michael Samson
ParticipantSounds good Ernest. I’m glad I was able to find this bug for you.
When you have a plugin as complex as ASP, it starts to become impossible to know about every bug right away. Believe me, I deal with this kind of thing 24/7 for Eruditely. There’s always a new bug you didn’t know about! 😉
I’ll keep my eye out for that update!
All my best,
~ Michael
Michael Samson
ParticipantHi Ernest,
Thank you for the quick reply and analysis of this issue. While it may be a minor bug, it caused a really nasty issue.
You were correct about the “Remember search phrase and options” feature. As soon as I turned that off this problem disappeared. So there does appear to be a bug with it.
I’m not completely sure we actually need this feature turned on. I understand what it does, but if someone clicks the back button, is it really that big a deal if their search settings are reset? I’m thinking this isn’t a big issue, as there’s only so many search options anyway and they’re easy to change.
And yes, we do use the datepicker in our search options as you know. I have it set to search within the last 5 years of records by default. I’ve always felt the date picker is a very powerful tool, and I’m glad it’s part of the options.
All my best,
~ Michael
-
This reply was modified 6 years, 1 month ago by
Michael Samson.
Michael Samson
ParticipantHi Ernest,
Thanks for the confirmation about not using the conditional css loader. I’ll continue to manually sync of static css file to style.instances.css, at least until you make further changes.
Glad that little code was helpful. It does work perfectly to prevent gifs from being resized.
All my best,
~ Michael
Michael Samson
ParticipantHi Ernest,
I just did a major deployment to our production site and this issue in ASP is now there as well. I was seeing this before in our development site. So apparently this issue is associated with fairly new code.
What’s more alarming is this is now happening on practically every search I do. Once I run a search on a page, the search term kind of gets stuck on that page. You can see this happening on eruditely.com right now.
We definitely need to solve this, as it renders the search nearly unusable.
~ Michael
-
This reply was modified 6 years, 2 months ago by
Michael Samson.
Michael Samson
ParticipantHi Ernest,
Please read my above post first… 😉
I just wanted to tell you that I successfully disabled image resizing for gif files with the code below. This code works, and I have tested it with ASP. I can confirm that the gif animation now works in ASP when rolling over the search result (card). Very cool feature btw!
Apparently this is a very old problem in WordPress that is currently being worked on. There’s more than one trac ticket for it. But it seems like it isn’t fully solved yet from what I read. It made more sense to just disabled image sizes for gifs, since they’re almost always animated anyway.
Here’s the code I used to do this in case you’re interested, or anyone else needs it:
function disable_image_sizes_for_gif_files( $sizes, $metadata ) { // Get filetype data $filetype = wp_check_filetype($metadata['file']); // Check if file is gif if($filetype['type'] == 'image/gif') { // Unset sizes if file is gif $sizes = array(); } // Return sizes you want to create from image (none if image is gif) return $sizes; } add_filter( 'intermediate_image_sizes_advanced', 'disable_image_sizes_for_gif_files', 10, 2 );All my best,
~ Michael
Michael Samson
ParticipantHi Ernest,
Ok, so are you saying that my current setup as described above is perfect as-is, and that I don’t need to make any changes? (you said, “That sounds perfectly fine to me.”)
With the conditional CSS loader the plugin will only enque a single CSS file, that is the instances file. The dequeue takes care of that, and you can sync the contents of the style.instances.css file, that will always contain all the correct CSS code the plugin needs. You can ignore all the other files.
We’re not using the conditional CSS loader right now. Are you recommending the above as a better option? Please also note that right now I am syncing our static file to the style.instances.css file.
Btw, I have just checked to make sure that all the default plugin css is indeed loading from our static file, and it is. So it does seem that our current methodology is working.
…..
About the gif animations:
I had forgotten that we have a custom image size specifically for ASP. That’s used to help with loading times. But you’re right, it seems that resizing the gifs only take the first frame.
I assumed that animated gifs were working on our platform because all those bird gifs were working in other locations. But upon close examination it turns out the reason it was working in other spots was because it was defaulting to the original file. It was using the original file because it was the largest image, and closest to the size that was needed. By comparison the image size for ASP is quite small, and that resized gif size existed. That’s why it wasn’t working only in ASP.
I like your idea to disable the resizing of images only for animated gifs. I’ll look into this to see if it’s possible.
Thank you again for all your help!
~ Michael
Michael Samson
ParticipantHi Ernest,
Sorry it took me so long to get back to this. I’ve been having a very busy, albeit productive week!
I’ve just checked to ensure that the “Load CSS files conditionally” setting is turned off in both our environments, and it is. We’re definitely not using that, and this seems to be the safer choice (please correct me if I’m wrong).
Before I respond to the specifics, let me please again explain my goal. I need to make sure this is done correctly for our specific situation.
…..
When I look in the /asp_upload folder I currently see these 6 files:
style.basic.css
style.basic-ve-ho-po-no-au.css
style.basic-ve-ho-po-no-au-se.css
style.instances.css
style.instances-ve-ho-po-no-au.css
style.instances-ve-ho-po-no-au-se.cssAny of the files above that are actually being used by ASP, we need to load instead as static files from a custom location in our child-theme. The main reason for this is that we rely upon a stateless architecture and load balancer. We do have a few files that are exceptions to this, and load centrally using the Elastic File System in AWS. But we’ve learned from experience that the EFS is not dependable (and is also quite slow), and therefore if we can move files out of there we should. That is why we need these css files to load as static files from our child theme.
We’re currently dequeueing the ASP dynamic styles using the code I showed up above in this thread. We are then custom enqueueing the style.instances.css file to a custom folder in our child-theme. Every now and then I also update this file from the dynamic file, to ensure they’re in sync.
…..
So what I need to know now is what needs to be changed to maintain this, if anything. Do I need to change our dequeueing code? Do I need to enqueue different files?
From what you wrote above (Case 2), it seems like I don’t need to change anything. Please note that I have only enqueued the style.instances.css file. And not either of these two files:
style.instances-ve-ho-po-no-au.css
style.instances-ve-ho-po-no-au-se.cssI’m also assuming that I can ignore the style.basic css files.
So I think that covers everything. Please let me know what you think, and thank you as always for your continued help!
P.S. Please don’t forget to look into the issue I reported with the animated gifs not working… 🙂
All my best,
~ Michael
-
This reply was modified 6 years, 2 months ago by
Michael Samson.
Michael Samson
ParticipantHi Ernest,
It’s good to hear from you. It’s been a while!
You didn’t respond to what I said happened with my license. I know this is managed by Envato, but can you shed some light on this? Now I have two ASP licenses, when I only needed the one. All I wanted to do was renew the support for a year.
…..
1. It uses only the “style.basic-ve-ho-po-no-au.css” file, the other one is left there for backwards compatibility convenience only. It might be removed in a later release.
Hold on, this is a big issue. You’re saying that the plugin is using the “style.instances-ve-ho-po-no-au.css” file and NOT the “style.instances.css” file?
If that is the case then shouldn’t I be dequeueing that specific file and enqueueing it from our static location?
…..
2. The feature can be enabled here. You can still use that, but in that case you don’t have to get the contents from either stylesheet files, the plugin will load them later – and it would also defeat it’s purpose.
My main concern here is with these two css files:
“style.basic.css” and “style.basic-ve-ho-po-no-au.css”
If I have this feature disabled, then are these files used at all by the plugin? My concern is because we need to custom enqueue all the css files to be static. I need to know if we need to make these into static files or not.
From the warning you wrote by this feature, it seems to me that we shouldn’t use this. I prefer we load css files simply from a static location.
…..
3. Not exactly, it applies to both methods. The base CSS file had been separated to parts, and after saving any option on the plugin back-end, the plugin checks all options and search instances if they use specific features. If not, then that CSS part is completely excluded. In previous versions, the base CSS included all features. In your case it is actually a huge step-up, as the “ve-ho-po-no-au” part of the file indicates which feature CSS is not generated (vertical, horizontal, polaroid, noUI and certain parts of autocomplete: “ve-ho-po-no-au”)
The filename changes if the requirements change (but the old one is also kept). I did this for better cache control, as well as for easier error checking.Without me having to understand all the intricacies of the new css management, I have only one concern here. We cannot have any dynamic css stored in the uploads folder and sub-folders. I need to dequeue all such files and enqueue them as static files. This is what we’ve always been doing. So I really need to know clearly from you which files we need to do this for.
It sounds like you’re saying that the new style.basic-ve-ho-po-no-au.css file is smaller and more efficient. That is great, but right now we aren’t using this in our static files. So I’ll have to take care of this asap once I hear from you.
…..
4. It should be automatic. I can check that out, if you want to, all I need is a link to a page and a search phrase I can try. It is not possible to turn it off at the moment.
This is definitely not working on our site. Just go to eruditely.com and run a search for “animated.” You’ll see a bunch of bird animations that a friend of mine made. These are all gif animations. As you’ll see none of them are animating in the search results when rolled over. If you go to those posts you’ll see they all animate properly.
…..
5. Only programatically. You can disable it by editing the wp-content/plugins/ajax-search-pro/backend/maintenance.php file. Put this after the first line of the file:
return;Is there at least a warning confirmation screen if these are accidentally pressed? I think it would be wise to have a way to disable these settings with a constant. Then it can just say “Disabled from wp-config” in the settings area.
…..
6. Yes, that looks correct
But this isn’t for the “style.basic-ve-ho-po-no-au.css” file which you said is the file actually being used. Don’t we have to now dequeue that specific file and then custom enqueue it to load statically?
…..
Thanks for your help as always!
~ Michael
Michael Samson
ParticipantHi Ernest,
I just updated ASP and your fix worked. I removed our patch.
Thanks for getting this fixed!
~ Michael
July 1, 2019 at 7:02 pm in reply to: Automatic Loading of Next Batch of Ajax Results Not Working on Touch Devices #23548Michael Samson
ParticipantHi Ernest,
It’s great to hear from you as well! I’ve been extraordinarily busy since the launch. I’m juggling many things at the moment, including trying to get us members, people posting, and planning a major funding round. But it sure feels good to finally have Eruditely live!
You know, I hope you’ll join Eruditely too. We could use you as a member. I also think you would benefit from posting there about Ajax Search Pro. I mean, we’re literally using your search plugin on the platform. I don’t mind you using Eruditely to promote yourself a bit. Right now, we just need people to publish content. It would be great if you’d help us.
As for this remaining issue. It is very easy to reproduce. In fact, now that Eruditely is live, just view the site on a mobile phone and you can easily replicate this. It’s a minor issue, but we should still solve it!
I’m looking forward to hearing what you think of platform!
All my best,
~ Michael
-
This reply was modified 6 years, 1 month ago by
-
AuthorPosts