Support » Plugin: The Best Price Filter for Woocommerce » SQL Error on Install with table creation

  • Resolved ryanandersonweb

    (@ryanandersonweb)


    Line 45 of the opt/OptProperties.php contains an error that stops the opt_properties_float table from being created. Attempted on 2 installs on 2 different servers.

    I created the table manually instead and now the plugin is working as expected. That line contains a variable called ‘$type’ which references ‘protected $sqlType = ‘undefined’;’. The value type in the table creation actually needs to be ‘decimal(10,2) NULL default NULL’.

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

    (@writ3it)

    @ryanandersonweb Thank you for detailed bug report. Which PHP version are you using? I will prepare bugfix.

    Thread Starter ryanandersonweb

    (@ryanandersonweb)

    Hi there, this is on PHP Version 7.3.

    Thanks

    Plugin Author writ3it

    (@writ3it)

    Hi

    thank you for the information. I need few days for preparing the bugfix.

    Plugin Author writ3it

    (@writ3it)

    @ryanandersonweb

    Hi,

    i tried to reproduce error. There is my test (I decided to confirm every issue with test) https://github.com/writ3it/the-best-price-filter-for-woocommerce/blob/bug-1/tests/Features/OptFloatPropertiesTableCreationTest.php. I used php 7.3.10. Test is passed so the error is at another place.

    I belive that problem is in SQL. Diffrent servers can use diffrent standards of SQL Queries. Could you send me a log file generated while you are installing?

    You can generate file following instructions below:
    1. Remove plugin (and remove table manually in DB).
    2. Change WP_DEBUG in wp-config.php to TRUE.
    3. Add line
    define( ‘WP_DEBUG_LOG’, true );
    at wp-config.php
    4. Try to install plugin.
    5. Send me (writ3it@gmail.com) wp-content/debug.log

    Sometimes debug.log doesn’t contains errors from table creation (it’s strange) so, please attach me dump of $sql content in OptProperties::create method and information about your mysql server (version).

    Plugin Author writ3it

    (@writ3it)

    Hi @ryanandersonweb

    I released new version with public properties. I am convinced that change makes correct overriding while inheritance. Please, let me know if it solved the problem.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘SQL Error on Install with table creation’ is closed to new replies.