wordpress-seo icon indicating copy to clipboard operation
wordpress-seo copied to clipboard

Uncaught Exception

Open Beee4life opened this issue 2 years ago • 5 comments

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

Please give us a description of what happened

To Reproduce

Step-by-step reproduction instructions

  1. install plugin + reset to default options
  2. I set the indexing settings for some post types not to be indexed as well as no author archives
  3. Open one of the post type archives for one of the non-indexed post types.

Expected results

  1. See the archive without issues

Actual results

  1. the page keeps on loading
  2. an error log is generated of roughly 80 mb

The first line in the error log is

PHP Warning:  Uncaught Yoast\WP\SEO\Exceptions\Indexable\Author_Not_Built_Exception: Indexable for author with id 1 is not being built, since author archives are not indexed for users without posts. in /var/www/html/web/app/plugins/wordpress-seo/src/exceptions/indexable/author-not-built-exception.php:19

Indexable for author with id 1 is not being built, since author archives are not indexed for users without posts. is correct. I don't want my posts indexed because I have no posts (in the post type posts).

If I enable the author archives (which I don't want, I'm the only author and I don't write editorial content yet), then the page loads as expected.

This happens on multiple sites, all with author archives disabled. Some of these sites are commercial and the owners are considering removing yoast because of it.

Technical info

The editor is not related imo since it only occurs on a (front-end) post type archive which is set to non-indexed. I only use classic editor.

  • Which browser is affected (or browsers): Not a browser related issue but tested and issue encountered with Chrome, Firefox and Safari.

Used versions

  • Device you are using: macbook pro
  • Operating system: MacOS Sonoma (14.2.1)
  • PHP version: 8.0
  • WordPress version: 6.4.3
  • WordPress Theme: custom
  • Yoast SEO version: 22.0
  • Classic Editor plugin version: 1.6.3
  • Relevant plugins in case of a bug: none that I can think of

Beee4life avatar Feb 13 '24 20:02 Beee4life

Hi @Beee4life

Thanks for using the Yoast SEO plugin and also for creating the issue. I tried to reproduce this issue by creating multiple sites with the default theme + Yoast SEO + Classic editor. Unfortunately, the PHP warning you mentioned is not occurring on my end.

So, can you please help us with a screencast video with the steps you have followed to reproduce this error on a new staging site having the default theme, like Twenty Twenty-Four? You can use screencast platforms like loom.com for this and can share the video link with us to check this further.

We look forward to hearing from you and hope you can help us replicate this.

josevarghese avatar Feb 14 '24 07:02 josevarghese

I can't activate twentyfour because then my post types are non existent and thus I can't reproduce the error.

What do you want to see in a screencast ? I reset all options through Yoast test helper plugin, the disabled author archives and tried to view a post type archive. Then i get a white/non-loading page showing nothing plus the log starting with the line I mentioned above.

I get the error on at least 3 different sites.

Beee4life avatar Feb 14 '24 21:02 Beee4life

Hi @Beee4life I am not able to reproduce with the steps you have shared. So, we need more details on how to replicate this as the issue is not reproducible. The reason why I asked for screencast is to understand whether you are noticing the error when a specific page is viewed and to get a clear idea about the settings you have selected.

josevarghese avatar Mar 03 '24 13:03 josevarghese

I noticed it mainly happens on a local installation, where indexing was always disabled (due to the use of this).

The trigger seems to be the setting whether author pages without posts should be indexed. As long as that is active, there seem to be no issues.

Beee4life avatar Mar 04 '24 11:03 Beee4life

Hi @Beee4life

Thanks for sharing more details.

josevarghese avatar Mar 18 '24 10:03 josevarghese

I wanted to provide even more details, but I haven't experienced this issue in quite a while anymore.

I tested with a few sites, especially for this issue, but all worked fined.

Probably due to a recent update (not sure), but so far it's all good again... let's hope it holds.

Beee4life avatar Aug 02 '24 10:08 Beee4life

Hi @Beee4life

Thanks for getting back to us and inform this. As the issue is no longer occurring with the latest Yoast SEO plugin versions, I am closing this issue to keep track of the active issues for our team. If the issue persists, kindly contact us with more details to take a closer look for you.

josevarghese avatar Aug 04 '24 06:08 josevarghese