Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Number of Internal Links Erroneously Reports 0 #15987

Open
4 of 9 tasks
LifeIsADeflatingVest opened this issue Sep 2, 2020 · 12 comments
Open
4 of 9 tasks

Number of Internal Links Erroneously Reports 0 #15987

LifeIsADeflatingVest opened this issue Sep 2, 2020 · 12 comments

Comments

@LifeIsADeflatingVest
Copy link

LifeIsADeflatingVest commented Sep 2, 2020

  • I've read and understood the contribution guidelines.
  • I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened.

After the 14.9 update, many posts show 0 internal links (0 posts linking to the specific post), which is inaccurate.

Please describe what you expected to happen and why.

According to the described behavior, the number on the column should reflect the number of posts linking to the specific post.

How can we reproduce this behavior?

Self-evident/Not applicable. Simply check the dashboard for number of internal links

Technical info

  • If relevant, which editor is affected (or editors):
  • Classic Editor
  • Gutenberg
  • Classic Editor plugin
  • Which browser is affected (or browsers):
  • Chrome
  • Firefox
  • Safari
  • Other

Used versions

  • WordPress version: 5.5.1
  • Yoast SEO version: 14.9
  • Gutenberg plugin version:
  • Classic Editor plugin version:
  • Relevant plugins in case of a bug:
  • Tested with theme: Not applicable

Edit: Links added after the update (i.e. currently) do reflect the correct number. The problem is with older posts.

Screenshot:
Annotation 2020-09-02 120912

@Djennez
Copy link
Member

Djennez commented Sep 2, 2020

@LifeIsADeflatingVest can you try installing the Yoast Test Helper Plugin and resetting the migrations / indexables and re-index your site again? I think that should work.

@LifeIsADeflatingVest
Copy link
Author

Not only did this not work, but it seems to have messed up the existing numbers, too. Now there are posts that should show only 1 link, and they show 6 😄

@LifeIsADeflatingVest
Copy link
Author

Update

I downgraded to 14.8.1 and the problem is solved - now there are no more posts reporting zero internal links. The posts whose number increased remains unaltered, but I thought that perhaps the plugin also takes into consideration links from tag/archives pages, discovered and indexed via resetting the migrations/indexables.

I'll probably update back to 14.9 since this isn't a crucial issue for me, but there's definitely something in 14.9 that breaks down the proper internal link number.

If you need any details for troubleshooting, I'd be happy to provide them

@Djennez
Copy link
Member

Djennez commented Sep 4, 2020

It's strange. I can't reproduce this behavior locally on on our live site. The numbers always seem to update correctly. The new system does indeed gather data from more places, so maybe the number was incorrect before and is now reflecting the correct amount? Can that be possible?

@LifeIsADeflatingVest
Copy link
Author

I'm afraid not, as I follow a very hands-on approach regarding my links and I know for a fact that there are only a couple of posts without any internal links (i.e. linked to). I estimate about 10% of the posts (so, about 20-25 in total) showed 0 internal links which is not accurate.

So, although the increased numbers (i.e. posts showing more internal links than I anticipated) might now be more accurate — as you said, the process might have gathered data from additional sources — this doesn't explain the fact that 14.9 shows two dozen posts without any links.

@Djennez Djennez added QA Unverified Not tested by the QA team severity: minor Yoast: Internal linking Yoast Feature and removed wait for feedback labels Sep 4, 2020
@LifeIsADeflatingVest
Copy link
Author

Update

I think I've discovered something that must be relevant. The problem seems to be related to two things:

  1. The presence of a cache plugin (I was using W3 Total Cache)
  2. Posts linked to from posts written with the classic editor

As a first thing, I disabled page caching (this is not something I'd needed to do with versions < 14.9). After that, I realized (this might be counter-intuitive for most users), that I needed to go to Tools > Text Link Counter and recount the links, otherwise there wasn't even an internal links column showing.

This removed almost all of the zero-links posts, though some persisted. But then I realized what was the common denominator: Assume post A, written with the classic editor (and not ever converted to blocks), was the only post linking to post B. Yoast, then, would show zero links to post B. Going into post A and converting it to the block editor (saving/updating then), made Yoast correctly recognize the link, showing 1 link to post B.

Hopefully this helps!

As far as I'm concerned, the bug can be considered closed, since it's not exclusively related to Yoast, but rather in the way Yoast interacts with page caching and (likely) with the classic editor. Still, I'm leaving that up to you.

@oliverbriansyson
Copy link

Not sure this can be closed yet, in my case, 70% of my post has 0 outgoing internal links even though they are not, and updating the 30% that has outgoing internal links count does not actually update the link count unlike 14.8.

I am using w3 total cache and the default block editor for wordpress.

@Djennez
Copy link
Member

Djennez commented Sep 15, 2020

I may have found 2 issues that cause the different problems as described above.

For internal tracking purposes I am linking the internal issues here and here.

One has to do with the saving order of our indexables (the incorrect 0 count). The other has to do with multithreading and theoretical race conditions (the inbound link count is way higher than it should be).

If anyone is able to confirm the last one for me (kind of technical):
If you can find the post with a too high of an incoming links count in the yoast_indexables table, please see if any of the posts that contain links to that post have duplicate entries in the indexables table (that would mean there are 2 or more entries with the same permalinks hash).

@Djennez Djennez removed the QA Unverified Not tested by the QA team label Sep 15, 2020
@LifeIsADeflatingVest
Copy link
Author

LifeIsADeflatingVest commented Sep 16, 2020

A couple of observations/questions:

When I started looking into the issue, I had a new post which immediately showed 6 internal links, although I had not linked to it from any other post. This isn't consistent with the condition you describe (which of course could account for other similar cases). In other words, I can verify I had at least one case where a post showed multiple internal links at a time when not a single post linked to it. Afterward, I added links to this post from 2 other posts, and now the number shown is 8 (so, correctly +2). Earlier you mentioned "the new system does indeed gather data from more places". Does this refer to e.g. tags/categories? Because then the numbers should be higher for all posts, which isn't the case. I have plenty of posts with only 1 or 2 internal links (correct, because they're linked to from only 1 or 2 posts), although they do feature several tags and at least one category.

Moreover, could you please elaborate a bit on how we could check whether there are duplicate entries in the indexables table? As in, where is the indexables table located, how can it be accessed to check for a similar permalinks hash?

@Djennez
Copy link
Member

Djennez commented Sep 16, 2020

Yes, links in category and tag descriptions also count towards the internal link count of posts. I think that any public object that gets indexed by our plugin will have its links analyzed.

As for the indexables table, this is in your database. I would recommend only experienced users to go searching for that duplicates data.

@MedelDomingo
Copy link

MedelDomingo commented Sep 18, 2020

got this problem also after updating it into version 14.9, is there any clear instructions on how to fix this? should i go in downgrading my yoast version?

Note that im not using gutenberg

@lindsayweb
Copy link

lindsayweb commented Sep 5, 2023

This is also happening to me. The site is hosted on SiteGround, which provides its own caching. We have both Dynamic Caching and Memcached Object Caching turned on. I suspect it's related to Memcached. But I'd rather not turn that off since it is recommended for site speed optimization. We are using gutenberg.

Do you have any solution for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants