• When installing this plugin I immediately get several errors:

    404: /wp-content/plugins/secure-downloads/assets/libs/chosen/chosen.css?ver=1.1.1
    404: /wp-content/plugins/secure-downloads/assets/libs/chosen/chosen.jquery.min.js?ver=1.1

    404 means the file is not even included! The directory /libs/ is not even there.

    PHP errors:
    Undefined variable: nx_rules in /wp-content/plugins/secure-downloads/core/any/opsd-class-notices.php on line 97
    A non well formed numeric value encountered in/wp-content/plugins/secure-downloads/core/opsd-products.php on line 81
    A non well formed numeric value encountered in /wp-content/plugins/secure-downloads/core/opsd-products.php on line 81
    A non well formed numeric value encountered in /wp-content/plugins/secure-downloads/core/admin/page-send.php on line 238
    A non well formed numeric value encountered in /wp-content/plugins/secure-downloads/core/admin/page-send.php on line 235
    A non well formed numeric value encountered in /wp-content/plugins/secure-downloads/core/admin/page-send.php on line 238
    A non well formed numeric value encountered in /wp-content/plugins/secure-downloads/core/admin/page-send.php on line 250

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author wpdevelop

    (@wpdevelop)

    Hello.
    Thank you for this info.
    We will fix the all these errors in the next update of plugin.

    If you want to make this fix right now, please follow these steps.

    1) You can fix it now in actual version of plugin by making this small fix.
    Please open this file ../wp-content/plugins/secure-downloads/core/opsd-js.php
    then find this code:

    
     wp_enqueue_script( 'opsd-chosen', opsd_plugin_url( '/assets/libs/chosen/chosen.jquery.min.js'), array( 'opsd-global-vars' ), '1.1' );
    

    and replace it to this code:

    
     // wp_enqueue_script( 'opsd-chosen', opsd_plugin_url( '/assets/libs/chosen/chosen.jquery.min.js'), array( 'opsd-global-vars' ), '1.1' );
    

    2) Relative “A non well formed numeric” errors.

    2.1) Please open this file ../wp-content/plugins/secure-downloads/core/any/opsd-class-notices.php

    then find this code:

    
    echo '<strong>' . __( 'Note!', 'secure-downloads' ) . '</strong> ';
    

    and replace it to this code:

    
    				//FixIn: 1.1.2.6
    				// Rules for NGINX
    				$opsd_upload = opsd_upload();
    				$upload_path2 = $opsd_upload->get_protected_dir();
    				if ( isset( $_SERVER[ 'DOCUMENT_ROOT' ] ) )
    					$upload_path2 = str_replace( $_SERVER[ 'DOCUMENT_ROOT' ], '', $upload_path2 ); // replace document root because nginx uses path from document root
    				$nx_rules = "location " . $upload_path2 . " {\n  deny all;  \n  return 403;\n}";
    echo '<strong>' . __( 'Note!', 'secure-downloads' ) . '</strong> ';
    

    2.2) Please open this file ../wp-content/plugins/secure-downloads/core/opsd-products.php

    then find this code:

    
    $this->products[] = array( 'id' => microtime( false ) + wp_rand( 100 ), 'title' => $product_from_csv[0] );
    

    and replace it to this code:

    
    $this->products[] = array( 'id' => floatval( microtime( false ) ) + wp_rand( 100 ), 'title' => $product_from_csv[0] );  //FixIn: 1.1.2.3
    

    2.3) Please open this file ../wp-content/plugins/secure-downloads/core/admin/page-send.php

    then find this code:

    
    $options[ microtime(false) + wp_rand(100) ] = array( 'optgroup' => true, 'title' =>'', 'close' => true ) ;
    

    and replace it to this code:

    
    $options[ floatval( microtime( false ) ) + wp_rand(100) ] = array( 'optgroup' => true, 'title' =>'', 'close' => true ) ;		//FixIn: 1.1.2.3								
    

    then find this code:

    
    $options[ microtime(false) + wp_rand(100) ] = array( 'optgroup' => true, 'title' => $product_arr['title'], 'close' => false ) ;
    

    and replace it to this code:

    
    $options[ floatval( microtime( false ) ) + wp_rand(100) ] = array( 'optgroup' => true, 'title' => $product_arr['title'], 'close' => false ) ;	//FixIn: 1.1.2.3
    

    then find this code:

    
    $options[ microtime(false) + wp_rand(100) ] = array(  'optgroup' => true, 'title' =>'', 'close' => true ) ;
    

    and replace it to this code:

    
    $options[ floatval( microtime( false ) ) + wp_rand(100) ] = array(  'optgroup' => true, 'title' =>'', 'close' => true ) ;	//FixIn: 1.1.2.3
    

    Kind Regards.

    Thread Starter Stonehenge Creations

    (@duisterdenhaag)

    NOT RESOLVED!!!
    The given solution is NO solution!

    /assets/libs/chosen/ does NOT EXIST.

    Marking it as resolved, just makes me uninstall this piece of BAD coding

    Plugin Author wpdevelop

    (@wpdevelop)

    That library does not require in actual version of plugin (this code was exist as template from our other plugin). Sorry.

    That’s why I was commented that line in point #1 from my previous reply, about how to fix it.

    This fix will be also exist in next update of plugin, as well.
    Kind Regards.

    Thread Starter Stonehenge Creations

    (@duisterdenhaag)

    I will not be using this plugin! Badly coded will probably also mean security issues. I do not want to run such risks.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    @duisterdenhaag I have flagged your account temporarily. That just means that your post will need to be approved and @ notifications from you will not work.

    NOT RESOLVED!!!
    The given solution is NO solution!

    Please calm down. You are not owed a reply from the author. There is no reason for you to have an outburst. You are not a customer here and you need to remain civil.

    I will not be using this plugin! Badly coded will probably also mean security issues. I do not want to run such risks.

    Then don’t use the plugin. I’m closing this topic, you are apparently done and you do not need to be rude to the author or anyone else.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Lots of errors on install.’ is closed to new replies.