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.
Is there any effort to add an update function to move all redirects created in the Drupal 6 version of Path Redirect into the new redirect module table?
Comment | File | Size | Author |
---|---|---|---|
#24 | redirect-migrate_path_redirect_data-995844-24.patch | 5.43 KB | iamEAP |
#4 | 995844-redirect-migrate-path-redirect.patch | 4.76 KB | Dave Reid |
Comments
Comment #1
geerlingguy CreditAttribution: geerlingguy commentedFor one of my sites, I only had 4 saved redirects, so I simply copied and pasted them... but for a few sites, there are over a thousand... plus about 10-20,000 shorturls, etc. It'd be awesome if this module could have a working upgrade path from all the modules it's subsuming into D7.
Comment #2
Dave ReidIt's planned, but just not done yet.
Comment #3
geerlingguy CreditAttribution: geerlingguy commentedK. sounds good.
Comment #4
Dave ReidInitial database table migration, still haven't migrated variables, so test and use at own risk (and make backups).
Comment #5
slashrsm CreditAttribution: slashrsm commentedMIgration worked OK for my case. The only issue I had was connected with removal of path_redirect. Before migration I did not disable path_redirect and since migration removes path_redirect table site stopped working after upgrade.
Maybe we could leave path_redirect table as it was. It would be removed when one would uninstall Path redirect module anyway.
Comment #6
joelstein CreditAttribution: joelstein commented#4 works for me. I see no need to keep the path_redirect table around. I also don't see any need to keep those old update scripts around (redirect_update_1–redirect_update_5). Regardless, the patch worked great. Thanks!
Comment #7
joelstein CreditAttribution: joelstein commentedJust want to say that this update still works. Tried it in conjunction with 7.x-1.0-beta2 and everything is still swell.
Comment #8
Dave ReidYeah I realized I should have added this into rc2, but it'll get in the next release, whatever it is.
Comment #9
jwilson3Subscribe. It's odd that the dev branch is older than the beta2 release... must be pending some big feature being pushed up? I'll admit im not up to speed on the d.o project release and dev branch workflow anymore since moving to git, but it seemed strange that this wasn't already committed and available in the -dev branch.
Comment #10
antiorario CreditAttribution: antiorario commentedPatch in #4 still works from latest dev (from May 18).
Comment #11
rickmanelius CreditAttribution: rickmanelius commented@Dave Reid
You mentioned this would be rolled into the next release, but cited rc2. Does that mean it's in already in the dev branch? Or will it have to wait for a fully released next update?
Comment #12
joelstein CreditAttribution: joelstein commentedI don't see it in DEV... it hasn't been committed yet.
Comment #13
rickmanelius CreditAttribution: rickmanelius commented@joelstein.
Yup. Still not in dev. But others have tested the patch, if you're in a hurry. I'm about to test myself. I'll let you know what I find.
Comment #14
rickmanelius CreditAttribution: rickmanelius commentedActually, as per #4, variables haven't been fully ported, so this might require a little extra attention.
Comment #15
Dane Powell CreditAttribution: Dane Powell commentedsub... as mentioned, it sounds like this patch is not complete (doesn't port variables), so marking as 'needs work'. Also marking as 'major', since many, if not most, of Redirect's users are probably coming from a 6.x install.
Comment #16
Phiper CreditAttribution: Phiper commented#4: 995844-redirect-migrate-path-redirect.patch queued for re-testing.
Comment #18
Sutharsan CreditAttribution: Sutharsan commentedPatch in #4 still works with latest dev (2011-Jul-28). As I moved from Path Redirect to Redirect module, It was not clear to me that after enabling the Redirect module I must run update.php. Perhaps something to mention in the documentation (Readme or project page).
Comment #19
Dane Powell CreditAttribution: Dane Powell commentedGood point... perhaps we should actually run the conversion in hook_install, not hook_update_n...
Comment #20
rootworkIs there any progress in getting this patch rolled into a new version? I was disappointed in updating a D6 site that the path_redirect tables still aren't getting migrated. It worked just fine once I applied this patch. As others have reviewed it positively as well, I'm marking it as RTBC.
Comment #21
Dane Powell CreditAttribution: Dane Powell commentedPlease see #14 and #15- the patch is not complete, as it does not port variables... it may work for some users but won't work for everyone.
Comment #22
Dave Reid.
Comment #23
geerlingguy CreditAttribution: geerlingguy commentedThat patch will need some rewriting, as the update schema is using single digit numbers for updates now; but the functionality still works for moving all the redirects to the new {redirect} table.
Comment #24
iamEAP CreditAttribution: iamEAP commentedre #18-19
These are good points. Because we're not updating the module's schema (which is what hook_update_N()s are for anyway), this should actually just be a function called within hook_install if the path_redirect table happens to exist.
This would require writing #4 as a proper batch operation, which I don't have time for.
In the meantime, I'm attaching a patch that just builds on #4 by adding variable porting code and a line to get rid of the old path_redirect entry in the system table.
Comment #25
hedac CreditAttribution: hedac commentedthank you very much #24 works very nice for me.
One of the things that was preventing me for upgrading to drupal 7 was this issue. Now solved.
Comment #26
JohnAlbinPatch in #24 works for <50 path redirect paths. Thanks!
Comment #27
jlea9378 CreditAttribution: jlea9378 commentedPatch worked for me. I got an Internal Server Error when the updates finished running, but I think it was a fluke. All 60 records in the path_redirect table were properly migrated to the redirect table.
Comment #28
iamEAP CreditAttribution: iamEAP commentedI'll also note that I used #24 to migrate a little over 3000 redirects. Given that and the above three comments, I'm marking RTBC.
Comment #29
okokokok CreditAttribution: okokokok commentedJust imported 852 redirects. All working fine.
I already had 7 existing redirects which were retained as well.
RTBC.
Comment #30
Cynthia Ewer CreditAttribution: Cynthia Ewer commentedPatch worked perfectly, migrated 847 redirects. Marking RTBC.
Comment #31
drupalninja99 CreditAttribution: drupalninja99 commented#24 Works great for me!
Comment #32
rootworkThis has been marked as RTBC since May -- any chance we could get it committed soon? Or are there specific tests we could help run to make it commit-worthy?
Comment #33
Jaza CreditAttribution: Jaza commented#24 works perfectly for me, too. Agreed with above - this is ready to go. Commit, please!
Comment #34
PROMES#24 works perfectly for me, too. 698 redirects converted. Please commit!
Comment #35
mry4n CreditAttribution: mry4n commentedThis appears to have worked for me, too: "migrated 65 redirects".
Comment #36
Dave ReidOk I committed #24 with some code split-ups for migrating an individual redirect and migrating the variables to 7.x-1.x. Thank you so much iamEAP for helping with this issue!
http://drupalcode.org/project/redirect.git/commit/f82894d
Comment #37
rootworkHurrah!
Comment #38
Stolzenhain CreditAttribution: Stolzenhain commentedGood work! Been looking forward to this after manually migrating a page of redirects and frowning upon future database-conversions for some of our larger sites.
Comment #40
WeRockYourWeb.com CreditAttribution: WeRockYourWeb.com commentedWould someone mind explaining how the migration process works now? Do we leave path_redirect (6.x) installed, update to D7 and the latest -dev release of redirect module, and the migration happens automatically?
Comment #41
PROMESYou better never leave a module of an older version installed. Just disable path-redirect before the upgrade, but don't uninstall (because this will delete the database table).
Upgrade to D7 and enable redirect. Redirect will pick up the path-redirect database table and convert the content to the redirect table.
Comment #42
zkrebs CreditAttribution: zkrebs commented#42 - I did this, and it did not convert.
I still have the path_redirect table in Drupal DB and the Redirect table is empty (sans two I added manually).
What to do? Using the latest -dev.
Comment #43
rootworkI'm re-opening this just for slavojzizek's benefit, but I have no opinion (or relevant evidence) on whether this isn't working.
But if it doesn't get re-opened no one will ever respond to slavojzizek...
(slavojzizek if/when your question gets addressed, please re-close)
Comment #44
zkrebs CreditAttribution: zkrebs commentedI changed it to minor. I exported the path redirect table from database, did some simple formatting, then used https://drupal.org/project/path_redirect_import to import it to redirect module. Its not an automated upgrade, but it worked.
Comment #45
AaronBaumanAs of 7.x-1.0-rc1 this is working fine.
If anyone is still having issues, please provide steps to reproduce on vanilla Drupal
Comment #46
Pere OrgaYes let's put that to fixed again.
Comment #48
hass CreditAttribution: hass commentedThis upgrade does not work properly!