Morten Ross
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: WordPress is not generating the srcset attribute correctlyOK, the output is only visible when logged in, so that’s fine and is displaying ‘bool(false)’.
Here’s what I have done to recreate it:
I have created a new post, uploaded the original image from https://staging.ross.no/wp-content/2023/12/20231218-DSC_4451-1-5.5.jpg to it, saved, and then added back the code to function.php (it kills the media library, so must be deactivated to use it) with the new ID (262016), which is now this original image: https://staging.ross.no/wp-content/2023/12/20231218-DSC_4451-1-5.51.jpg
bool(false) is again displayed. But when I test other post IDs I also get the same error, I’m not able to find any post ID where output is srcset value, so I’m at a loss as to whether or not this is doing what’s intended, or I’ve misunderstood.
Forum: Fixing WordPress
In reply to: WordPress is not generating the srcset attribute correctlyMany thanks for your time, and sorry you have been unsuccessful in reproducing. My issue here is that I’m not a coder, and simply forward what the theme developers communicate. The issue is that with all these images failing generates huge CPU spikes on server, as every time a user scroll the Portfolio these images are recreated for the session, and not read from previous generation as it is expected to, as WP fails to properly either skip the check, or deliver what is expected. This should only happen once, in the first browse of the images. The theme developer declined to open a ticket as they claim they have never seen this with other clients, and it is not a bug in their theme, thus I’m in the middle trying to explain.
I have also activated the 2025 theme on staging.ross.no, but as this issue only happens in archives or photostreams, I’m unable to see the false output by the function. So this never is a problem in post view, only on homepage archive view and photostreams. But when I navigate to a category the post with error belongs to, I don’t see the output to screen, nor find it in (
srcset) Inspector, so where is the output?Forum: Fixing WordPress
In reply to: WordPress is not generating the srcset attribute correctlyThis has been tested extensively by the theme developers (Uncode) , so it has been confirmed over and over again by them.
I have grouped a sample here: https://staging.ross.no/?page_id=262000&preview=true
Original images of the featured images for the posts:https://staging.ross.no/wp-content/2023/12/20231218-DSC_4451-1-5.5.jpg
https://staging.ross.no/wp-content/2021/06/20210625-DSC_1007-1-4.9.jpg
https://staging.ross.no/wp-content/2021/06/20210617-DSC_0235-1-4.9.jpg
https://staging.ross.no/wp-content/2021/06/20210617-DSC_0039-1a-4.9.jpg
https://staging.ross.no/wp-content/2021/06/20210617-DSC_9958-1-4.9.jpg
- This reply was modified 1 year, 3 months ago by Morten Ross.
Forum: Fixing WordPress
In reply to: WordPress 301 redirects post to itselfDon’t know how I missed the date difference – thanks for pointing that out!
That said I don’t now why Google Search Console is reporting a redirect error for this page, as that is the reason I opened this ticket. I have other posts that have a legitimate change in the date, which are indexed, and the old date/url is listed in User-declared canonical.
How to return 410, so Google will remove it from Search Console Redirect error property without having to install a plugin for it?
Forum: Fixing WordPress
In reply to: 301 redirect of filter urlsWhich filter hook solution already available are you referring to?
What is the workaround/solution going forward?
Forum: Fixing WordPress
In reply to: 301 redirect of filter urlsThanks for your update. I can provide access to my lab so you can see what happens with the filter functionality when your query_vars is active, and get a better idea of what’s going on. I might have overlooked something you’d see right away.
Forum: Fixing WordPress
In reply to: 301 redirect of filter urlsThank you! Much appreciated!
Unfortunately this disables the filter functionality all together from the UI.
- This reply was modified 1 year, 5 months ago by Morten Ross.
- This reply was modified 1 year, 5 months ago by Morten Ross.
Forum: Fixing WordPress
In reply to: 301 redirect of filter urlsI’m no coder, I need help in the debug process. As you can confirm the issue, how can this be escalated to WP development team?
I would also need a workaround until this is resolved.
Crawling activity is excessive due to this, and indexing of posts severely delayed (by months) due to the excessive crawl redirects. Google Search Console crawl stats is now reporting a whopping 40% responds with 301 vs just 60% with 200, which should be near 99%. Soon the 301 will overtake as the majority response, which is a huge problem.
As this is a core WP problem we need to properly address the issue with steps to reproduce and addressed by WP developers.
Forum: Fixing WordPress
In reply to: 301 redirect of filter urlsWhich site did you test? Please share, so we can compare.
I have replicated this on all the WordPress sites I have tested – some examples:https://undsgn.com/?test=foo,bar
https://www.stw.no/?test=cucurbitaceae,apocynaceae
https://www.sentrylocksmiths.com.au/?test=cucurbitaceae,apocynaceae
This appears to be a default WP config, as also the service provider’s own page has this, and they are still uncertain as to what is causing this.As mentioned initially this happens with with no plugins active and with default themes like 2024 or 2025.
It is verified neither nginx nor apache are involved in the redirect.
Forum: Fixing WordPress
In reply to: Image uploads no longer scaledI’m on Windows 10, ImageMagick 7.1.1-31 Q16-HDRI x64, and apparently it is quite a bit less straightforward to set up than on linux.
Your confirmation of it working on PHP 8.3 made me look more extensively, and it paid off. Thanks for your input!
Forum: Fixing WordPress
In reply to: Image uploads no longer scaledImagick is installed. I’m running PHP 8.2 in lab, vs 8.1 on live, so I guess this is a problem, as I find no Imagick binaries for php higher than 8.1.
Using GD I loose EXIF on all image uploads, so how to preserve EXIF? Exif support is active (showing up in phpinfo).
Forum: Fixing WordPress
In reply to: Tag cloud not showing top 10I don’t see how this plugin is regenerating the posts count for the categories, as it focused on reordering and ranking (I have installed it and saw nothing in regards to the regenerating of counts). I just want to regenerate the posts count in tags and categories to the actual number of posts.
I’ve found this wp-cli command that seemingly addresses the issue (but wp-cli is not installed on my hosting):
https://silicondales.com/tutorials/wordpress/tutorial-use-wp-cli-recount-wordpress-taxonomy-terms/
So how is it possible to correct this?
Forum: Fixing WordPress
In reply to: Tag cloud not showing top 10Hi,
This issue is core WP.
In Categories or Tags in WP Admin, the count is almost 3x that of the actual posts. Thus the code will use the bloated count and create an incorrect tag cloud. The filter I referred to is actually using the correct count, and is the code of the theme. I have opened a separate ticket to avoid confusion:
https://wordpress.org/support/topic/categories-count-number-is-2-5x-real-number/
Forum: Fixing WordPress
In reply to: Images uploaded darker than source imageWhat made me not think of color profile issues, is that this is the same image, same browser, uploaded a second time, with Imagick off/on. But when I saved every instance of before/after Imagick, the images are identical on disk. However in different browser windows (Firefox in this case), the same image appear different. In any case, Imagick is cleared of any wrongdoings.
Many thanks for your input!
Forum: Fixing WordPress
In reply to: EXIF is no longer preservedThank you Mark, that was spot on! PHP was upgraded, and Imagick was not active by default in the new PHP 8.1 for unknown reasons.
But how do I regenerate the images? All my image uploads are reduced by WordPress to the default max size of 2560 pixels, adding “-scaled” to the e nd of the file name (https://www.ross.no/wp-content/2023/12/20231218-DSC_4509-1-5.5-scaled.jpg). When testing thumbnail regenerate plugins they don’t show options for this file, which is the file I need regenerated.
- This reply was modified 2 years, 3 months ago by Morten Ross.