rankmath / seo-by-rank-math

Rank Math is a revolutionary WordPress SEO Plugin that combines the features of many SEO tools and lets you multiply your traffic in the easiest way possible :bulb: :chart_with_upwards_trend: →
https://rankmath.com
107 stars 52 forks source link

Schema Module: Incompatibility with Molongui Authorship #131

Closed bmos closed 1 year ago

bmos commented 1 year ago

Describe the bug Each of my post pages have an error shows at the top.

Notice: Undefined index: @id in /home/------/public_html/wp-content/plugins/seo-by-rank-math/includes/modules/schema/class-frontend.php on line 252

To Reproduce Steps to reproduce the behavior:

  1. Install Rank Math and enable Schema module.
  2. Install Molongui Authorship.
  3. Set up a guest author.
  4. Publish a post with only the guest author listed.
  5. Visit the published post. The error will be in the page HTML and visible.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Disabling the Schema module makes the error go away. I have tried changing a variety of settings in the Schema module and none seem to impact it. I have submitted a pull request with a small change that solves the incompatibility.

bmos commented 1 year ago

Can someone take a look at this? This change should not cause any significant performance or compatibility issues.

pratikrm commented 1 year ago

Hi @bmos

Thank you for creating a Pull request. We'll make sure to include the changes in the next update.