2020-12-01 12:18

Updating search indexes always fail


Every time an element is saved, the updating search indexes fail. The error from the queue log is: [876] Updating search indexes (attempt: 1) - Error (time: 0.218s): session_set_cookie_params(): Cannot change session cookie parameters when headers already sent

Steps to reproduce

  1. Save any entry
  2. The sidebar on the left will show updating indexes.

Strangely enough, if the debug toolbar is enabled on my user account, the error does not show.

Additional info

  • Craft version: 3.2.8
  • PHP version: 7.3.1
  • Database driver & version: MySQL 5.7.27
  • Plugins & versions: latest version of commerce


  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答


  • weixin_39857792 weixin_39857792 5月前

    We’ve seen a similar bug with PHP 7.3 and it ended up being an issue with the Xdebug extension. Do you have that enabled?

    点赞 评论 复制链接分享
  • weixin_39859909 weixin_39859909 5月前

    Thank you for your reply, . Yes, Xdebug is enabled (xdebug.default_enable is set to on).

    点赞 评论 复制链接分享
  • weixin_39566493 weixin_39566493 5月前

    Hi there,

    I'm experiencing exactly the same issue but in my case I don't have the Xdebug extension enabled.

    Here's some additional information about my installation. Any help is appreciated!

    PHP version 7.2.19 OS version Linux 4.15.0-48-generic Database driver & version MySQL 5.5.37 Image driver & version Imagick 3.4.3 (ImageMagick 6.9.7-4) Craft edition & version Craft Pro Yii version 2.0.21 Twig version 2.11.3 Guzzle version 6.3.3 Imagine version 1.2.3-dev

    点赞 评论 复制链接分享
  • weixin_39857792 weixin_39857792 5月前

    Do you have enableCsrfProtection set to false in config/general.php by chance? If so it sounds like a duplicate of #4854, which is fixed for the next release.

    点赞 评论 复制链接分享
  • weixin_39857792 weixin_39857792 5月前

    I just fixed a bug where updating search indexes could fail for Matrix blocks that contained relational fields (4cd2f625f7068b50a6aacbef91ff66726d81005e). & you may want to try updating to that commit to see if it fixes this for you.

    To get the fix early, change your craftcms/cms requirement in composer.json to:

    "require": {
      "craftcms/cms": "dev-develop#4cd2f625f7068b50a6aacbef91ff66726d81005e as 3.3.3",
      "...": "..."

    Then run composer update.

    点赞 评论 复制链接分享