• Resolved Venutius

    (@venutius)


    Hi there,

    There’s some errors in your code:

    in class-links-list-table.php line 51 there’s

        $filename = $wpdb->get_var( 
          "SELECT filename FROM wp_dispatcher_uploads WHERE id = {$item['upload_id']}"
         );
    

    This should be something like this:

        $filename = $wpdb->get_var( 
          "SELECT filename FROM {$wpdb->prefix}dispatcher_uploads WHERE id = {$item['upload_id']}"
         );
    

    also line 110 of class-wp-dispatcher-downloader.php is this:

          else {
            $upload = $wpdb->get_row("SELECT * FROM wp_dispatcher_uploads WHERE id = {$link->upload_id}");
            $count = $upload->count + 1;
            $wpdb->update( 
              'wp_dispatcher_uploads', 
              array( 'count' => $count ), 
       

    Shouldn’t that be more like:

          else {
            $upload = $wpdb->get_row("SELECT * FROM {$wpdb->prefix}dispatcher_uploads WHERE id = {$link->upload_id}");
            $count = $upload->count + 1;
            $wpdb->update( 
              $wpdb->prefix . 'dispatcher_uploads', 
              array( 'count' => $count ), 
       
Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Venutius

    (@venutius)

    Yep just tried it, all working now

    Plugin Author ekndev

    (@ekndev)

    Hey there,
    thank you for the fix ??
    I have pushed a new version 1.2 covering your code changes.

    Hi, my website updated to version 1.2 automatically, and was the WP-dispatcher URL’s were no longer working. (They would download an empty wp-dispatcher file)

    Looking at the update here, it could be that my uploaded files were longer in the table being queried, so I tried uploading a new file as a test. This also didn’t work unfortunately.

    I’m very inexperienced in WordPress, but was able to manually revert the change (going back to 1.1) and that seems to work for now. Do you have any idea why this could be?

    Plugin Author ekndev

    (@ekndev)

    Hey,
    thank you for the report. There was a terrible mistake in the last update. Now it has been corrected. Sorry for any problems caused!

    Hi Ekin, just updated again and wanted to confirm your update works for me. Thanks for the quick response!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Database Errors’ is closed to new replies.