More than 3 streams [Airtime 2.2.1]: cc_pref
  • Hi everyone,

    In the table cc_pref in the airtime database, I've just setted num_of_streams to 4. If I choose 1, 2 or 3 streams, it does work perfectly. 4 or greater returns an error in Airtime when I try to reach /Preference/stream-setting. It returns:

    Undefined index: s4_enable
    #0 /usr/share/airtime/application/forms/StreamSettingSubForm.php(49): exception_error_handler(8, 'Undefined index...', '/usr/share/airt...', 49, Array)
    #1 /usr/share/airtime/application/controllers/PreferenceController.php(194): Application_Form_StreamSettingSubForm->startForm()
    #2 /usr/share/php/libzend-framework-php/Zend/Controller/Action.php(516): PreferenceController->streamSettingAction()
    #3 /usr/share/php/libzend-framework-php/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch('streamSettingAc...')
    #4 /usr/share/php/libzend-framework-php/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
    #5 /usr/share/php/libzend-framework-php/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
    #6 /usr/share/php/libzend-framework-php/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
    #7 /usr/share/airtime/public/index.php(64): Zend_Application->run()
    #8 {main}
    How to?
    Thank you for your help.
    Mr.Moka
  • 12 Comments sorted by
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    any idea ?
  • Vote Up0Vote Down MarioMario
    Posts: 2Member
    Hi,
    Any ideia about this?
    This error is still present in 2.3.1

    Any workaround/sugestions?
  • Vote Up0Vote Down Cliff WangCliff Wang
    Posts: 339Member, Sourcefabric Team
    Please check cc_stream_settings to see if s4_enable and any other rows related to s4 exist.
    Cloud Radio -> http://airtime.pro
  • Vote Up0Vote Down MarioMario
    Posts: 2Member
    Hi,

    I've created the s4_* rows (copy from s1_*)
    I can see the 4th stream in Airtime but, looks like there's something more to do...

    When I click "SAVE", I can see that there's an error in the POST:

    Undefined index: s4_data<pre>#0 /usr/share/airtime/application/forms/StreamSettingSubForm.php(227): exception_error_handler(8, 'Undefined index...', '/usr/share/airt...', 227, Array)
    #1 /usr/share/php/libzend-framework-php/Zend/Form.php(2263): Application_Form_StreamSettingSubForm->isValid(Array)
    #2 /usr/share/airtime/application/forms/StreamSetting.php(94): Zend_Form->isValid(Array)
    #3 /usr/share/airtime/application/controllers/PreferenceController.php(238): Application_Form_StreamSetting->isValid(Array)
    #4 /usr/share/php/libzend-framework-php/Zend/Controller/Action.php(516): PreferenceController->streamSettingAction()
    #5 /usr/share/php/libzend-framework-php/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch('streamSettingAc...')
    #6 /usr/share/php/libzend-framework-php/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
    #7 /usr/share/php/libzend-framework-php/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
    #8 /usr/share/php/libzend-framework-php/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
    #9 /usr/share/airtime/public/index.php(64): Zend_Application->run()
    #10 {main}</pre>
  • Vote Up0Vote Down Cliff WangCliff Wang
    Posts: 339Member, Sourcefabric Team
    That's because something in /usr/share/airtime/application/controllers/PreferenceController.php is hard-coded, please take a look at lines around 238 in that file, only 3 output streams items are allowed there.
    Cloud Radio -> http://airtime.pro
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    Hi @Cliff+Wang ,

    a good thing for futures versions will be to put this limitation directly in system/preferences (in a variable)
    nope ?
    Post edited by Albert FR at 2013-07-16 03:01:05
  • Vote Up0Vote Down Cliff WangCliff Wang
    Posts: 339Member, Sourcefabric Team
    Sure, I will create a ticket.
    Cloud Radio -> http://airtime.pro
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    You're the Best Cliff ;-)
  • Vote Up0Vote Down Cliff WangCliff Wang
    Posts: 339Member, Sourcefabric Team
    Thank you, ticket is there:
    :)
    Cloud Radio -> http://airtime.pro
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    vote for it guys !!!
  • This is a start may or may not work ,and may or maybe not tested for this version

    https://forum.sourcefabric.org/discussion/comment/34497#Comment_34497

    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.