• Resolved heretiq

    (@heretiq)


    WP-ERP throws constant errors on sites with Pantheon Hosting. Here’s a sample what I’m seeing — please advise on how to correct:

    42Uncaught Exception: Table ‘pantheon.wp_erp_crm_customer_activities’ doesn’t exist in /code/wp-content/plugins/erp/vendor/tareq1988/wp-eloquent/src/Eloquent/Database.php:150 Stack trace: #0 /code/wp-content/plugins/erp/vendor/illuminate/database/Query/Builder.php(1705): WeDevs\ORM\Eloquent\Database->select(‘select * from `…’, Array, true) #1 /code/wp-content/plugins/erp/vendor/illuminate/database/Query/Builder.php(1690): Illuminate\Database\Query\Builder->runSelect() #2 /code/wp-content/plugins/erp/vendor/illuminate/database/Eloquent/Builder.php(462): Illuminate\Database\Query\Builder->get(Array) #3 /code/wp-content/plugins/erp/vendor/illuminate/database/Eloquent/Builder.php(446): Illuminate\Database\Eloquent\Builder->getModels(Array) #4 /code/wp-content/plugins/erp/modules/crm/includes/functions-customer.php(931): Illuminate\Database\Eloquent\Builder->get() #5 /code/wp-includes/class-wp-hook.php(287): erp_crm_customer_schedule_notification() #6 /code/wp-includes/class-wp-hook.php(311

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    Hi there!

    The first thing that came to mind was to check to see if that database table actually does exist. Odds are is doesn’t and that’s why it is throwing that error.

    You should be able to create it if you connect directly to the database ( https://pantheon.io/docs/mysql-access ). From the looks of things the part that creates the tables starts right here: https://plugins.trac.www.ads-software.com/browser/erp/trunk/includes/class-install.php#L307

    It might also be that it could be failing when trying to create those tables. I had to look that up since I couldn’t remember where I had seen it before but did find this: https://deliciousbrains.com/creating-custom-table-php-wordpress/

    This part in particular:

    WordPress database error Specified key was too long; max key length is 767 bytes for query

    I’ve seen it fail when the COLLATE is defined at the end of the query. I know that the native php sessions plugin doesn’t do that part ( https://github.com/pantheon-systems/wp-native-php-sessions/blob/master/pantheon-sessions.php#L191-L199 ) so that’s something to look into as well.

    Hope that helps a bit.

    Thread Starter heretiq

    (@heretiq)

    Thanks Jose. This is very helpful. It reminds me that I encountered a similar problem trying to use another wedevs product (WP Project Manager) on Pantheon hosting in the past. I believe it was related to Pantheon using InnoDB. In that case I relied on some code changes provided by wedevs, but it was brittle and the issues recurred with subsequent plugin updates. I’m hoping that in this case there is a durable solution from wedevs that doesn’t require me to patch the plugin myself.

    You are right, @jcastaneda ; Somehow the wp_erp_crm_customer_activities is missing on the installation.

    Umm, it should not be related to the Pantheon @heretiq. Though I’m not sure why this happened!

    You can try reactivating the plugin as sometimes it helps with the missing tables. Or, you can run this code on the SQL.

    Update: Code seems broken here so, submitted it on the Pastebin. URL: https://pastebin.com/RGVhpSU6

    I hope this helps and surely we’ll look up why this can happen.

    Thanks

    • This reply was modified 4 years, 3 months ago by Mehedi Hasan.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Uncaught exception’ is closed to new replies.