WordPress.org

Ready to get started?Download WordPress

Forums

Redirection
Unable to export CSV (30 posts)

  1. lennel
    Member
    Posted 1 year ago #

    hi everyone,

    i've just updated to the latest version of Redirection 2.2.13 and now i'm unable to export my wordpress redirections to csv. Clicking on the csv link in the modules page just shows me the page with all the redirections.

    Can anyone help?

    http://wordpress.org/extend/plugins/redirection/

  2. jmorti
    Member
    Posted 1 year ago #

    I am having the same problem. Someone please help!

  3. cmegown
    Member
    Posted 1 year ago #

    We are also having a similar problem, when we click the CSV link we get a 404 page with a url that looks like this:

    sitename.com/wp-admin/redirection?page=redirection.php&sub=csv&module=1&token=

    Please help!

  4. exposedesign
    Member
    Posted 1 year ago #

    I'm having the same issue too - all I'm actually wanting to do is see what format it needs to be in order to import a list of redirects - does anybody have a sample csv they can post?

  5. Cardoza
    Member
    Posted 1 year ago #

    I have exactly the same problem, since last update of Redirection plugin, I can't export my modules to CSV, RSS, etc.

    When I clic on any export option, I'm redirected to the groups section.

    Send email to the creator of the plugin to notify of this big error and hope he can fix it soon.

    Contact page of the author: http://urbangiraffe.com/contact/

  6. mike.ianni@kaleidico.com
    Member
    Posted 1 year ago #

    exporting works in version 2.2.5
    Steps to fix WordPress Redirection plugin export.
    1. Create an excel csv file that looks like this..

    source target hits
    /contact/ http://mydomain.com/ 0
    /6/ /6-2/ 0
    /blog/ http://mydomain.com -

    *you can leave the hits field blank if you want
    2. save all your redirections (hopefully you don't have hundreds)
    3. uninstall version 2.2.13.
    4. install version 2.2.5 and import your csv file (call it module_1.csv)

    mike {dot} ianni {at} kaleidico {dawt} com

  7. Chritchan
    Member
    Posted 1 year ago #

    I've exactly the same problem :(

    sitename.com/wp-admin/redirection?page=redirection.php&sub=csv&module=1&token=

  8. memelab
    Member
    Posted 1 year ago #

    also having trouble with exporting from v2.2.13

  9. Chritchan
    Member
    Posted 1 year ago #

    I had to downgrade to 2.2.1O for export my datas :(

  10. bmex63
    Member
    Posted 1 year ago #

    HI Everyone,

    I was able to get it to work again by modifying the redirection.php file in the plugin folder.

    Specifically lines: 198 to 208

    function inject() {
    		$options = $this->get_options();
    
    		if ( isset($_GET['token'] ) && isset( $_GET['page'] ) && isset( $_GET['sub'] ) && $_GET['token'] == $options['token'] && $_GET['page'] == 'redirection.php' && in_array( $_GET['sub'], array( 'rss', 'xml', 'csv', 'apache' ) ) ) {
    			include dirname( __FILE__ ).'/models/file_io.php';
    
    			$exporter = new Red_FileIO;
    			if ( $exporter->export( $_GET['sub'] ) )
    				die();
    		}
    	}

    Save and then refresh the modules pages. You should be able to export successfully.

    Cheers!
    Ben

  11. lkraav
    Member
    Posted 1 year ago #

    I'm seeing this in error_log on export:

    NOTICE: wp-content/plugins/redirection/models/match.php:28 - unserialize() [function.unserialize]: Error at offset 0 of 9 bytes

  12. rashadow
    Member
    Posted 1 year ago #

    Just chiming in here to confirm that the fix suggested by bmex63 worked for me using Redirection 2.2.13 and WordPress 3.4 on my main site http://silenciobarnes.com

    Replace tools.php?page=redirection.php with just redirection.php

    After that I was able to export a CSV and view the RSS

    As for the dude that asked about the CSV format, I had the same question - if you didn't understand mike.ianni's answer it's like this

    3 Columns
    source | target | hits
    You don't have to put anything into the hits column

    I created a few test csv files and successfully uploaded them. The name of the file doesn't matter.

  13. JaredDetroit
    Member
    Posted 1 year ago #

    Thanks bmex63 for the solution and rashadow for the clarification. This fix worked for me to get the module exported.

  14. MCDIKS
    Member
    Posted 1 year ago #

    when i tried this in an csv file

    3 Columns
    source | target | hits
    You don't have to put anything into the hits column

    than it all comes in the "source" and nothing in Target and hits.

    What is wrong.

  15. JochenT
    Member
    Posted 1 year ago #

    Example CSV file:

    source,target,hits
    /category/people/free-time/,/category/people/hobbies/,0
    /category/home/kitchen/,/category/garden/flowers/,0

    If you use regular expressions which contain a ',' you have to enclose that phrase into "...":

    source,target,hits
    "(?i)/news/docs/(\d{2,})\.pdf",/wp-content/uploads/2012/07/$1.pdf,0

    This did work for me successfully.

  16. ogenox
    Member
    Posted 1 year ago #

    Thanks @bmex63 for this fix.

  17. pinman
    Member
    Posted 1 year ago #

    Thanks @bmex63 your fix worked a treat :)

  18. hotconductor
    Member
    Posted 1 year ago #

    @bmex63 - That fixed the export issue, but the file that it exports is 0kb, empty. Any thoughts?

  19. Braaad Roy
    Member
    Posted 1 year ago #

    @bmex63 wont work anymore? Any fix for it? Thanks in advance...

  20. MattV
    Member
    Posted 1 year ago #

    bmex63 fix still works, tested today with WordPress 3.4.2 and Redirection Version 2.2.13.

    You can find the code in the 10th comment of this thread.

  21. poisoned.eden
    Member
    Posted 1 year ago #

    I used bmex63's fix and it works perfectly for me.

    I'm using wordpress 3.5 and redirection version 2.2.13

  22. Ellis Benus
    Member
    Posted 1 year ago #

    @bmex63's solution does still work. Don't know why the developer hasn't fixed this yet...?

  23. Ellis Benus
    Member
    Posted 1 year ago #

    The format of the CSV is:

    source | target | hits
    /about.htm | /about/ | 0

  24. kylomylo
    Member
    Posted 1 year ago #

    More specific about bulk redirections can somebody be, pls ? Has somebody tried this lately ?
    Has the csv file a header ? How it looks like ? It has one column in csv file ?
    So I make one column with this format
    http://mydomain.com/something.html|http://mydomain.com/elsehere|

    After I imported the CSV file formated like above, I receive this message
    "200 redirections were successfully imported" but I can see where and all the URL still not redirected, and I receive 404 .

    Why it's not working ? What's wrong?

  25. gerygreen
    Member
    Posted 1 year ago #

    Redirection Export wouldn't work since there's a base root url mistake.
    all you need to do is replace tools.php?page=redirection.php with just redirection.php
    in the redirection.php file, found in the plugin editor.

  26. Devin Walker
    Member
    Posted 1 year ago #

    I'm getting 0 byte file exports, even with the fix on to change the redirection.php location. Any ideas? I'll post back if I find a solution.

  27. KZeni
    Member
    Posted 1 year ago #

    @bmex63's edit gets the file to download, but (as Devin Walker mentioned above) it's downloading a 0 byte CSV when trying to export the 404 log for me. I should mention that exporting the WordPress log works fine (not sure why that might be).

  28. bmex63
    Member
    Posted 1 year ago #

    I spent a few hours trying to fix the 0 byte issue a few months ago with no luck. We might have to wait for the original developer to publish a fix.

    Anyone on here using an alternative plugin worth recommending to others in case redirection plugin has been abandoned?

  29. Devin Walker
    Member
    Posted 1 year ago #

    http://wordpress.org/extend/plugins/404-error-monitor/ - this plugin exports to CSV upon initial review. It looks decent to me and still logs hits even with a 301 redirect on the 404 to the homepage. I'd say try this if you're stuck on the Redirection plugin

    http://wordpress.org/extend/plugins/404-error-logger/ - I haven't tried this one yet but looks very similar to the one above.

  30. boldwater
    Member
    Posted 11 months ago #

    Thank you @gerygreen! The simple fix you posted made all exports work.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic