Client Portal page changes or sorting

Hi…
On version 5 self-hosted… logging in as a client! I cannot change pages 1…2…3… and so on or sort by unpaid/paid/Past due

any help appreciated

Hi,

@david any thoughts?

Should have mentioned v5.3.79-C78
Also tried a couple different PC’s and browsers

@freebs

you may want to check your browser console for more information. It sounds like a path issue and livewire isn’t happy.

yes… i see it now… the url is going to https://domain.com/vendor/livewire/livewire.js
It gets a 404 because it doesn’t exist

is this corrected in a rewrite rule in .htaccess ?

I’m on the same version and had the same issue. This is a bug in my eyes. To resolve this I edited the /vendor/livewire/livewire/config/livewire.php file. Edit the lines that contain asset url and app url to your domain url. Syntax should be “https://www.yourdomain.com” with the quotes. Save it. Go back to your ninja root directory and issue the following command: sudo php artisan livewire:publish and test the client portal. This forces livewire to use the correct url.

From a bug perspective: livewire should be taking whatever the defined url was issued at the setup of InvoiceNinja. This goes for any url the app needs to function. I know it works fine out of the box as a root app for the webserver and issues as a subfolder for the app. I run my as a subfolder and had to make these changes for it to work properly. Either either way hopefully this gets addressed in future upgrades to the software.

Hmm I still get this error:
GET https://mydomain.com/vendor/livewire/livewire.js?id=940557fc56b15ccb9a2d net::ERR_ABORTED 404 (Not Found)
Also now I get get this error:
uncaught ReferenceError: Livewire is not defined
at invoices:752:223

Sounds like your still cached. Run sudo php artisan optimize then test again. Also make sure your url is what your public url is on your webserver.

yes… i actually had to reboot the server…
further ahead now… livewire errors are gone now…

now when i click on next or unpaid to sort i get a 500 error
“POST mydomian.com - Ce site web est à vendre ! - Ressources et information concernant mydomian Resources and Information. 500 (Internal Server Error)”

There is no message folder in livewire

Delete the contents of the bootstrap/cache/* folder. Should help.

ok just did it…

  1. Request URL:

https://mydomian.com/invninja/public/livewire/message/invoices-table

  1. Request Method:

POST

  1. Status Code:

500 Internal Server Error

Maybe i’ll delete the cache folder and reboot… lets see…

It won’t hurt to try it.

All errors are gone now… just some report only errors

I can click on next page and unpaid … but it returns a 405 error

Screenshot_select-area_20220415132140

  1. t URL:
  1. Request Method:

POST

  1. Status Code:

405 Method Not Allowed

  1. Remote Address:

ok so now i have a 500 server error when i click on next or try sorting.
index.js:40
POST https://mydomain.com/invninja/public/livewire/message/invoices-table 500 (Internal Server Error)
Still wrong spot…

in my .env i have APP_URL as https://mydoman.com/invninja/public
my ASSET_URl is https://mydoman.com/invninja
in my livewire.php config I have set ‘asset_url’ => env(‘ASSET_URL’, null),
and ‘app_url’ => env(‘APP_URL’, null),

What am i missing here ?

this install was done using softaculous in cPanel, it did all work before updating.

Are there any details about the 500 in storage/logs?

ok really screwed it now… lol I made a typo in the livewire.php file… left off a ) bracket…

ran php artisan optimize… now i have crap…
Fatal error: Uncaught Error: Call to a member function connection() on null in /home/freebs/public_html/invninja/vendor/laravel/framework/src/Illuminate/Support/Facades/Schema.php:49 Stack trace: #0

How to fix ?? it just gets worse… :slight_smile:

It may help to delete the bootstrap/cache folder

So which vendor does asset_url point to ?

My structure is myuser/public_html/invninja/public/vendor
or /myuser/public_html/invninja/vendor
I’m assuming the one with most of the sub folders in vendor is the correct assets folder to use

@david can you please advise?

ok so path is (i’m assuming) correct.

livewire.php - asset_url ‘asset_url’ => env(‘APP_URL’, null),
.env file - APP_URL=https://mydomain.com/invninja/public

  1. Request URL:
    https://mydomainname.com/invninja/public/vendor/livewire/livewire.js?id=c69d0f2801c01fcf8166
  2. Request Method:
    GET
  3. Status Code:
    200 OK (from memory cache)
  4. Referrer Policy:
    strict-origin-when-cross-origin

Still get 500 when i change pages or sort in client portal…

  1. Request URL:
    https://mydomainname.com/invninja/public/livewire/message/invoices-table ← error here
    https://mydomianname.com/invninja/public/vendor/livewire/message/invoices-table ← just noticed this - Am I right in assuming this should be the correct url, but there is no message subfolder in livewire
  2. Request Method:
    POST
  3. Status Code:
    500 Internal Server Error

last error in my laravel.log
production.ERROR: Trying to get property ‘client’ of non-object {“exception”:"[object] (ErrorException(code: 0): Trying to get property ‘client’ of non-object at /home/freebs/public_html/invninja/app/Http/Livewire/InvoicesTable.php:86)

have to get sleep now… thanks for any input
ciao for now