Jump to content

Cannot Delete Invoices


Recommended Posts

I had a very old version of WHMCS that I had been updating for years and I started to have a lot of database collation issues.  I opted for a fresh installation a few months ago on a support-specific domain.   With the last dot update, I noted a new issue when attempting to delete invoices.  If anyone has any suggestions, I am all ears.  

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table '**************.mod_invoicedata' doesn't exist in /home/********/public_html/vendor/illuminate/database/Connection.php:331
Stack trace:
#0 /home/fpmxsprt/public_html/vendor/illuminate/database/Connection.php(331): PDO->prepare('select * from `...')
#1 /home/fpmxsprt/public_html/vendor/illuminate/database/Connection.php(664): Illuminate\Database\Connection->Illuminate\Database\{closure}('select * from `...', Array)
#2 /home/fpmxsprt/public_html/vendor/illuminate/database/Connection.php(631): Illuminate\Database\Connection->runQueryCallback('select * from `...', Array, Object(Closure))
#3 /home/fpmxsprt/public_html/vendor/illuminate/database/Connection.php(339): Illuminate\Database\Connection->run('select * from `...', Array, Object(Closure))
#4 /home/fpmxsprt/public_html/vendor/illuminate/database/Query/Builder.php(2202): Illuminate\Database\Connection->select('select * from `...', Array, true)
#5 /home/fpmxsprt/public_html/vendor/illuminate/database/Query/Builder.php(2190): Illuminate\Database\Query\Builder->runSelect()
#6 /home/fpmxsprt/public_html/vendor/illuminate/database/Query/Builder.php(2685): Illuminate\Database\Query\Builder->Illuminate\Database\Query\{closure}()
#7 /home/fpmxsprt/public_html/vendor/illuminate/database/Query/Builder.php(2191): Illuminate\Database\Query\Builder->onceWithColumns(Array, Object(Closure))
#8 /home/fpmxsprt/public_html/vendor/illuminate/database/Eloquent/Builder.php(539): Illuminate\Database\Query\Builder->get(Array)
#9 /home/fpmxsprt/public_html/vendor/illuminate/database/Eloquent/Builder.php(523): Illuminate\Database\Eloquent\Builder->getModels(Array)
#10 /home/fpmxsprt/public_html/vendor/illuminate/database/Concerns/BuildsQueries.php(143): Illuminate\Database\Eloquent\Builder->get(Array)
#11 /home/fpmxsprt/public_html/vendor/illuminate/database/Eloquent/Relations/HasOne.php(24): Illuminate\Database\Eloquent\Builder->first()
#12 /home/fpmxsprt/public_html/vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php(442): Illuminate\Database\Eloquent\Relations\HasOne->getResults()
#13 /home/fpmxsprt/public_html/vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php(414): Illuminate\Database\Eloquent\Model->getRelationshipFromMethod('snapshot')
#14 /home/fpmxsprt/public_html/vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php(370): Illuminate\Database\Eloquent\Model->getRelationValue('snapshot')
#15 /home/fpmxsprt/public_html/vendor/whmcs/whmcs-foundation/lib/Model/AbstractModel.php(0): Illuminate\Database\Eloquent\Model->getAttribute('snapshot')
#16 /home/fpmxsprt/public_html/vendor/illuminate/database/Eloquent/Model.php(1633): WHMCS\Model\AbstractModel->getAttribute('snapshot')
#17 /home/fpmxsprt/public_html/vendor/whmcs/whmcs-foundation/lib/Billing/Invoice.php(0): Illuminate\Database\Eloquent\Model->__get('snapshot')
#18 /home/fpmxsprt/public_html/vendor/illuminate/events/Dispatcher.php(369): WHMCS\Billing\Invoice::WHMCS\Billing\{closure}(Object(WHMCS\Billing\Invoice))
#19 /home/fpmxsprt/public_html/vendor/illuminate/events/Dispatcher.php(218): Illuminate\Events\Dispatcher->Illuminate\Events\{closure}('eloquent.deleti...', Array)
#20 /home/fpmxsprt/public_html/vendor/illuminate/events/Dispatcher.php(191): Illuminate\Events\Dispatcher->dispatch('eloquent.deleti...', Array, true)
#21 /home/fpmxsprt/public_html/vendor/illuminate/database/Eloquent/Concerns/HasEvents.php(188): Illuminate\Events\Dispatcher->until('eloquent.deleti...', Object(WHMCS\Billing\Invoice))
#22 /home/fpmxsprt/public_html/vendor/illuminate/database/Eloquent/Model.php(960): Illuminate\Database\Eloquent\Model->fireModelEvent('deleting')
#23 /home/fpmxsprt/public_html/admin/invoices.php(0): Illuminate\Database\Eloquent\Model->delete()
#24 {main}
Next Illuminate\Database\QueryException: SQLSTATE[42S02]: Base table or view not found: 1146 Table '****************.mod_invoicedata' doesn't exist (SQL: select * from `mod_invoicedata` where `mod_invoicedata`.`invoiceid` = 4144 and `mod_invoicedata`.`invoiceid` is not null limit 1) in /home/*************/public_html/vendor/illuminate/database/Connection.php:671
Stack trace:
#0 /home/fpmxsprt/public_html/vendor/illuminate/database/Connection.php(631): Illuminate\Database\Connection->runQueryCallback('select * from `...', Array, Object(Closure))
#1 /home/fpmxsprt/public_html/vendor/illuminate/database/Connection.php(339): Illuminate\Database\Connection->run('select * from `...', Array, Object(Closure))
#2 /home/fpmxsprt/public_html/vendor/illuminate/database/Query/Builder.php(2202): Illuminate\Database\Connection->select('select * from `...', Array, true)
#3 /home/fpmxsprt/public_html/vendor/illuminate/database/Query/Builder.php(2190): Illuminate\Database\Query\Builder->runSelect()
#4 /home/fpmxsprt/public_html/vendor/illuminate/database/Query/Builder.php(2685): Illuminate\Database\Query\Builder->Illuminate\Database\Query\{closure}()
#5 /home/fpmxsprt/public_html/vendor/illuminate/database/Query/Builder.php(2191): Illuminate\Database\Query\Builder->onceWithColumns(Array, Object(Closure))
#6 /home/fpmxsprt/public_html/vendor/illuminate/database/Eloquent/Builder.php(539): Illuminate\Database\Query\Builder->get(Array)
#7 /home/fpmxsprt/public_html/vendor/illuminate/database/Eloquent/Builder.php(523): Illuminate\Database\Eloquent\Builder->getModels(Array)
#8 /home/fpmxsprt/public_html/vendor/illuminate/database/Concerns/BuildsQueries.php(143): Illuminate\Database\Eloquent\Builder->get(Array)
#9 /home/fpmxsprt/public_html/vendor/illuminate/database/Eloquent/Relations/HasOne.php(24): Illuminate\Database\Eloquent\Builder->first()
#10 /home/fpmxsprt/public_html/vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php(442): Illuminate\Database\Eloquent\Relations\HasOne->getResults()
#11 /home/fpmxsprt/public_html/vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php(414): Illuminate\Database\Eloquent\Model->getRelationshipFromMethod('snapshot')
#12 /home/fpmxsprt/public_html/vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php(370): Illuminate\Database\Eloquent\Model->getRelationValue('snapshot')
#13 /home/fpmxsprt/public_html/vendor/whmcs/whmcs-foundation/lib/Model/AbstractModel.php(0): Illuminate\Database\Eloquent\Model->getAttribute('snapshot')
#14 /home/fpmxsprt/public_html/vendor/illuminate/database/Eloquent/Model.php(1633): WHMCS\Model\AbstractModel->getAttribute('snapshot')
#15 /home/fpmxsprt/public_html/vendor/whmcs/whmcs-foundation/lib/Billing/Invoice.php(0): Illuminate\Database\Eloquent\Model->__get('snapshot')
#16 /home/fpmxsprt/public_html/vendor/illuminate/events/Dispatcher.php(369): WHMCS\Billing\Invoice::WHMCS\Billing\{closure}(Object(WHMCS\Billing\Invoice))
#17 /home/fpmxsprt/public_html/vendor/illuminate/events/Dispatcher.php(218): Illuminate\Events\Dispatcher->Illuminate\Events\{closure}('eloquent.deleti...', Array)
#18 /home/fpmxsprt/public_html/vendor/illuminate/events/Dispatcher.php(191): Illuminate\Events\Dispatcher->dispatch('eloquent.deleti...', Array, true)
#19 /home/fpmxsprt/public_html/vendor/illuminate/database/Eloquent/Concerns/HasEvents.php(188): Illuminate\Events\Dispatcher->until('eloquent.deleti...', Object(WHMCS\Billing\Invoice))
#20 /home/fpmxsprt/public_html/vendor/illuminate/database/Eloquent/Model.php(960): Illuminate\Database\Eloquent\Model->fireModelEvent('deleting')
#21 /home/fpmxsprt/public_html/admin/invoices.php(0): Illuminate\Database\Eloquent\Model->delete()
#22 {main}

 

Edited by DigitalAssassin
masked path data
Link to comment
Share on other sites

On 06/03/2021 at 23:26, DigitalAssassin said:

If anyone has any suggestions, I am all ears.  

how are your SQL skills?

there is a file in /resources/sql/install/mod_invoicedata.schema.sql that I think could be used (via phpmyadmin or similar) to create the missing database table.... one created, that should solve the missing table problem.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated