Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
For #1424984: Port localize.drupal.org to Drupal 7 I need OGUR 6.x ported to 7.x, this issue will track down the work being made for this goal.
If anyone has successfully made a port of OGUR, please post patches :)
Comment | File | Size | Author |
---|---|---|---|
#41 | 1565546-41-upgrade_ogur.patch | 9.01 KB | SebCorbin |
#38 | 1565546-38-ogur_upgrade_path.patch | 5.93 KB | SebCorbin |
#36 | 1565546-36-ogur_upgrade_path.patch | 5.84 KB | SebCorbin |
#30 | Screen Shot 2013-05-02 at 16.29.13.png | 8.89 KB | SebCorbin |
#28 | og-og_users_roles_update-1565546-28.patch | 5.78 KB | pgillis |
Comments
Comment #1
Gábor HojtsyCopying this in from the main upgrade issue:
Talked to @Amitaibu over IRC.
[07:42am] GaborHojtsy: amitaibu: hi
[07:42am] amitaibu: GaborHojtsy: Hi man, what's up?
[07:47am] GaborHojtsy: amitaibu: hey, I was wondering if you know of any upgrade path for og_user_roles to og 7 and/or messaging/notifications to your message module for the l.d.o D7 update?
[07:48am] amitaibu: GaborHojtsy: ogur to OG should be easier to write (no upgrde path that I know of). messaging => message would require more effort, as Message is a simple API, and the subscription logic isn't there
[07:49am] amitaibu: GaborHojtsy: about ogur -- are the roles the same in each group, or different?
[07:51am] GaborHojtsy: amitaibu: they are same, I don't think ogur allows us to have different roles for different groups
[07:53am] amitaibu: GaborHojtsy: ok, that's good, it will be easier to map the roles
[07:54am] GaborHojtsy: amitaibu: :)
[07:54am] amitaibu: GaborHojtsy: is there already a dev site with OG7 running there?
[07:55am] GaborHojtsy: amitaibu: no, not yet
[07:55am] GaborHojtsy: amitaibu: I'm trying to help connect the dot for the guys there is a d.o test site to use for this but that is still running a copy of the D6 site
[07:56am] GaborHojtsy: amitaibu: basically the two biggies we expect in the update are the ogur and messaging upgrade/migration
[07:56am] GaborHojtsy: amitaibu: the site is going to be http://d7upgrade-localize.redesign.devdrupal.org/
[07:57am] amitaibu: GaborHojtsy: i think/ hope ogur shouldn't be a big issue. Messaging is imo the bigger problem
[07:59am] GaborHojtsy: amitaibu: hm, ok
[08:01am] GaborHojtsy: amitaibu: thanks
Comment #2
amitaibuWhy not port directly to 2.x?
Comment #3
SebCorbin CreditAttribution: SebCorbin commented@Amitaibu an upgrade path exists from 6.x-2.x to 7.x-2.x?
What are the main differences between 7.x-1.x and 7.x-2.x?
Comment #4
amitaibuNo upgrade path exists.
2.x is a rewrite of 1.x based on the new improvements in D7, mostly notable:
Group
entity.Although 2.x is only in it's alpha stage, I think you should atleast have a look in it, as 1.x is mostly a bug fixes release now.
Comment #5
SebCorbin CreditAttribution: SebCorbin commentedOk so I still need to do an upgrade path from D6.
Once this is done I'll try an update to the 7.x-2.x to see if it's relevant for l.d.o
Comment #6
SebCorbin CreditAttribution: SebCorbin commentedAdded an og_migrate plugin, patched attached.
Comment #7
SebCorbin CreditAttribution: SebCorbin commentedComment #8
amitaibuThanks, I would much rather see this plugin for 2.x (which shouldn't be too hard), as 1.x is now mainly a bug fix release.
Let's add a comment about this table, that it's OGUR.
Lets add a description as-well to the plugin.
You can remove this line.
Missing dot.
Move fetchCol() one line down + Shouldn't it be fetchAll()?
This function no longer exists in 2.x. An OG role is now always assigned to the group it belongs to.
Shouldn't this be above "Create OG roles..."?
This seems to be duplicated and not needed, as we have a few lines down again.
In other places we use
foreach ($result as $row) {
as variable names.In 2.x the node is the group, so we don't need this.
Comment #9
pgillis CreditAttribution: pgillis commentedI believe I have gotten most of the migration working. Not sure if the permissions need to be migrated here or not. Uploading patch to get feedback early to make sure my approach is sound so far.
Comment #10
pgillis CreditAttribution: pgillis commentedComment #11
amitaibuthanks, but lots of tabs, and whitespaces. Can you fix/ trim them and re-roll
Comment #12
pgillis CreditAttribution: pgillis commentedSorry about that. I think this is more inline with the style guidelines.
Comment #14
pgillis CreditAttribution: pgillis commentedJust one of those days:(
Comment #15
amitaibuSorry, still tabs...
Comment #16
pgillis CreditAttribution: pgillis commentedOk, must be something happening when I'm creating the patch with git because I have updated eclipse to use spaces and they appear to be spaces in my file before the patch.
Comment #17
pgillis CreditAttribution: pgillis commentedHmm...I've attached another version of the patch. The whitespace you mentioned in #15 above is comprised of spaces. Am I still doing something wrong there? It is preserving the format of the original file. It is adding 2 additional spaces because of the required conditional.
Comment #18
amitaibuWhite space (I use Dreditor to see them)
Missing dot in end of line.
This looks wrong - "group" isn't a hardcoded bundle.
Comment #19
pgillis CreditAttribution: pgillis commentedSorry about all the whitespace!
I've updated the code per your requests. I am assuming that the group type shouldn't be hardcoded either so I am now looping over all types and their bundles.
Comment #21
pgillis CreditAttribution: pgillis commentedSigh...I will now open all my patches in vi before upload to make sure there are no ^M hidden in there!
Comment #22
amitaibuI've cleaned up a bit and committed, thank you guys!
Comment #24
amitaibu@pgillis,
Due/ Thanks to #1686394: Replace custom og-migrate with a proper integration with "Migrate" module we'll need to revisit the upgrade path. Any chance you can have a look there?
Comment #25
pgillis CreditAttribution: pgillis commentedI'll take a look.
Comment #26
pgillis CreditAttribution: pgillis commentedI have attached a patch to implement this functionality utilizing the migration module.
Comment #27
pgillis CreditAttribution: pgillis commentedsorry ignore that last patch I have to fix my git repo.
Comment #28
pgillis CreditAttribution: pgillis commentedThe attached patch should work properly against the dev line.
Comment #29
amitaibuThanks.
@SebCorbin, any chance you can confirm this patch?
Comment #30
SebCorbin CreditAttribution: SebCorbin commentedWhat if I want to use global roles instead of duplicating role for each group?
This is what happens on the l.d.o database:
Just removing the dependency over OgMigrateOgurRoles in OgMigrateOgur should do that?
Comment #31
amitaibu> What if I want to use global roles instead of duplicating role for each group?
IMO, That's actually what should happen - AFAIK OGUR didn't export roles per group, but "global" roles - no?
Comment #32
pgillis CreditAttribution: pgillis commentedI believe the patch is doing what you ask. You will notice it is passing 0 in for the gid. Having per group roles is not handled in this migration. The reason it has to copy them over to og_role is because I believe in drupal 7 you can no longer reference global roles from within og. So you need to move these global roles into the og_role with 0 as gid to make it "global" in og. Does that make sense?
Comment #33
SebCorbin CreditAttribution: SebCorbin commentedI opened another issue for this matter #1985800: Set default value of og_roles_permissions field during migration
As for this patch it works good for me.
Comment #34
amitaibuWe should probably conditionally add the Migrate handlers in og_migrate_api() if they are really needed.
Comment #35
SebCorbin CreditAttribution: SebCorbin commentedAdding tag
Comment #36
SebCorbin CreditAttribution: SebCorbin commentedRe-rolled as per #34
Comment #37
amitaibuThanks, minor issues.
Wrong indentation, also fetchCol() should be in own line.
migreate => migrate
OGUR => OG user roles (OGUR)
Comment #38
SebCorbin CreditAttribution: SebCorbin commentedRe-rolled as per #37
Comment #39
amitaibuCommitted, thanks.
Comment #40
amitaibuI missed it before committing. Can we move the files under the 7000 directory, and rename them to follow the other files?
Comment #41
SebCorbin CreditAttribution: SebCorbin commentedComment #42
amitaibuOk, last nitpick :) file should be called
og_ogur.inc
Comment #43
SebCorbin CreditAttribution: SebCorbin commentedWhy is that? Other files in this directory are named og_*.migrate.inc
Comment #44
amitaibuPatch seems wrong? Anyway, I've moved it manually, thanks.