• Could someone who is well familiar with the topic of “Linking in WordPress” and in particular “link repair mechanisms” please tell me whether the observed behavior is indeed a bug or whether my expected behavior is not yet/anymore supported in WordPress?

    I already filed that as a supposed bug 5 days ago but got no response so far.

    Internal links, that are inline A elements with href=outdated-slug and which have the attributes data-type data-id as fallbacks should indeed use that fallback and update href=new-slug instead of resulting in a broken link (404).

    WordPress 5.8 on a PHP 8 server with the Astra theme.


    Sample screenshot of a broken internal link with href=outdated-slug and a redundant data-type and data-id which still point to the valid resource but sadly are not used for healing the link.

    I asked myself why else do these A elements have the attributes data-type=POSTTYPE and data-id=N if not as a redundancy/fallback for repairing the link when HREF changed from /correct-slug to /outdated-slug?

    I’d appreciate a short reply, b/c I now need to complete my website at least to a certain minimum, and want to know how “perma” my permalinks must be in regards to how hard it will be in the future should slugs need to change in terms of “internal link healing” (putting SEO aside, that can be solved with redirects then).

    And if my expected behavior is indeed not supported by WordPress if you can recommend any plugins which can find and repair such links (either as a daemon or as manually triggered batch operations which you do here and then).

    Any response appreciated!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    Those attributes are not used to “repair” links. They are of value to search engines for categorizing links. WP doesn’t repair links per se, but some links will get automatically corrected by the nature of how they are generated. If the new slug is similar to the old, WP might still find the resource by “fuzzy logic”, but success is not guaranteed.

    WP permalinks are “permanent” until you explicitly change the slug or permalink structure. If you choose to make such changes, I recommend setting up 301 redirects in .htaccess so that any SEO juice accumulated for the resource can get transferred to the new URL. And users using uncorrected links will get to the right resource, of course. There might be plugins that help you do this, IDK. Ideally, the same renaming logic should be consistently applied so one redirect rule can cover many different URLs.

    New Trac tickets are reviewed frequently. The attention any one ticket gets depends on how urgent the issue appears to be. Lack of response does not mean no one saw it.

    Thread Starter abitofmind

    (@abitofmind)

    Thanks a lot for the insights you provide! Thanks to your information I was able to not speculate but have certainty.

    1) So I indeed spotted a need which is not yet a WordPress feature! Despite me having suspected and honestly also expected that links being beautiful + durable + auto-healing is a base functionality of a CMS, that’s not the case for WordPress. So it may has some chances of getting considered in the TRAC issue tracker. Therefore I changed the issue type to feature request and added a design rationale and design proposal explaining which events could trigger auto-healing and what existing functionality could be potentially facilitated.

    2) As soon as a website already has SEO ranking, I agree you shall accompany all that with corresponding permanent redirects, to not loose “SEO juice”. But even that could be fully automatized! When link-healing occurs the corresponding redirects could be created accordingly. Also added that to the feature request.

    3) I strongly believe that plugins already exist for this. Because this to me seems like a common use case. Will research. I suspect that SEO plugins like Yoast & Co may cover some or all of my needs.
    – In the meantime all plugin hints appreciated!
    – I leave this open and will add plugin recommendations later should I find some.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Internal links with href=outdated-slug fail despite redundant data-type data-id’ is closed to new replies.