Title: Jonathan Laukenmann's Replies | WordPress.org

---

# Jonathan Laukenmann

  [  ](https://wordpress.org/support/users/additivefx/)

 *   [Profile](https://wordpress.org/support/users/additivefx/)
 *   [Topics Started](https://wordpress.org/support/users/additivefx/topics/)
 *   [Replies Created](https://wordpress.org/support/users/additivefx/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/additivefx/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/additivefx/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/additivefx/engagements/)
 *   [Favorites](https://wordpress.org/support/users/additivefx/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form 7] Mail doesn’t get sent (External SMTP via SMTP Mailer)](https://wordpress.org/support/topic/mail-doesnt-get-sent-external-smtp-via-smtp-mailer/)
 *  Thread Starter [Jonathan Laukenmann](https://wordpress.org/support/users/additivefx/)
 * (@additivefx)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/mail-doesnt-get-sent-external-smtp-via-smtp-mailer/#post-11369622)
 * Also: How can I get any messages from your plugin so I can at least try to debug
   this?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Client Dash] Loading Script failed Errors – Path without Backslashes](https://wordpress.org/support/topic/loading-script-failed-errors-path-without-backslashes/)
 *  Thread Starter [Jonathan Laukenmann](https://wordpress.org/support/users/additivefx/)
 * (@additivefx)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/loading-script-failed-errors-path-without-backslashes/#post-11329152)
 * Hi,
 * this does not fix the problem, since it tries to match the these two strings:
 * C:/xampp/htdocs/wp-content/plugins
    C:\xampp\htdocs\wp-content\plugins\client-
   dash\core\library\rbm-field-helpers\rbm-field-helpers.php
 * You have to normalize both strings, so this is the fix you’re looking for:
 *     ```
       $plugin_dir = wp_normalize_path( WP_PLUGIN_DIR );
       $current_file_dir = wp_normalize_path ( __FILE__ );
   
       if ( strpos( $current_file_dir, $plugin_dir ) !== false ) {
       ...
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Client Dash] Loading Script failed Errors – Path without Backslashes](https://wordpress.org/support/topic/loading-script-failed-errors-path-without-backslashes/)
 *  Thread Starter [Jonathan Laukenmann](https://wordpress.org/support/users/additivefx/)
 * (@additivefx)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/loading-script-failed-errors-path-without-backslashes/#post-11318255)
 * I fixed the error for now. Since I’m using a Windows system and you are using
   string compares to prevent edge cases I run into this issue:
 * in “rbm-field-helpers-php”:
 *     ```
       if ( strpos( __FILE__, WP_PLUGIN_DIR ) !== false) {
       	define( 'RBM_FIELD_HELPERS_URI', plugins_url( '', __FILE__ ) );
       	define( 'RBM_FIELD_HELPERS_DIR', plugin_dir_path( __FILE__ ) );		
       } else {	
       	$theme_dir = get_stylesheet_directory();
   
       	// Relative path from the Theme Directory to the directory holding RBM FH
       	$relative_from_theme_dir = dirname( str_replace( $theme_dir, '', __FILE__ ) );
   
       	// Build out our Constants for DIR and URI
       	// DIR could have been made using just dirname( __FILE__ ), but we needed the difference to create the URI anyway
       	define( 'RBM_FIELD_HELPERS_URI', get_stylesheet_directory_uri() . $relative_from_theme_dir );
       	define( 'RBM_FIELD_HELPERS_DIR', $theme_dir . $relative_from_theme_dir );
       }
       ```
   
 * and this is my fix for now.
 *     ```
       //this fixes issues when comparing the string in the next step. 
       //Original result of "WP_PLUGIN_DIR" for me was C:\xampp\htdocs\wp-content/plugins" - and is being tested against a string with only "\" in it.
       $alternateString = str_replace( "/", "\\", WP_PLUGIN_DIR);
   
       if ( strpos( __FILE__, WP_PLUGIN_DIR ) !== false || strpos(__FILE__, $alternateString) !== false) {
   
       	define( 'RBM_FIELD_HELPERS_URI', plugins_url( '', __FILE__ ) );
       	define( 'RBM_FIELD_HELPERS_DIR', plugin_dir_path( __FILE__ ) );
   
       } else {
   
       	$theme_dir = get_stylesheet_directory();
   
       	// Relative path from the Theme Directory to the directory holding RBM FH
       	$relative_from_theme_dir = dirname( str_replace( $theme_dir, '', __FILE__ ) );
   
       	// Build out our Constants for DIR and URI
       	// DIR could have been made using just dirname( __FILE__ ), but we needed the difference to create the URI anyway
       	define( 'RBM_FIELD_HELPERS_URI', get_stylesheet_directory_uri() . $relative_from_theme_dir );
       	define( 'RBM_FIELD_HELPERS_DIR', $theme_dir . $relative_from_theme_dir );
   
       }
       ```
   

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