-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade from Drupal 7 field collection into paragraphs #53
Comments
I haven't heard of anyone working on this, but I'd be happy to do some basic testing. I haven't used Field Collection so would probably only be able to test a basic set up / upgrade. |
I've used both of those modules pretty heavily in Drupal 7 and I'm not sure Field Collection and Paragraphs serve the same purpose. Field collection is more like a field that contains multiple fields. It really only has a single way to display that field in the end. It's sorta like a 'grouping' of fields. Paragraphs on the other hand, while it's also a 'grouping of fields', is intended to have multiple "types" of field groupings with different fields within each grouping. (wow, thats hard to explain 'out loud'!). Each paragraph type would display differently than the others and contain different subfields. While both modules are objects that contain multiple sub-fields, I don't see them as interchangeable. I could keep blabbing, but I'll see if anyone else agrees with me first before going further in an explanation. :) |
I suppose this (from the FC module page) is what prompted the original idea:
There exists a FC -> Multifield module already, apparently: |
Of course, it someone really wanted field_collection for Backdrop, I imagine it could be ported without too much trouble. |
For the reocrd, I think I changed my mind. I think Paragraphs may be a replacement for field_collection. I'm working right now to see if I can migrate the data from fc->paragraphs and see if it does everything I need it to! |
That and the fact that over 22% of D7 sites use Field Collection are the reasons I started it:
It definitely still needs work. |
I'm a big fan of field collection...but I'm also a big fan of consolidation. Since paragraphs has been established in Backdrop already and was deemed the way forward in D8...it makes me wonder if focus should be on determining whether Paragraphs can be truly a 100% replacement (or not). If the answer is 'yes', then maybe time is better spent on a process to convert field collections to paragraphs, thereby leaving only one long term module to maintain (paragraphs) rather than 2. Just a thought. |
I know there's a migration path in D7 for field collection to paragraphs.
If your site is already in backdrop, perhaps that can be ported too?
…On Wed, Nov 10, 2021, 8:03 AM Bob Christenson ***@***.***> wrote:
I'm a big fan of field collection...but I'm also a big fan of
consolidation. Since paragraphs has been established in Backdrop already
and was deemed the way forward in D8...it makes me wonder if focus should
be on determining whether Paragraphs can be truly a 100% replacement (or
not). If the answer is 'yes', then maybe time is better spent on a process
to convert field collections to paragraphs, thereby leaving only one long
term module to maintain (paragraphs) rather than 2. Just a thought.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#53 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADBERZXMLXAVTDQB5XMU7TULKJWVANCNFSM4LOX6NFQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
@jenlampton It would be good if you posted any existing migration tools from fc->paragraphs. When I googled I didn't find anything usable for D7. |
I did a quick google and also came up empty. :( I'm (almost) certain I found something before. My recollection is that it was a module named fc2p (or something not entirely obvious) but I could be getting confused with something else... I'll give it a more thorough look when I have some more time. |
The only one I saw when I was poking around in the last week or two was one for D8 FC->P or D7 FC->D8 P. I did not see one for D7 FC->P, but I think @klonos saw something in some issue comment somewhere. |
I've come up with nothing as well. But I peeked at the data structure of the two to see the difficulty of creating a script.
Each field that's part of the field collection has
Each field that's part of the paragraphs has A manual process could be something like this (I haven't tried this yet):
Updating the field data:
The above query assumes the paragraph field names are the same as the field collection ones. Last step: Clean up: delete field_collection_item* tables no longer needed. Hmm... this could use some work. I'll be looking into this more in the next coming months so I'll update any progress on a script. I think part of this will always be manual compared to using the D7 to D9 Migrate which can convert the configuration. UPDATE: I've edited the list. |
I've got a bee script here for converting field collection to paragraphs: https://gist.github.com/herbdool/556b5246544868f66debcaaa0c2ed5b3. It updates the config and updates tables. It automatically creates paragraph types based on the field collection field name. A unique paragraph type per field collection field. It doesn't touch Views though doing a search and replace of field_collection to paragraphs probably goes a long ways. And you'll need to check all the paragraph settings to ensure they're set up correctly. |
I am evaluating a project that might need such conversion and would be interested in making this standard upgrade option. |
I don't I'll be able to spend more time on the script, but it should work fairly well as it is as a bee script. |
I'm interested in working on an upgrade path from Drupal 7 field collection. Is anyone else working on this, and if so, can we collaborate or would others be willing to help me test?
The text was updated successfully, but these errors were encountered: