Jump to:

7939 Posts in 1472 Topics by 944 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » MP3 files in single audio player (xml/ playlist)

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2
Go to End
Author Topic: 3603 Views
  • CHD
    Avatar
    Community Member
    217 Posts

    Re: MP3 files in single audio player (xml/ playlist) Link to this post

    Done it!!!

    i had to change it to:

       <% control AudioFiles %>
       <file path="$File.URL" AudioTitle="$AudioTitle.EscapeXML" Description="$Description.EscapeXML" />
       <% end_control %>   

    now look at my xml
    http://www.silentrepublic.com/listen/xml?flush=1

    thank you SO much UC.

    now i just need to work out how to make this work with a different player!

  • CHD
    Avatar
    Community Member
    217 Posts
  • CHD
    Avatar
    Community Member
    217 Posts

    Re: MP3 files in single audio player (xml/ playlist) Link to this post

    Hi again UC.

    so i got that all working... but theres an underlying problem
    since i added dataobject manager, uploadify and image_gallery... it seems to conflict somehow with the main CMS.

    for example, when i click on "files & images" there are often LOTS of folders called "PhotoAlbums" and it doesnt like opening them.
    when i click on "uploads" i got this error in a pop up:

    ERROR [User Error]: Bad RecordClassName '' and $baseClass not set
    IN POST /admin/assets/getitem?ID=499&ajax=1
    Line 2761 in /home/vhosts/silentrepublic.com/httpdocs/sapphire/core/model/DataObject.php

    Source
    ======
    2752:      foreach($records as $record) {
    2753:         if(empty($record['RecordClassName'])) {
    2754:            $record['RecordClassName'] = $record['ClassName'];
    2755:         }
    2756:         if(class_exists($record['RecordClassName'])) {
    2757:            $results[] = new $record['RecordClassName']($record);
    2758:         } else {
    2759:            if(!$baseClass) {
    2760:               user_error("Bad RecordClassName '{$record['RecordClassName']}' and "
    * 2761:                  . "\$baseClass not set", E_USER_ERROR);
    2762:            } else if(!is_string($baseClass) || !class_exists($baseClass)) {
    2763:               user_error("Bad RecordClassName '{$record['RecordClassName']}' and bad "
    2764:                  . "\$baseClass '$baseClass not set", E_USER_ERROR);
    2765:            }
    2766:            $results[] = new $baseClass($record);
    2767:         }

    Trace
    =====
    <ul>user_error(Bad RecordClassName '' and $baseClass not set,256)
    line 2761 of DataObject.php

    DataObject->buildDataObjectSet(MySQLQuery,DataObjectSet)
    line 470 of TableListField.php

    TableListField->sourceItems()
    line 273 of ComplexTableField.php

    ComplexTableField->FieldHolder()
    line 266 of DataObjectManager.php

    DataObjectManager->FieldHolder()
    line 34 of AssetManager.php

    AssetManager->FieldHolder()
    line 369 of ViewableData.php

    ViewableData->obj(FieldHolder,,,1)
    line 446 of ViewableData.php

    ViewableData->XML_val(FieldHolder,,1)
    line 73 of .cache.home.vhosts.silentrepublic.com.httpdocs.sapphire.templates.TabSetFieldHolder.ss

    include(/tmp/silverstripe-cache-home-vhosts-silentrepublic.com-httpdocs/.cache.home.vhosts.silentrepublic.com.httpdocs.sapphire.templates.TabSetFieldHolder.ss)
    line 420 of SSViewer.php

    SSViewer->process(Object id #39)
    line 342 of ViewableData.php

    ViewableData->renderWith(TabSetFieldHolder)
    line 80 of TabSet.php

    TabSet->FieldHolder()
    line 369 of ViewableData.php

    ViewableData->obj(FieldHolder,,,1)
    line 446 of ViewableData.php

    ViewableData->XML_val(FieldHolder,,1)
    line 77 of .cache.home.vhosts.silentrepublic.com.httpdocs.sapphire.templates.Includes.Form.ss

    include(/tmp/silverstripe-cache-home-vhosts-silentrepublic.com-httpdocs

    it goes on but the rest is off screen and i cant highlight it!

    anyway, i did a dev/build which wiped all the empty "PhotoAlbums" but now my audio player xml feed has died!

    http://www.silentrepublic.com/listen/xml?flush=1

    all the audio file urls are blank.

    any ideas?

  • CHD
    Avatar
    Community Member
    217 Posts

    Re: MP3 files in single audio player (xml/ playlist) Link to this post

    just checked my DB and the classnames of audio files are blank. where do i look to find the problem there?

  • UncleCheese
    Avatar
    4085 Posts

    Re: MP3 files in single audio player (xml/ playlist) Link to this post

    Nice work!!

    --------------------
    SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com

  • CHD
    Avatar
    Community Member
    217 Posts

    Re: MP3 files in single audio player (xml/ playlist) Link to this post

    sorry ignore that!
    i was looking in "file" table, not "AudioFile" audiofile table looks fine... so no idea what the problem is.
    also, when i go into uploads via "files and images" (and i get past the error popup) i cant save the folder after edit?
    plus, when i go into the "audio" tab in my CMS i cant open the "upload" folder to select files that have alredy been uploaded...it just shows the loading image indefinitely.

    any ideas?

    3603 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.