Fixed IndexNow error: The key field is required.

bsd

Active member
Affected version
2.3.0
  • ErrorException: IndexNow error: The key field is required.
  • src/XF/Error.php:80
  • Generated by: Unknown account
  • Jul 2, 2024 at 5:03 AM

Stack trace​

#0 src/XF.php(256): XF\Error->logError('IndexNow error:...', false)
#1 src/XF/IndexNow/Api.php(79): XF::logError('IndexNow error:...')
#2 src/XF/IndexNow/Api.php(34): XF\IndexNow\Api->request('/?key=&keyLocat...', Array, 'IndexNow error:...')
#3 src/XF/Job/ContentIndexNow.php(84): XF\IndexNow\Api->index('https://mozodea...')
#4 src/XF/Job/Manager.php(275): XF\Job\ContentIndexNow->run(8)
#5 src/XF/Job/Manager.php(205): XF\Job\Manager->runJobInternal(Array, 8)
#6 src/XF/Job/Manager.php(89): XF\Job\Manager->runJobEntry(Array, 8)
#7 job.php(46): XF\Job\Manager->runQueue(false, 8)
#8 {main}

Request state​

array(4) {
["url"] => string(8) "/job.php"
["referrer"] => string(109) "https://mozodeals.com/threads/nutri...thie-maker-500-watts-3-jar-2-blade-64-off.24/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
 
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.3.1).

Change log:
Don't try to ping IndexNow if no API key is set
There may be a delay before changes are rolled out to the XenForo Community.
 
@bsd
Remove Disallow: /community/posts/ from your robot.txt or all your IndexNow links are useless.
 
I mean the fix post above does say Don't try to ping IndexNow if no API key is set


It has worked out of the box for me so far (not that bing likes my domain so it really does not do anything). I saw that indexnow was also hit after installing to 2.3.1. I just updated to 2.3.2 but no hit in last 30 minutes though I guess it should be working fine. Just confused about the bug bot comment in the above post!
 
I mean the fix post above does say Don't try to ping IndexNow if no API key is set


It has worked out of the box for me so far (not that bing likes my domain so it really does not do anything). I saw that indexnow was also hit after installing to 2.3.1. I just updated to 2.3.2 but no hit in last 30 minutes though I guess it should be working fine. Just confused about the bug bot comment in the above post!
The fix comment refers to a potential case where a job to ping IndexNow about specific content could be queued up but the IndexNow option in the admin panel was disabled. In this case, there's no API key that can be used so the job would fail with the error in the original bug report.

To be clear, you don't need manually do anything other than just enabling the option. This will generate an API key behind the scenes and do the necessary work to expose it to IndexNow when making requests.
 
Back
Top Bottom