Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to add transactions. APP_URL is ignored. #485

Open
edison23 opened this issue Feb 2, 2024 · 0 comments
Open

Unable to add transactions. APP_URL is ignored. #485

edison23 opened this issue Feb 2, 2024 · 0 comments
Labels

Comments

@edison23
Copy link

edison23 commented Feb 2, 2024

Expected behavior
I can place the app into whatever directory under my domain and I can add transactions.

What should happen?
Transactions are successfully saved.

Current behavior
"Something went wrong" alert error is shown and console logs error about POST request to inexistent file (404). That's because it's trying to post to a file in root of my domain instead of its actual placement in a subfolder (which is defined in the .env config.

Steps to reproduce

  1. Place the app into a subdirectory under your domain. E.g.https://yourdomain.net/spendings.
  2. Set the .env config accordingly -- APP_URL=https://yourdomain.net/spendings.
  3. Go to https://yourdomain.net/spendings`, log in.
  4. Click Create transaction, fill in the details, select a tag, ...
  5. Click Create. The error occurs.

This is the console log:

Some cookies are misusing the recommended “SameSite“ attribute 2
GET
https://mydomain.net/twemoji-flags.css
[HTTP/1.1 404 Not Found 3ms]

GET
https://mydomain.net/livewire/livewire.js?id=90730a3b0e7144480175
[HTTP/1.1 404 Not Found 6ms]

GET
https://mydomain.net/livewire/livewire.js?id=90730a3b0e7144480175
[HTTP/1.1 404 Not Found 2ms]

Loading failed for the <script> with source “https://mydomain.net/livewire/livewire.js?id=90730a3b0e7144480175”. create:150:115
Uncaught ReferenceError: Livewire is not defined
    <anonymous> https://mydomain.net/spendings/public/transactions/create:156
create:156:5
GET
https://mydomain.net/apple-touch-icon.png
[HTTP/1.1 404 Not Found 0ms]

GET
https://mydomain.net/favicon-16x16.png
[HTTP/1.1 404 Not Found 0ms]

XHRPOST
https://mydomain.net/spendings
[HTTP/1.1 404 Not Found 12ms]

As can be seen in the log above, the app ignores the APP_URL even regarding some favicons and such, not only the mission-critical code.

I would appreciate a guide on how to place the app to a subfolder, configure the app correctly for it, and ideally also be able to get rid of the public/ folder in the path. But the last part is just a matter of redirecting, the point I care about the most is the ability to run the app in the subfolder.

BTW, it seems the app wouldn't work if placed to the root of my domain anyway, because the livewire folder is placed in vendor subfolder, not right in the root folder of the app.

Adding tags or budgets works fine. Saving an avatar does not (same incorrect path issue).

@edison23 edison23 added the bug label Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant