Home Forums Support Use of undefined constant NINJA_VERSION – assumed 'NINJA_VERSION'

This topic contains 2 replies, has 1 voice, and was last updated by  journeyer 2 weeks, 6 days ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #22228

    journeyer
    Participant

    I am starting to see errors like these in the cron jobs

    Fri, 18 Oct 2019 15:00:02 +0000 Running SendRecurringInvoices…

    In HasEvents.php line 114:

    Use of undefined constant ACCOUNT_COMPANY_DETAILS – assumed ‘ACCOUNT_COMPANY_DETAILS’ (this will throw an Error in a future version of PHP)

    Fri, 18 Oct 2019 15:30:01 +0000 Running SendReminders…

    In HasEvents.php line 114:

    Use of undefined constant STATUS_ACTIVE – assumed ‘STATUS_ACTIVE’ (this will throw an Error in a future version of PHP)

    While trying to fix this, I tried composer install, artisan tasks such as route:cache/migrate But it made things worse and now the site will not even load!

    laravel-error file show many errors like these:
    Use of undefined constant NINJA_VERSION – assumed ‘NINJA_VERSION’ (this will throw an Error in a future version of PHP)
    Use of undefined constant ENTITY_INVOICE – assumed ‘ENTITY_INVOICE’ (this will throw an Error in a future version of PHP)

    Can you please help?

    #22230

    journeyer
    Participant

    Okay, just replying to my own post, but I removed these three files from bootstrap/cache:
    packages.php routes.php services.php

    and all the errors are gone!

    Not sure which step created those files and what the errors in those files are…

    #22342

    journeyer
    Participant

    Okay, so this error reappeared when we created new invoices which invoked emails via the queue worker. No emails were sent and the queue worker was throwing errors. The following showed up in stacktrace.log

    Use of undefined constant STATUS_ACTIVE - assumed 'STATUS_ACTIVE' (this will throw an Error in a future version of PHP): #0 /home/billing/public_html/vendor/laravel/framework/src/Illuminate/Queue/SerializesAndRestoresModelIdentifiers.php(53): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'Use of undefine...', '/home/billing/p...', 53, Array)
    #1 /home/billing/public_html/vendor/laravel/framework/src/Illuminate/Queue/SerializesModels.php(41): App\Jobs\SendInvoiceEmail->getRestoredPropertyValue(Object(Illuminate\Contracts\Database\ModelIdentifier))
    #2 [internal function]: App\Jobs\SendInvoiceEmail->__wakeup()
    ...
    

    I deleted the bootstrap/cache files (packages.php and services.php) and restarted the background worker with
    php artisan queue:restart

    and the emails started working again.

    Can anybody throw a light on this? Could this be laravel framework issue?

    This is InvoiceNinja version v4.5.15 and php version 7.3 on Ubuntu 16.04 LTS.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Posted in: