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.
Problem/Motivation
The uc_product_classes features export code does not export the field definitions as if the product classes were simply content types.
Proposed resolution
Fix this.
Remaining tasks
Review, write tests.
User interface changes
None.
API changes
None.
Comment | File | Size | Author |
---|---|---|---|
#8 | 1404486-export-field-definitions-8.patch | 583 bytes | longwave |
#1 | 1404486-export-field-definitions.patch | 2.34 KB | solotandem |
Comments
Comment #1
solotandem CreditAttribution: solotandem commentedThe attached patch provides the features integration.
I will commit if someone will review and mark as RTBC.
Comment #2
longwaveCan't we just reuse the 'node' pipe for this? There is already a comment to this effect, and I was fairly sure I tested this when I first implemented this feature:
Comment #3
solotandem CreditAttribution: solotandem commentedThe existing code did absolutely nothing when I tried it. The patch enables the export of the product classes (essentially content types) and the attached fields as you would expect.
Comment #4
longwaveThis is actually a regression in Features; the existing code works with Features 6.x-1.1 but not 6.x-1.2.
Comment #5
longwavegit bisected to this commit: http://drupalcode.org/project/features.git/commitdiff/bba147a
Reverting this Features patch makes the 'node' pipe work again: #904558: Multiple features and strongarm conflicts
But perhaps we will just have to copy this code from features.node.inc into Ubercart now?
Comment #6
longwavePerhaps instead of "Ubercart product classes" being a separate exportable type, we should just automatically include Ubercart class data if the user exports a node type that is a product class?
Comment #7
solotandem CreditAttribution: solotandem commentedRegarding #6, I don't believe the product classes are selectable as a node type. Since Ubercart controls these "node types" they are not handled by the standard content type code. That is why this patch is needed. Interesting it is a regression in Features.
Comment #8
longwaveInvoking the pipe function directly seems to fix this in 6.x-1.2.
Comment #9
solotandem CreditAttribution: solotandem commentedI have not tested the patch, but the function call should not have the "&" on the second parameter, $export.
Comment #10
longwaveCommitted #8 without the & and with additional comments to explain why this has changed. Perhaps needs porting to 7.x for the same reasons, marking as such until someone tests it.
Comment #11
longwaveSame fix was needed in 7.x, committed.