XF 2.3 3k+ 'Blocked due to other 4xx issue' in Google Search Console

Anatoliy

Well-known member
They appeared after I upgraded to 2.3.2 about a month ago.
All of them are these types:
domain/misc/style-variation?reset=1&t=1724763460%2Cad52e9ce6de9c6b628dd7feaac79357a
or
domain/misc/style-variation?variation=default&t=1724762134%2C9ac39b17ff1a324c9d0afeefa19a8472
or
domain/misc/style-variation?variation=alternate&t=1724762133%2Cea0e99e67f692418bd180af747492fed

Where are those links? Pages are not indexed, so Google doesn't show referring pages.
Why those links are there if they lead to closed doors?
How to fix that?
 
Three thing.
1. Template modification that hides that style selector for guests.
2. An add-on that returns 410 (gone) instead of 400 when google revisits those links, that return 400.
3. Removed disallowed /misc/style-variation* from robots.txt

I would gladly share the add-on as a small payback for all the help you gave, me. But it was like 3-4 months ago, my local xf gone...
But the add-on is still on my production server. I guess I could copy a folder from there and share? Is it allowed at all?
 
just double checked. XAMPP is removed from the computer, local XF and all my add-ons development gone with it.

On a production server I can see:

1 Template modification
template - PAGE_CONTAINER
Simple replacement
Find
Code:
<xf:if is="$xf.visitor.canChangeStyleVariation($xf.style)">
                                                <a href="{{ link('misc/style-variation') }}" rel="nofollow"
                                                    class="js-styleVariationsLink"
                                                    data-xf-init="tooltip" title="{{ phrase('style_variation') }}"
                                                    data-xf-click="menu" data-z-index-ref=".u-bottomFixer" role="button" aria-expanded="false" aria-haspopup="true">

                                                    <xf:fa icon="{{ $xf.style.getVariationIcon($xf.visitor.style_variation) }}" title="{{ phrase('style_variation') }}" />
                                                </a>

                                                <div class="menu" data-menu="menu" aria-hidden="true">
                                                    <div class="menu-content js-styleVariationsMenu">
                                                        <xf:macro name="style_variation_macros::variation_menu"
                                                            arg-style="{$xf.style}"
                                                            arg-live="{{ true }}" />
                                                    </div>
                                                </div>
                                            </xf:if>

Replace
Code:
<xf:if is="!$xf.visitor.user_id">

<xf:else />
$0
</xf:if>
 
I don’t understand how that would affect anything if Google does not even see the style variation selector.
At that time Google already discovered 10k of those links that return code 400.
I didn't want to disallow to revisit them. I wanted G to revisit them as soon as possible to find out that they gone, that my site don't have anymore 10k bad links.
 
For some reason google really likes those links. I have blocked them in robots but google still puts the link as 'indexed but blocked by robots.

Hiding them behind an overlay like styles and language could work.

It also does this with some sorting links (order and prefix), so nothing new, but not as much.
 
Last edited:
I've reported this as a bug (with a potential fix).

 
Decided to sum things up a bit.
I couldn't figure out the add-on, and I have no desire to figure it out at all. So I decided to return 410 errors using .htaccess. I disabled the ability for guests to switch style variations, and for registered users I didn't see any uninvited 410 errors.
Code:
RewriteCond %{REQUEST_URI} ^/misc/style-variation$
RewriteCond %{QUERY_STRING} (reset=1|variation=(default|alternate))(&|$)
RewriteRule ^ - [G,L]
 
Back
Top Bottom