is there any update in quue for bulk redirect operations?
it could be very useful, instead of fixing every 404 click by click through the ui.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | redirection_bulk_import.zip | 1.66 KB | carsonblack |
is there any update in quue for bulk redirect operations?
it could be very useful, instead of fixing every 404 click by click through the ui.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | redirection_bulk_import.zip | 1.66 KB | carsonblack |
Comments
Comment #1
noah commentedIt used to be possible to add redirects in bulk directly to the database, but now because of the hash it no longer is. Some way of importing would be extremely useful.
Comment #2
duckydan commentedYeah, I really need this too! I was just about to import tons of entries because of an unusual circumstance. But now I see my plan won't work because of the hash. Why is this done this way? I was about to dig through the module code to find how the hash is generated and maybe make a loop to generate them after the rows are added. Any guidance would be helpful.
Comment #3
duckydan commentedMaybe I am wrong, but the hash just seems to be a unique value to avoid duplicates. Perhaps if you import the redirects in bulk, including a random bunch of data for the hash, it might do the same thing. I will report back my findings.
Comment #4
simondoyle commentedI can confirm that duckydan is correct - the hash can be randomly generated - it's just used as a unique ID - so a bulk import is possible through the DB table.
Comment #5
guntervs commentedYou can use hash function provided by the module as well: redirect_hash();
I'm now working on an import module and try to use as much of the functions provided by the module itself. When I've got working code, I'll share it here.
Comment #6
carsonblack commentedAttached is a little module I wrote that will allow you to point to a CSV file of redirects (source,target) and bulk import redirects. The page to set the CSV file is at admin/config/development/redirection-bulk-import. Just make sure you have permissions to open the file.
NOTE: this is not a patch to the redirect module, it is stand-alone, but has a dependency on the redirect module.
Comment #7
ANDiTKO commented@carsonblack Many Many Thanks to you my friend!
Your module solved me two of my problems.
1) I am now able to bulk import my 1000+ urls very fast without clicking around.
2) I can now import utf8 uni-coded URLs.
Here is some tips for other people that might want to use it.
1) Download and enable the redirection_bulk_import.zip module.
2) Create your CSV file with your first column containing the "Source URI" and the second column the redirect URL. If you dont have CSV editor or you are having troubles with character encoding try Google Docs. Make a spreadsheet and download it as CSV.
3) Upload your CSV to your server location. For example upload it to "sites/default/files/redirects.csv" and write that path to the module form located at "admin/config/development/redirection-bulk-import".
4) Press the "Submit" button. If you get succsessful message then you are good to go. If not try clearing your old redirects before doing the import. Or check your CSV file. Try something small first.
Hope my tips helps ;)
Thanks again carsonblack!
Comment #8
plopescHello
There is a contributed module, Path redirect import that provide full featured bulk redirect from CSV.
Comment #9
pere orgaYes, import can be done using that module.
And at this point it would make much more sense if these type of features are implemented separately, by other contrib modules. At least until we have a stable release.