Title: Oops&#8230; page
Last modified: September 30, 2019

---

# Oops… page

 *  Resolved [Xonnext](https://wordpress.org/support/users/xonnext/)
 * (@xonnext)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/oops-page/)
 * Could you please add something like this in the sdm-download-request-handler.
   php. Add code between ‘// CGID start’ and ‘// CGID end’ and delete the code behind‘//
   Delete’.
 * Or something better that you can think of. Now with every update I have to manually
   change this file tot avoid your Oops page.
 * See my page on [https://cgid.nl/presentaties/](https://cgid.nl/presentaties/)
   and press [Presentatie bekijken] to see how it ends me to my own designed Oops
   page.
 * Thanks..!
 * //Check download password (if applicable for this download)
 *  $post_object = get_post( $download_id ); // Get post object
 *  $post_pass = $post_object->post_password; // Get post password
 *  if ( ! empty( $post_pass ) ) {//This download item has a password. So validate
   the password.
 *  $pass_val = $_REQUEST[ ‘pass_text’ ];
 *  if ( empty( $pass_val ) ) {//No password was submitted with the downoad request.
 *  $dl_post_url = get_permalink( $download_id );
 * // CGID start
 *  header(‘Location: /niet-gevonden’); // CGID
    exit; } // CGID
 * // CGID end
 * // Delete $error_msg = __( ‘Error! This download requires a password.’, ‘simple-
   download-monitor’ );
 * // Delete $error_msg .= ‘<p>’;
 * // Delete $error_msg .= ‘[‘ . __( ‘Click here’, ‘simple-download-monitor’ ) . ‘](https://wordpress.org/support/topic/oops-page/&apos; . $dl_post_url . &apos;?output_format=md)‘;
 * // Delete $error_msg .= __( ‘ and enter a valid password for this item’, ‘simple-
   download-monitor’ );
 * // Delete $error_msg .= ‘</p>’;
 * // Delete wp_die( $error_msg );
 * // Delete }
 *  if ( $post_pass != $pass_val ) {
 *  //Incorrect password submitted.
 * // CGID start
 *  header(‘Location: /niet-gevonden’); // CGID
    exit; // CGID
 * // CGID end
 * // Delete wp_die( __( ‘Error! Incorrect password. This download requires a valid
   password.’, ‘simple-download-monitor’ ) );
 *  } else {
 *  //Password is valid. Go ahead with the download
 *  }
 *  }
 * //End of password check
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Foops-page%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Contributor [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/oops-page/#post-11983861)
 * Hi, thank you for reaching out to us and sharing your code.
 * The plugin developers will investigate further your code and your request.
 * Kind regards
 *  Plugin Author [mra13](https://wordpress.org/support/users/mra13/)
 * (@mra13)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/oops-page/#post-11984341)
 * I will add two action hooks for password-protected downloads (when a download
   request is submitted without a password or incorrect password). You can then 
   use those action hooks to do your redirection from your custom code. It will 
   be available in the next release of the plugin.
 *  Thread Starter [Xonnext](https://wordpress.org/support/users/xonnext/)
 * (@xonnext)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/oops-page/#post-11984626)
 * Thank you for your reaction and solution..!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Oops… page’ is closed to new replies.

 * ![](https://ps.w.org/simple-download-monitor/assets/icon-128x128.png?rev=973803)
 * [Simple Download Monitor](https://wordpress.org/plugins/simple-download-monitor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-download-monitor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-download-monitor/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-download-monitor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-download-monitor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-download-monitor/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Xonnext](https://wordpress.org/support/users/xonnext/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/oops-page/#post-11984626)
 * Status: resolved