Cms: [3.6-RC1] PDOException "There is no active transaction" when attempting to save a new field

Created on 24 Nov 2020  Â·  4Comments  Â·  Source: craftcms/cms

Description

When attempting to save a new field on Craft 3.6.0-RC1, I get a PDOException "There is no active transaction" (see stack trace on PasteBin).

This is a clean 3.6.0-RC1 install, running on Nitro 1.1.1 using PHP 8.0 and MySQL 5.7.

Not sure if this is actually an issue with Nitro or with Craft – I did test a clean RC1 install using Valet w/ PHP 7.4 and MySQL 5.6 too, and the issue does not occur on that site.

Steps to reproduce

  1. Create a new field (Plain Text, all settings set to defaults)
  2. Save the field

Additional info

  • Craft version: 3.6.0-RC1
  • PHP version: 8.0.0
  • Database driver & version: MySQL 5.7.32
  • Plugins & versions: none
bug critical

Most helpful comment

That PR has been merged, so now we’re just waiting for the next Yii release. Once it’s out we’ll pull it in and get Craft 3.6 out the door.

All 4 comments

This is occurring because PHP 8 now throws an error when committing/rolling back a transaction which was already autocommitted due to a schema change (https://github.com/php/php-src/commit/990bb34891c83d12c5129fd781893704f948f2f4).

Just reported the bug to Yii (https://github.com/yiisoft/yii2/issues/18406) and submitted a PR (https://github.com/yiisoft/yii2/pull/18407), so hopefully we can get this resolved soon.

That PR has been merged, so now we’re just waiting for the next Yii release. Once it’s out we’ll pull it in and get Craft 3.6 out the door.

That PR has been merged, so now we’re just waiting for the next Yii release. Once it’s out we’ll pull it in and get Craft 3.6 out the door.

It has been released 6 days ago

Yep. Merged in for the next 3.6 release 🎉

Was this page helpful?
0 / 5 - 0 ratings

Related issues

angrybrad picture angrybrad  Â·  3Comments

mattstein picture mattstein  Â·  3Comments

brandonkelly picture brandonkelly  Â·  3Comments

lukebailey picture lukebailey  Â·  3Comments

michel-o picture michel-o  Â·  3Comments