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

Updating search indexes always fail #4708

Closed
edwardpmartinez opened this issue Aug 5, 2019 · 5 comments
Closed

Updating search indexes always fail #4708

edwardpmartinez opened this issue Aug 5, 2019 · 5 comments

Comments

@edwardpmartinez
Copy link

Description

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
@brandonkelly
Copy link
Member

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?

@edwardpmartinez
Copy link
Author

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

@pabloroman
Copy link

pabloroman commented Sep 2, 2019

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 3.3.0.1
Yii version 2.0.21
Twig version 2.11.3
Guzzle version 6.3.3
Imagine version 1.2.3-dev

@brandonkelly
Copy link
Member

@pabloroman 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.

@brandonkelly
Copy link
Member

I just fixed a bug where updating search indexes could fail for Matrix blocks that contained relational fields (4cd2f62). @edwardpmartinez & @pabloroman 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.

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

No branches or pull requests

3 participants