Can see expenses preview can't view

Hello all…

I have just successfully migrated my accounts from v4 to v5. SO far everything is ok(ish) just cleaning up a bit.

I do have one issue with expenses.

In v4 I used to upload a picture of the bill, these have all come over to v5, or have they?
I can see a preview of the bill and when I go tho the Documents tab, sure enough, there is a preview of the bill but, when I click to see the bill for real I get a 404 error (nginx). Hmmm.

Permissions? I don’t mind getting my hands a little dirty using ssh to fix a folder if that’s all it is.

If anyone can help I’d be delighted…

dj

Hi,

@david any thoughts what could cause this?

I can see that in expenses in v5 there is no box or button to click to upload a bill as there was in v4

Does that help?

Again many thanks

Dj

In v5 you can upload documents using the ‘Documents’ tab in the expense sidebar preview.

@hillel Doh!! Yes of course there is… Found it. The only thing about that is that you can’t add the paperwork at the moment you create the expense… You have to create the expense entry first then edit then the document tab is available.

No problem though. I can handle that.

Many thanks

Dj

That’s correct, we plan to improve this in the future…

1 Like

Very good…

Thanks

dj

Just created a new expense and uploaded a bill.

The upload was fine and the preview is there but 404 when you try to look at it.

I thought that it might be a problem with the migrated bills in expenses but you get the same 404 with a newly created expense in v5 with a document upload.

Just thought I’d keep you posted.

Best wishes etc

dj

Maybe the APP_URL value in the .env file is incorrect?

@david do you have any suggestions?

It sounds like the APP_URL isn’t correct if you are seeing a 404 when trying to preview the document, perhaps /public is missing?

@david where should I look to check on this?

Thanks very much

Dj

@deljones

There is a hidden file in the root of the project called .env

If you open this file there will be a line which starts with APP_URL, this is the url you’ll want to update.

@david Thanks David for this, however when I look at APP_URL already has the full URL.

It reads APP_URL=https://accounts.domainame.com

However, what I notice is that the line is in different colours compared to the rest of the script. I’m using OSX terminal to SSH into the server. The different colours in the line would suggest a syntax issue but I’e checked and checked and checked.

APP_URL=https:/ is in cyan. Then /accounts.domainame.com is in magenta. (Note: The two leading slashes are different colours)

The rest of the script is in green…

Help or harm?

Have a great day

dj

Hi @deljones

The coloring is just syntax highlighting of the editor, i don’t think it is having an impact on the functionality.

In regards to the APPURL, you may want to try appending /public to the end of the URL to see if that allows you to download the expenses.

@david thanks for your continued help. I appreciate it. I did the amendment as advised

APP_URL=https://accounts.domain_name.com/public

Sadly appending /public didn’t work :cry:

Best wishes

dj

@deljones

After changing the .env file, you’ll want to refresh the cache, to do this, in your browser add /update?secret=secret to the URL. and then retest the expense view.

@david No that didn’t work sadly.

I restarted the server once I did the .env edit but I also added the extra text in the browser:

https://accounts.domian_name.com/update?secret=secret

Still get the 404 when viewing and downloading. I also tried two different browsers all giving the same result.

Dj

Just to confirm what I have done so far so I don’t get lost!!!

  1. Edited the .env file and added /public to the end of APP_URL which is now: APP_URL=https://accounts.domain_name.com/public

  2. In my browser I entered: https://accounts.domain_name.com/update?y8v78sr8ufbs8uncwe=y8v78sr8ufbs8uncwe

and

https://accounts.domain_name.com/update?secret=secret (just in case I misunderstood!)

Restarted my server. Just in case

Tried another browser. Just in case

Expense bills can be seen in preview but cannot be viewed or downloaded. In case it was a migration issue from v4 to v5 I created a new expense which gave me the same result. 404.

Thanks for all your help so far. I really do appreciate it.

Dj

@deljones

When you click on the expense to via the document what is the Full URL the system tries to reach?

Hello David

I see the preview of the bill in expenses.
Click the three dots bottom right of the bills preview to show the menu.
Click “view”.
The browser opens another tab with the 404 error with the URL of:

https://accounts.domain_name.com/public/documents/Vc1R5qmXgfCMXPJwHdmysWFn088N7LpD0r3g0ZmO.jpg?inline=true

Clicking Download gives the same except without ?inline=true at the end.
https://accounts.domain_name.com/public/documents/Vc1R5qmXgfCMXPJwHdmysWFn088N7LpD0r3g0ZmO.jpg

Have a great day

Dj