(I hope critical status is appropriate for this).
Problem/Motivation
Unable to save nodes.
Steps to reproduce:
- Install Drupal 8.4.x head on Ubuntu 14.04 which provides PHP-5.5.9.
- Go to node/add/page
- Enter title and body.
- Click "Save and Publish".
This results in the following:
Fatal error: Drupal\Core\Entity\Plugin\EntityReferenceSelection\DefaultSelection has colliding constructor definitions coming from traits in /vagrant/www/core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/DefaultSelection.php on line 375
As you can see, I'm running this in Vagrant but I have also tried it on a clean install of Ubuntu 14.04 at Digital Ocean with the same result.
It appears to be related to this https://www.drupal.org/node/2787873
The problem is solved if I roll back to commit 3225473ddddf23fbfd9d22fe27190165a701c744
It returns if I go to b0900c73b120bdec147393423266e27d0209ee9d
I haven't tried it on a later version of PHP yet but I suspect this is PHP version related because it obviously passes the tests on 5.6.
Comment | File | Size | Author |
---|---|---|---|
#7 | colliding-constructs-2881874-7.patch | 1.73 KB | tetranz |
Comments
Comment #2
tetranz CreditAttribution: tetranz at Third and Grove commentedComment #3
cilefen CreditAttribution: cilefen commentedI am ok with this being critical as written. There is no data loss, but a principal product feature—adding content—is broken apparently. There is no fatal on PHP 7.1.4.
Comment #4
xjmWe do have nightly tests on 5.5, but they have not run yet:
https://www.drupal.org/pift-ci-job/681697
So I am going to manually trigger them now and see what happens.
Comment #5
xjm@tetranz, are you sure this is a core installation only with no contributed modules?
Comment #6
tetranz CreditAttribution: tetranz at Third and Grove commented@xjm Yes. No contrib modules.
Comment #7
tetranz CreditAttribution: tetranz at Third and Grove commentedThose tests have passed so ... I'm not sure what to make of that. Maybe it's just the Ubuntu version.
For what it's worth, this patch fixes the problem for me. I guess it partially defeats the purpose of the trait. I'm not sure if {@inheritdoc} is really correct there.
I followed the suggestions from the first answer here:
https://stackoverflow.com/questions/12478124/how-to-overload-class-const...
Comment #8
cilefen CreditAttribution: cilefen commentedComment #9
cilefen CreditAttribution: cilefen commentedI am confirming this fatal on PHP 5.5.9.
Comment #10
cilefen CreditAttribution: cilefen commentedI reverted the problem commit.
Comment #11
xjmThanks @tetranz for the prompt issue report! We'll try to figure out what broke things over in #2787873: Add a base class for entity reference selection handlers and fix the structure of their configuration before recommitting that.
Adding credit for cilefen since he reproduced the fix as well.
Comment #13
xjm