PDFs not showing updated data

I recently noticed that after I create an invoice and then generate the PDF, if I make changes to the invoice afterwords and then view the PDF the new lines does not show on the invoice.

I recently change the QUEUE_CONNECTION=database so that the desktop software could run faster.

cronjobs:

11 0 * * * cd /home2/base/ninjaurl.co && php -d register_argc_argv=On artisan schedule:run >> /dev/null 2>&1

*/16 * * * * cd /home2/base/ninjaurl.co && /usr/bin/php -d register_argc_argv=On artisan schedule:run >> /dev/null 2>&1

Hi,

It looks like you have schedule:run twice.

You want schedule:run to run every minute and you’ll need to add the queue:work cron.

So i removed the first entry from the cron and am only left with:

** * * * cd /home2/base/ninjaurl.co && /usr/bin/php -d register_argc_argv=On artisan schedule:run >> /dev/null 2>&1

What do you mean here:

and you’ll need to add the queue:work cron.

It’s explained in the docs linked above

1 Like

I’ve added the following but the PDF is still not updating

*/5 * * * * cd /home2/ninja && php -d register_argc_argv=On artisan queue:work --stop-when-empty

@david do you have any suggestions?

try using QUEUE_CONNECTION=sync in your .env file and then update the cache.

I will try to and revert it to database afterwards.

Can you explain what could be causing this issue so it can be prevented in future as I wont like to keep the QUEUE_CONNECTION=database instead of sync

when trying to clear the cache the left sidebar load and then I get this:

Error
Bad state: No element
Bad state: No element
at Object.i (https:iinvoice.ninja.co.za/main.foss.dartjs?v=5.5.70:4694:3)
at a8J.ga4 (https:/!invoice.ninja.co.za/main.foss.dart.js?v=557O:872O3:9)
at https://invoice.ninja.co.za/main.foss.dart.js?v=5570:57450:32
at dZA.a (https://invoice.ninja.co.za/mainfossdartjs?v=5.5,70:5890:62)
at dZA$2 (https://invoice.ninjaco.za/main.fossdartjs?v=55,70:88724:14)
at Object.O (https://invoice.ninja.coza/mainfoss.dartjs?v=5.5.70:5876:1 0)
at Objectbj3 (htlps://invoice.ninja.co.za/main.foss.dart.js?v=5. 5.70:57462:10)
at ba2.C3 (https://invoice,ninja.coza/main.foss.dart.js?v=55.70:244955:3)
at ba2,b2 (https://invoiceninja.co.za/mainfoss,dart,js’v=5.5.70:244950:6)
at qaVY (https:I/invoiceninja.coza/mainfossdartjs?v=5.5.70:1 41243:34)

I replaced my name with ninja. Notice the additional “i”, the dots being replaced with commas and the forward slash being replaced by | etc…

and the heading on the top says Invoice pending