Skip to content

Migrate backdrop & Drupal 7 references and Drupal 7 entityreference fields to reference.#25

Closed
moonray wants to merge 6 commits intobackdrop-contrib:masterfrom
moonray:migration
Closed

Migrate backdrop & Drupal 7 references and Drupal 7 entityreference fields to reference.#25
moonray wants to merge 6 commits intobackdrop-contrib:masterfrom
moonray:migration

Conversation

@moonray
Copy link
Copy Markdown

@moonray moonray commented Mar 12, 2018

No description provided.

@mikemccaffrey
Copy link
Copy Markdown
Member

Hey @moonray, thanks for working on this! I'm away at sxsw, but will try to check it over soon.

@jenlampton What do you think about this being the primary upgrade path? I think it makes sense to be upgrading from d7 entity reference by default, and then moving cross-upgrades from the other reference modules to a helper module.

@moonray
Copy link
Copy Markdown
Author

moonray commented Mar 13, 2018

Actually, this cross-upgrades from the backdrop references module, as well as from entityreference AND d7 references module.

@herbdool
Copy link
Copy Markdown

Is this a mandatory upgrade or optional? I'm hoping for an optional upgrade since there are reasons why people would want to use the others.

@jenlampton
Copy link
Copy Markdown
Member

jenlampton commented Mar 14, 2018

@jenlampton What do you think about this being the primary upgrade path? I think it makes sense to be upgrading from d7 entity reference by default, and then moving cross-upgrades from the other reference modules to a helper module.

When reference goes into core, we'll need to get everyone from everything else they may be using now onto reference.

However, while reference is still in contrib, it may be acceptable to provide a helper module to allow people to opt-in to using a reference field only for specific cases. To me, that just seems like extra work, and since our progress has been slow-going to date, we should be focusing on making this module core-ready, rather than planning on it being in contrib indefinitely.

Keep in mind that the "helper module" approach is what happened in D6 -> D7 with cck moving to fields in core. We can look back at that as an example of "what not to do to our users" and use this upgrade as an example of how Backdrop can do better!

Is this a mandatory upgrade or optional?

If reference module goes into core, this upgrade will be mandatory and all other modules will be marked as "merged into core" and become unsupported - just like token, pathauto, entity_view_mode, and every other module that's been replaced by a core feature.

I'm hoping for an optional upgrade since there are reasons why people would want to use the others.

@herbdool can you list any of the reasons people might want to use the others? There shouldn't be any - but if there are, we will need to address all of them before this module goes into core :)

@herbdool
Copy link
Copy Markdown

There are a number of things the other modules can do that this one cannot (so far). In the issues you'll see a list of quite a few. Here's just a sample: views relationship, using a view to filter content to be referenced, reference prepopulate, more widgets, access control, hooks, ...

I don't expect all of this to built into this module, at least not right way. But without everything the other modules can already do we shouldn't force people to use this module of the others have more functionality. IMHO

@jenlampton
Copy link
Copy Markdown
Member

jenlampton commented Mar 14, 2018

I don't expect all of this to built into this module

We'll get the 80% use-case of those covered for core.

The rest of those features will become contrib modules that extend the core reference module. Those likely won't all be ready at the time reference moves into core, but we'll have to make a decision as to whether we think its worse for some theoretical people to loose some features, or create a less ideal situation for everyone by having an icky upgrade path, or continue on with our module-selection-confusion. Let's start by seeing how close we can get with the feature list :)

@herbdool
Copy link
Copy Markdown

I don't know what you mean by "lose some features" but I think we need to avoid having a core upgrade that would remove (contrib) features on an existing site. If so people would either need to avoid the core upgrade or remove the reference module from core and then upgrade.

@olafgrabienski
Copy link
Copy Markdown
Member

we need to avoid having a core upgrade that would remove (contrib) features on an existing site

Agreed! Here's a plan: Let's

  1. document the features which are in other modules but so far not in Reference, listed by module;
  2. implement all unambigous use-cases of the list in Reference for core;
  3. see, how many controversial use-cases are left, and discuss then how to proceed, with options like these:
    3.1 Implement even the not 80% use-cases in core.
    3.2 Build a respective Reference Extra contrib module.
    3.3 Wait for various contrib modules, and make the upgrade (temporarily) optional.

@jenlampton
Copy link
Copy Markdown
Member

jenlampton commented Mar 14, 2018 via email

@olafgrabienski
Copy link
Copy Markdown
Member

No existing site is going to lose featues if things from entityreference don't make it into core.

I guess, it's more about the Backdrop References contrib module. It's quite popular.

@herbdool
Copy link
Copy Markdown

I'm going to add a comment here #16 since this is a pull request and should focus it on the code.

@mikemccaffrey
Copy link
Copy Markdown
Member

I think the conclusion from this discussion is that while reference is in contrib, and can be used alongside other reference-field-providing modules, we can't make the migration from those other fields mandatory. For now, we should stick to doing an automatic upgrade from entityreference and figure out other ways to help people convert those other fields (I'm leaning towards a reference_migrate submodule that will let people choose what fields they want to convert).

@moonray, can you please submit another pull request with just the entityreference upgrade path, and reference issue #28 which I created for just this functionality? Thanks a bunch for your work!

@jenlampton
Copy link
Copy Markdown
Member

@mikemccaffrey IMHO that's going to be a lot of wasted effort. Considering how long it took us to get any kind of upgrade path at all, it may not be worth rejecting what we have in favor of something that's going to get thrown out in the end.

@mikemccaffrey
Copy link
Copy Markdown
Member

@jenlampton What is getting thrown out in the end? I'm not sure what you are advocating against.

I do know that we can't commit the code as is, because we don't want people who install this module to have a bunch of fields supplied by other modules irrevocably altered without some additional steps added to confirm that this is what they would like to happen.

@jenlampton
Copy link
Copy Markdown
Member

jenlampton commented Mar 26, 2018

What is getting thrown out in the end?

You had mentioned...

I'm leaning towards a reference_migrate submodule that will let people choose what fields they want to convert.

That will be thrown out when reference goes into core, when we'll put back what we have right now instead.

@mikemccaffrey
Copy link
Copy Markdown
Member

@jenlampton: That will be thrown out when reference goes into core, when we'll put back what we have right now instead.

That is a discussion for another day and another issue queue. Right now, I'm focusing on getting a contrib release out so we can get people using and testing the module.

@jenlampton
Copy link
Copy Markdown
Member

Right now, I'm focusing on getting a contrib release out so we can get people using and testing the module.

That could happen without any upgrade paths at all. Baby steps?

@jenlampton
Copy link
Copy Markdown
Member

I think this should remain open until there's another upgrade path provided. I still use this on all my Drupal to backdrop upgrades. It's even harder for people to find a closed PR than a module with no release. If i struggle to find it, and I use it all the time, I can't imagine what it's like for others.

@jenlampton
Copy link
Copy Markdown
Member

No existing site is going to lose featues if things from entityreference don't make it into core. No existing site has any of those features, as entityreference doesn't exist for backdrop! :)

Well, it's too late for my perfect-world scenario because we now have an entity reference module for backdrop, as well as nodereference, as well as reference. So far, we've made the "multiple reference module" problem worse, and not better.

We now have several upgrade path issues where we can work on each update independently:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants