2.6 version can't save or attach documents/files to invoice

PDF of invoices are working when attach via email and pdf invoices are viewed or downloaded in client portal.

Everything is working great so far with 2.6. Only issues I have left is attaching documents and files. I can click and upload. It shows, until I save invoice. Then gone. It doesn’t seem to be saving documents to each Invoice.

I even checked the client portal, under documents. I just get: No data available in table

Regards
Sarsenal

error logs show this:

production.ERROR: exception ‘ErrorException’ with message ‘Declaration of App\Policies\DocumentPolicy::view() should be compatible with App\Policies\EntityPolicy::view(App\Models\User $user, $item)’

I see the problem, it was introduced by automatic code cleanup included with this release.

You can fix it by changing the following line in app\policies\DocumentPolicy.php

public static function view(User $user, Document $document)

To

public static function view(User $user, $document)

That didn’t work. Now I get:

ERROR: exception ‘Symfony\Component\Debug\Exception\FatalErrorException’ with message ‘Class ‘App\Http\Controllers\Utils’ not found’ in /path/app/Http/Controllers/DocumentController.php:98 Stack trace: #0 {main}

Try removing the following code from line 98 in app/Http/Controllers/DocumentController.php

if (!Utils::hasFeature(FEATURE_DOCUMENTS)) { return; }

That worked. I was just going into that function when you replied. Nice clean code very easy to follow. Great job!

Thanks for letting us know, we’ve created a new release with the fix.

Anytime. I know you just released it. Two bugs so far not bad! Someone needs to work out the bugs.