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

Simplify configuration file structure #253

Merged
merged 2 commits into from
Aug 6, 2017

Conversation

hairmare
Copy link
Member

This removes most of the legacy upstream config madness by not using
weird config files spread all over the place.

This isn't the solution to other config reading fragility issues, but
it does move the whole config back to the central airtime.conf file.

This removes most of the legacy upstream config madness by not using
weird config files spread all over the place.

This isn't the solution to other config reading fragility issues, but
it does move the whole config back to the central airtime.conf file.
@Robbt
Copy link
Member

Robbt commented Aug 5, 2017

I was testing this out and ran into a CORS issue. It no longer showed the localhost:8080?config page but instead gave a white screen and the following was in the /var/log/zendphp.log

2017-08-05T22:27:52+00:00 INFO (6): localhost You must explicitly start the session with Zend_Session::start() when session options are set to strict.
2017-08-05T22:27:53+00:00 INFO (6): localhost Checking autoplaylist poll
2017-08-05T22:27:53+00:00 INFO (6): localhost Checking to run Auto Playlist
2017-08-05T22:28:00+00:00 INFO (6): localhost Database error: SQLSTATE[23505]: Unique violation: 7 ERROR: duplicate key value violates unique constraint "cc_pref_subj_key_idx"
DETAIL: Key (subjid, keystr)=(1, library_datatable) already exists.
2017-08-05T22:28:00+00:00 ERR (3): localhost [ErrorController.php:26 - errorAction()] - Forbidden
2017-08-05T22:28:00+00:00 ERR (3): localhost [ErrorController.php:27 - errorAction()] - #0 /vagrant/airtime_mvc/application/controllers/LoginController.php(27): CORSHelper::enableCrossOriginRequests(Objec
t(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#1 /vagrant/vendor/zendframework/zendframework1/library/Zend/Controller/Action.php(516): LoginController->indexAction()
#2 /vagrant/vendor/zendframework/zendframework1/library/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('indexAction')
#3 /vagrant/vendor/zendframework/zendframework1/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_
Http))
#4 /vagrant/vendor/zendframework/zendframework1/library/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
#5 /vagrant/vendor/zendframework/zendframework1/library/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()
#6 /vagrant/airtime_mvc/application/airtime-boot.php(84): Zend_Application->run()
#7 /vagrant/airtime_mvc/public/index.php(68): require_once('/vagrant/airtim...')
#8 {main}
2017-08-05T22:28:00+00:00 ERR (3): localhost [ErrorController.php:54 - errorAction()] - An internal application error has occurred.: exception 'Zend_Controller_Action_Exception' with message 'Forbidden' i
n /vagrant/airtime_mvc/application/common/CORSHelper.php:15
Stack trace:
#0 /vagrant/airtime_mvc/application/controllers/LoginController.php(27): CORSHelper::enableCrossOriginRequests(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#1 /vagrant/vendor/zendframework/zendframework1/library/Zend/Controller/Action.php(516): LoginController->indexAction()
#2 /vagrant/vendor/zendframework/zendframework1/library/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('indexAction')
#3 /vagrant/vendor/zendframework/zendframework1/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_
Http))
#4 /vagrant/vendor/zendframework/zendframework1/library/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
#5 /vagrant/vendor/zendframework/zendframework1/library/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()
#6 /vagrant/airtime_mvc/application/airtime-boot.php(84): Zend_Application->run()
#7 /vagrant/airtime_mvc/public/index.php(68): require_once('/vagrant/airtim...')
#8 {main}

@hairmare
Copy link
Member Author

hairmare commented Aug 5, 2017

CORS should already be ok on master, this change was branched before we merged the recent CORS rework. If it's affecting you on localhost it looks like CORS rules are getting stricter in browsers 😕 I think the CORS Forbidden is a red herring here since you actually shouldn't get to the ErrorController in the first place.

I don't really understand where the db error at the top of the trace is coming from, it seems to be responsible for what I'm assuming to be a sad tape.

Database error: SQLSTATE[23505]: Unique violation: 7 ERROR: duplicate key value violates unique constraint "cc_pref_subj_key_idx"
DETAIL: Key (subjid, keystr)=(1, library_datatable) already exists.

It looks like #122 is acting up for some reason. Could you double check if clearing the local storage or using a private browser window changes anything?

I'll give this another try to see if I can get it to break locally as well.

@Robbt
Copy link
Member

Robbt commented Aug 6, 2017

OK, so I tried again and didn't have an issue. Perhaps I just needed to reload my web browser and so the error isn't related to this change at all.

@Robbt Robbt merged commit bd845a0 into libretime:master Aug 6, 2017
@hairmare hairmare deleted the feature/refactor-config-structure branch August 6, 2017 08:57
@hairmare hairmare added this to the 3.0.0-alpha.3 milestone Sep 20, 2017
@lock
Copy link

lock bot commented Oct 20, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please chat to us on discourse or ask for help on our chat if you have any questions or need further assistance with this issue.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants