- 🇺🇸United States DamienMcKenna NH, USA
I don't think the work here needs to be paused until #3323788 is done, that's just a bug fix to one tiny part of the system.
I think it would be worthwhile to identify all of the pieces necessary in the issue summary, including each test scenario we want to cover and whether they're done.
@khiminrm: Were the bugs you fixed as part of #74 things related to the revisions change or existing functionality in Commerce?
- 🇺🇸United States DamienMcKenna NH, USA
Also, should this go into 3.0.x instead of 8.x-2.x?
- 🇺🇸United States DamienMcKenna NH, USA
Related: 📌 Support product revisions from Commerce v1 Active
- 🇺🇸United States DamienMcKenna NH, USA
FYI patch #74 still applies, but there was a little fuzz on one file so here's a clean reroll.
- 🇮🇱Israel jsacksick
This was initially targeting 3.x, not really sure why I changed it back to 2.x...
My main concern with revisions is the inability to disable them... On a large project I'm working on, enabling revisions would cause the DB to grow way too quickly...
Also, there's still a data loss concern... Which makes me wonder if we shouldn't instead introduce a commerce_product_revision module, which swaps the Product entity class to one that supports revisions... But... That maybe unrelastic as there's code elsewhere that still wouldn't require changes to account for revisions...
- 🇺🇸United States DamienMcKenna NH, USA
Moving to v3.
My main concern with revisions is the inability to disable them... On a large project I'm working on, enabling revisions would cause the DB to grow way too quickly...
Following node's workflow, it's not assumed that a change on the node would result in a new revision, that default is controllable per content type. So why would this be any different?
- 🇮🇱Israel jsacksick
Well, what I meant (sorry if I was unclear) is that even if you're not planning to use revisions, the data model is still affected regardless.
Which means, duplicate revision tables for fields, for the main table as well (i.e commerce_product_revision). That surely has a non neglible impact on performance.
I wouldn't like having to suddenly worry about this on the relatively large sites I'm currently maintaining.
The content type setting doesn't have any impact on any of that. (it just drives whether a new revision is created on save).
- 🇺🇦Ukraine tbkot
#74 works for me. One thing that I would like to add is the relationship of the view between revision and the actual entity. It was not covered by CommerceEntityViewsData so I've added some changes for it to work the same as it was done in the EntityViewsData.
Interdiff is not working, changes were added at the end of the patch. - 🇩🇪Germany Anybody Porta Westfalica
@jsacksick Re #84 wouldn't that mean that Drupal already has a by far larger issue with performance and revisions, as it uses nodes and they are revisionable?
What I read here is:
We're afraid of the revisions database structure, that is used for nodes ever since?
Do I get that right?
Wouldn't then any large project, using nodes, make a wrong pick with Drupal?
Just playing Devils Advocate ;) To clarify things.
- 🇬🇧United Kingdom c_archer Cumbria
Currently using a patch in #87 which does work but the time stamp and author is always the same.
- 🇺🇦Ukraine tbkot
Based on the node behavior, this patch below adds a moderation handler to the product entity.
- 🇬🇧United Kingdom c_archer Cumbria
Patch on #60 currently fails against latest commerce release 2.37.0
- Merge request !243Issue #2656896: Make product and product variation revisionable → (Open) created by tbkot
- Status changed to Needs review
8 months ago 8:13am 8 April 2024 - last update
8 months ago Patch Failed to Apply - 🇺🇦Ukraine andriy khomych
I've tested locally. I think we can move it to "Needs review".
- Open on Drupal.org →Core: 9.5.x + Environment: PHP 8.0 & MySQL 5.7last update
6 months ago Not currently mergeable. - 🇩🇪Germany Anybody Porta Westfalica
The fork needs to be updated and conflicts needs to be resolved. Anyway, this looks quite far implemented. Thank you @tBKoT for pushing things forward.
✨ Implement a generic revision UI Fixed and 🐛 Revert and Delete actions should not be available for the current revision Fixed are both resolved in core. So this should be compared to what https://www.drupal.org/node/3160443 → suggests.Maybe "Needs tests" tag can be removed, I can see the Mr has tests.
I think there are quite a few projects where it would be great to have revisions for products and product variations to be able to track changes and revert them if needed!
- First commit to issue fork.
- Status changed to Needs work
4 months ago 2:32pm 2 August 2024 - 🇩🇪Germany Grevil
Ok, seems like this some test inside "ProductLayoutBuilderIntegrationTest" fails for the next major drupal release.
Back to needs work.
- Status changed to Needs review
3 months ago 2:58pm 15 August 2024 - Status changed to Needs work
3 months ago 9:54am 23 August 2024 - 🇩🇪Germany Grevil
This issue just came up in Slack again: https://drupal.slack.com/archives/C1TLCCF9B/p1724339226822049
There is still no final decision, whether this issue will ever see the light of day, but it definitely won't be 3.0.x.
The current state of this issue branch add revision support for both products and product variations. There were some discussions earlier inside this issue and slack, whether to only support revisioning products, but at least for our use case, we'd need revision support for both products and product variations.
The current MR currently doesn't include the typical "Create new revision" checkbox used on most revisionable entities:
Hence, I am setting this back to needs work.
An even better approach mentioned by @jsacksick over @Slack would be to be able to opt in to revisioning when creating a product- / product-variation-type. This seems to be the way forward, if we want this feature getting merged in future 4.x / 5.x releases. But that's not straight forward, as this feature isn't currently supported by Drupal "out of the box" and (might) need a lot of work.