• Resolved ilind

    (@ilind)


    Hey there. I’m getting the following error when trying to either load the default test or create a new one:

    [01-Apr-2020 15:43:44 UTC] PHP Fatal error: Uncaught fProgrammerException: The database table wp_term_taxonomy (being modelled by the class WpTesting_Model_Taxonomy) does not appear to have a primary key defined. fActiveRecord and fRecordSet will not work properly without a primary key. in /home/ktcolleg/public_html/wp-content/plugins/wp-testing/vendor/flourish/flourish/fActiveRecord.php:1181

    I check the “wp_term_taxonomy” table and it of course has a primary key. I also tried disabling other plugins but that didn’t help.

    I would appreciate any help.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter ilind

    (@ilind)

    Here’s the stack trace

    Stack trace:

    #0 /home/ktcolleg/public_html/wp-content/plugins/wp-testing/vendor/flourish/flourish/fActiveRecord.php(709): fActiveRecord->__construct()
    #1 /home/ktcolleg/public_html/wp-content/plugins/wp-testing/vendor/flourish/flourish/fORMRelated.php(1339): fActiveRecord::forceConfigure('WpTesting_Model...')
    #2 /home/ktcolleg/public_html/wp-content/plugins/wp-testing/src/Model/Test.php(669): fORMRelated::setOrderBys(Object(WpTesting_Model_Test), 'WpTesting_Model...', Array)
    #3 /home/ktcolleg/public_html/wp-content/plugins/wp-testing/vendor/flourish/flourish/fActiveRecord.php(1177): WpTesting_Model_Test->configure()
    #4 /home/ktcolleg/public_html/wp-content/plugins in /home/ktcolleg/public_html/wp-content/plugins/wp-testing/vendor/flourish/flourish/fActiveRecord.php on line 1181
    Plugin Contributor ustimenko

    (@ustimenko)

    @ilind pls check that your wordpress tables and wp-tesitng tables has same mysql engine. Seems like it differs.

    Thread Starter ilind

    (@ilind)

    @ustimenko I altered all tables to InnoDB (except for wp_term_relationships, which remained MyISAM and didn’t change for some reason). However, the problem is still there.
    I tested the plugin on another WordPress site and it worked fine. I am really confused.

    Plugin Contributor ustimenko

    (@ustimenko)

    1. Completely unisnatll plugin,
    2. Check that it’s tables are gone.
    3. Alter all wp tables to innodb.
    4. Install plugin again.

    I think some foreign keys are not created so it errors.

    Thread Starter ilind

    (@ilind)

    @ustimenko All steps followed. ‘wp_t_’ tables were correctly deleted on plugin uninstall. Re-install made the tables to be created as InnoDB as well, but it did not resolve the problem.

    Plugin Contributor ustimenko

    (@ustimenko)

    Ahh!! It could be f…n access rights! So those PK exists, but code that checking it does not have rights to check it.

    To quick proof try to run it under mysql superuser rights and then if it will work — just try to add requred grants.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Fatal PHP Error’ is closed to new replies.