Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In #3000794: ProductVariation should implement EntityPublishedInterface (deprecate isActive / setActive) the isActive()
and setActive()
interface methods were deprecated in favour of isPublished()
and setPublished()
. At the same time, the relevant entity key mapping was changed from 'status' to 'published'.
Other contrib modules may need to support older Commerce versions for some time yet, so these should continue to use the deprecated methods.
But the isActive()
and setActive()
methods are now broken, and need to use the 'published' entity key to work correctly. Patch to come.
Comment | File | Size | Author |
---|---|---|---|
#2 | commerce-invalid-active-method-key-3021064-2.patch | 710 bytes | John Pitcairn |
|
Comments
Comment #2
John Pitcairn CreditAttribution: John Pitcairn commentedAnd patch. I wasn't sure whether to change the key the methods use, or to restore the old 'status' key to the entity annotation and leave the methods as-is. I opted for the former.
Comment #4
bojanz CreditAttribution: bojanz at Centarro commentedThis is definitely the cleaner option.
Thank you John, appreciated.
Comment #5
agoradesign CreditAttribution: agoradesign commentedWhile the getter now looks good, the setter looks very broken now, because you don't use the entity key, but try to set the property named 'published'. sorry for not providing a patch, but it should be something like that instead:
Comment #6
bojanz CreditAttribution: bojanz at Centarro commentedWe need to bring back the removed test coverage for the two methods.
Comment #8
bojanz CreditAttribution: bojanz at Centarro commentedThird try :)