Support » Plugin: Redirection » Import function is broken in Redirection

  • The class Red_FileIO is defined as abstract in file_io.php, however it is being instantiated in redirection.php:294:admin_screen_options() which seems inherently wrong, and PHP doesn’t like this resulting in:

    Fatal error: Cannot instantiate abstract class Red_FileIO

    https://wordpress.org/plugins/redirection/

Viewing 15 replies - 1 through 15 (of 21 total)
  • Thread Starter pembo13

    (@pembo13)

    Changing file_io.php from

    function import( $group, $file ) {

    to

    public static function import( $group, $file ) {

    and redirection.php from

    `$importer = new Red_FileIO;

    $count = $importer->import( $_POST[‘group’], $_FILES[‘upload’] );`

    to

    $count = Red_FileIO::import( $_POST['group'], $_FILES['upload'] );

    fixes the problem.

    Thank you very much for this pembo13, we were having the same issue and this fixed it.

    For other people who might find this thread, the file_io.php file is in /models/ and redirection.php is in the root.

    I wonder why the plugin has suddenly stopped working? I have been using it for years and never had any issues.

    Thread Starter pembo13

    (@pembo13)

    It suddenly stopped working because the developer changed the Red_FileIO class to be abstract (instead of concrete), a perfectly valid move, that happened to have consequences.

    Same issue – pembo13’s fix worked perfectly.

    Thanks!

    Thankyou

    I had the same issue, thank you.

    Yep, works great. Now, all we need is a working version of the plugin…

    This did not fix it for me :(.
    I did deactivate and reactivate the plugin…

    Thread Starter pembo13

    (@pembo13)

    This did not fix it for me

    What error message are you getting now?

    Had the exact same issue, thanks Pembo13 for your solution – worked perfectly.

    Crazy that the developer hasn’t sorted this yet.

    This is working great.Thanks for the solution pembo13.

    Do not blame developer adamjames128..Sometimes they get busy with other stuff.

    This fixed the import problem for me too. Hopefully this will be merged into the new release. Thanks!

    @pembo13: this worked perfectly for me too. Thanks very much for posting a solution. I was about to tear my hair out.

    Perfect fix! Thank you, pembo13

    Thank you pembo13 for the fix, worked perfectly! 🙂

    I hope the developer will have some time to fix it in the plugin.

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘Import function is broken in Redirection’ is closed to new replies.