OFFLINE-GmbH / oc-cors-plugin

Setup and manage Cross-Origin Resource Sharing headers in October CMS
MIT License
12 stars 6 forks source link

Exception in backend #6

Open chrisvidal opened 6 years ago

chrisvidal commented 6 years ago

HI,

I just installed the plugin, and when I try to set the CORS settings from the backend, I am having this popup: on line 940 of /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php

Any idea what is happening please? Thanks in advance

tobias-kuendig commented 6 years ago

Can you post the complete error? You only posted the last part of it.

chrisvidal commented 6 years ago

this is all I have inside a small popup in the backend, after clicking on " add new item". nothing in the log, last oc build.

screenshot 2018-03-14 16 20 43
tobias-kuendig commented 6 years ago

Look at your storage/system.log file and post the stack trace from there.

chrisvidal commented 6 years ago

i did look storage/logs/system.log there and it is empty

tobias-kuendig commented 6 years ago

Then check your php error logs and webserver logs. I cannot help you further with this error message since there is no information to work with.

You can modify the Application.php on line 940 and add

info('application backtrace', debug_backtrace());

before the throw statement to log the exact backtrace to the abort function.

jeremymouton commented 1 year ago

Ran into this issue a few times when deploying to a server.

The "" on line 940 of /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php error is because all backend ajax routes are returning a 403 error.

This happens if the offline_cors_settings item is missing from the system_settings table in the database.

To fix it:

This will fix the backend error and make the CORS settings editable from the backend.