Closed argiepiano closed 2 years ago
PR #121. @olafgrabienski, if you have a chance to test this that'd be great. I've done some testing and it works fine. To test, you may want to override a couple of the OG views in the D7 installation (for example by changing the description), then do an upgrade, and check the views in the Backdrop version to check that (1) default views are installed, and (2) the overridden D7 view has not been overwritten.
if you have a chance to test this that'd be great
Happy to test the PR, not sure when I'll find the time, though – may be not before next week.
OK, since we want a release soon, I'll merge this for now. If you have a chance to test next week, feel free to reopen and we can do a bug fix later if needed.
@argiepiano I've roughly tested the upgrade with some overridden views in D7 and using the OG beta release, looks good to me!
Installing the default views (only if they don't exist in database) is desirable when upgrading - otherwise you will end up with possible broken functionality such as the Group > People table for node groups etc.
As discussed here https://github.com/backdrop-contrib/og/issues/6#issuecomment-1139126395
If we run config_install_default_config('og') in og_update_1000(), this will install the default views. The cool thing is that this will not overwrite any existing views. Since views_update_1000() (which moves views from database to config) runs BEFORE og_update_1000(), as Views is in core, this prevents the risk of overwriting an overridden OG views coming from the D7 database.
PR coming