Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

local.ERROR: Cannot redirect to an empty URL. #33

Open
flyingferret opened this issue Jan 16, 2021 · 5 comments
Open

local.ERROR: Cannot redirect to an empty URL. #33

flyingferret opened this issue Jan 16, 2021 · 5 comments

Comments

@flyingferret
Copy link

Been using the plugin for > year. Today got reported that the forums were down. Looking at the logs we are getting

local.ERROR: Cannot redirect to an empty URL.

Checked my .env varibles and they all look good (unchange)

Please help!

Stacktrace https://pastebin.com/LDXwJ2kg

| Vendor          | Package Name           | Installed Version |
| --------------- | ---------------------- | ----------------- |
| eveseat         | api                    | 3.0.8             |
| eveseat         | console                | 3.0.6             |
| eveseat         | eveapi                 | 3.0.22            |
| eveseat         | notifications          | 3.0.6             |
| eveseat         | services               | 3.0.11            |
| eveseat         | web                    | 3.0.28            |
| flyingferret    | seat-whtools           | 0.2.0             |
| herpaderpaldent | seat-groups            | 1.7.2             |
| kassie          | calendar               | 3.0.16            |
| warlof          | seat-connector         | 1.4.5             |
| warlof          | seat-discord-connector | 4.0.6             |
| warlof          | seat-teamspeak         | 4.1.2             |

SeAT Discourse version 11.0

@herpaderpaldent
Copy link
Owner

On my mobile but according to the errorstack its because of this line

return redirect()->away(env('DISCOURSE_URL'));

So the env variable seems to be empty ... are you using docker?

@flyingferret
Copy link
Author

No we're not using a docker install, think this was caused when fixing issues with another plugin the command php artisan config:cache was run. But not sure on the repair, the .env file was untouched

@flyingferret
Copy link
Author

Talking with other Devs have had the following conversation.

kalaik utama 12:14 PM
@warlof Tutsimo folllowing running the command php artisan config:cache it seems some of my env varibles have been cleared :S and broken my discourse plugin. Although the .env are untouched the line
return redirect()->away(env('DISCOURSE_URL'));
is returning null....eeep

Warlof Tutsimo 12:15 PM
env shouldn't be call outside config files
12:15
especially since once config is cached, env is non longer used 😛

kalaik utama 12:15 PM
rodger

Warlof Tutsimo 12:15 PM
php artisan config:clear will drop existing cached config
12:16
yeah
12:16
it's reason why it has been changed long time ago in SeAT 3

kalaik utama 12:16 PM
sorry to be a pain , just trying to get it back working for my alliance and pulling my hair out
12:17
so if i run config:clear we should be back to square one ?

Warlof Tutsimo 12:17 PM
https://laravel.com/docs/8.x/configuration#configuration-caching
12:18
yeah, since there we no more cached configuration, dotenv will always reload data from $_ENV and .env file (edited)

kalaik utama 12:18 PM
thank you will try that again now, and will put this note on the issue i have raised with that plugin

Warlof Tutsimo 12:19 PM
and for timeline, here is initial fix on web repo eveseat/web@e21361a
12:19
should also have a few in eveapi package and others

kalaik utama 12:19 PM
thanks pal

@herpaderpaldent
Copy link
Owner

Yeah fair, when i created the package 2 years ago i was fairly inexperienced so this one of these bugs.

Using the resource warlof gave you, you could write a PR which would fasten the development significantly.

@herpaderpaldent
Copy link
Owner

herpaderpaldent commented Jan 18, 2021

allright i got a fix: are you able to change your composer.json to require it?

herpaderpaldent/seat-discourse: "dev-fix/evn"

should do it. I have no application running to test it myself therefore before merging and tagging the fix i need you to confirm its working.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants