Closed (fixed)
Project:
Audio
Version:
5.x-2.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
30 May 2007 at 05:31 UTC
Updated:
16 Aug 2007 at 10:49 UTC
Jump to comment: Most recent file
I installed the latest audio module,
enabled audio_feeds
created a feeds view that filtered audio nodes by a certain album name, and it worked.
I then exposed the album filter, and the view worked with the default filter setting.
But as soon as I select a different album, the view does not refresh and I get the warning:
"warning: mysql_real_escape_string() expects parameter 1 to be string, array given in /home/heritage/web/drupal5/includes/database.mysql.inc on line 400."
Please help!
ktnk.
| Comment | File | Size | Author |
|---|---|---|---|
| #22 | audio_feeds_views.inc_.patch | 3.89 KB | zirafa |
| #16 | screen_grab_0.JPG | 18.38 KB | .-_-. |
| #15 | audio_revert_147888.patch | 2.03 KB | drewish |
Comments
Comment #1
zirafa commentedDo you have a link I could look at?
Comment #2
ktnk commentedHi Zirafa, I'd rather not post the link here as the site is not open yet.
Shall I contact you through the contact form at http://www.midnightparking.com/contact ?
Even when I don't get errors, I can't re-filter the view using exposed filters.
the list in the player never gets updated.
Ktnk.
Comment #3
zirafa commentedSure, you can send me the link through my drupal contact form too:
http://drupal.org/user/10692/contact
Comment #4
zirafa commentedOk I think this is related to the fact that exposed filters uses GET parameters and the flash player also uses GET parameters to generate the various feeds. I'll look into it.
Comment #5
ktnk commentedHi Zirafa, any news on this? any way I can help?
thanks,
ktnk.
Comment #6
zirafa commentedHaven't had time to look at it. I suspect the problem is related to the code used to generate the playlist URL. Because of a previous bug related to flash variable GET strings, there is a hackish workaround for the URL generation that seems to be causing this current bug.
Comment #7
zirafa commentedSee also http://drupal.org/node/159754
Comment #8
zirafa commentedUnfortunately the solution to this problem only works when clean urls are turned on. That will mean bugs for people who don't have clean urls turned on. However, that seems like a lesser problematic bug than not working with Views (since it appears most people turn clean urls on anyway).
I'll try and fix this by the end of the week, bother me if I haven't ;)
Comment #9
.-_-. commentedHi
furhter to post at http://drupal.org/node/159754
Have enabled 'clean urls' as suggested here but problem persist :(
if you can have a look into this it would be soooo apreciated as I really want this functionality.
mega thnks
Comment #10
.-_-. commentedHi Zirafa; Any progress on the 'views, exposed filters' and playlists compatibility issue. [just bugging you] - Thanks
Comment #11
.-_-. commentedany suggestions for a workaround to this problem?
Comment #12
zirafa commentedHeya,
So I played around with this a bit and realize that the problem is kinda tricky. Here's the issue:
1) views exposed filter sends arguments for filters through $_GET. These filters are then picked up and filter down through the view.
2) The one XSPF view with the flash player is actually multiple views. When you create a view and have a views url, it will operate as such:
view_url outputs a flash player loading in view_url?xspf
view_url?xspf=TRUE generates an XSPF feed of the view
view_url?m3u=TRUE generates an m3u feed of the view
view_url?pls=TRUE generates an pls feed of the view
so you can see when you load view_url, it actually just loads the flash player that you see and then loads in view_url?xspf, because the flash player is expecting an XSPF feed file. However, when using exposed filters, the GET variables don't get passed down to the XML feeds at all. What we need is for someway to actually have view_url?xspf&filter0=something to generate a filtered XSPF feed.
I could manually pick up the GET variables and pass them down through to build the correct url. It just seems like there should be an easier way to do it.
Comment #13
.-_-. commentedThanks for looking into this
how would one go about this?
could i make a custom mod that possibly uses Views API to generate the filters that i want , but then picks up the variables from the filtered results and makes them into a feed for the player?
what other possible ways could you go around this? or could it require a plugin for the Audio modules [audio_playlist_views plugin maybe]
cheers
Comment #14
zirafa commentedGood news! This was very confusing to debug, but I think I finally fixed this for good, and it turned out to be simpler than I thought. I committed the changes to HEAD. This actually fixes the links at the bottom too, which weren't getting the exposed filter values either.
Comment #15
drewish commentedit looks like that commit reversed some of the changes i'd made for #162685. the attached patch should restore it.
Comment #16
.-_-. commentedthanks for the update.
i have just done a fresh install of 5x with Views and Audio from head including the contribs and the update for the feeds module.
I created a 'test' category and added the terms 1 and 2 and enabled them for Audio node types.
I then made a new view of type 'Audio: XSPF/M3U/PLS Playlist, with a filter for 'node type Audio' and 'Taxonomy: Terms for [test]' which was an exposed filter.
It provides the correct page with the xspf player and the filter for 'test' category and the 'sumbit' button.
It nearly works for me, the 'm3u pls xspf' feeds defiantly get the filters passed to them, if i look at xspf for instance i can relate the results to the audio nodes, but the audio is not being passed to the xspf player, it just adds a grey bar with no data.
So for me, the xspf feed are getting the filter results but the player is not recieving the feed.
screen grab attached
Comment #17
zirafa commentedHey .-_-. do you have clean urls turned on? And can you view source on the page and show what is getting sent into flashvars="" for the flash player...
Comment #18
.-_-. commentedthanks for the update.
i have just done a fresh install of 5x with Views and Audio from head including the contribs and the update for the feeds module.
I created a 'test' category and added the terms 1 and 2 and enabled them for Audio node types.
I then made a new view of type 'Audio: XSPF/M3U/PLS Playlist, with a filter for 'node type Audio' and 'Taxonomy: Terms for [test]' which was an exposed filter.
It provides the correct page with the xspf player and the filter for 'test' category and the 'sumbit' button.
It nearly works for me, the 'm3u pls xspf' feeds defiantly get the filters passed to them, if i look at xspf for instance i can relate the results to the audio nodes, but the audio is not being passed to the xspf player, it just adds a grey bar with no data.
So for me, the xspf feed are getting the filter results but the player is not recieving the feed.
screen grab attached
Comment #19
.-_-. commentedthanks for the update.
i have just done a fresh install of 5x with Views and Audio from head including the contribs and the update for the feeds module.
I created a 'test' category and added the terms 1 and 2 and enabled them for Audio node types.
I then made a new view of type 'Audio: XSPF/M3U/PLS Playlist, with a filter for 'node type Audio' and 'Taxonomy: Terms for [test]' which was an exposed filter.
It provides the correct page with the xspf player and the filter for 'test' category and the 'sumbit' button.
It nearly works for me, the 'm3u pls xspf' feeds defiantly get the filters passed to them, if i look at xspf for instance i can relate the results to the audio nodes, but the audio is not being passed to the xspf player, it just adds a grey bar with no data.
So for me, the xspf feed are getting the filter results but the player is not recieving the feed.
screen grab attached
Comment #20
.-_-. commentedvery sorry about the mulitple posts, im not sure what happened, the drupal site went down a couple of times and i must have refreshed the page, oops.
+++++
I do have clean urls on.
and i reverted to rev 1.3 and do get data in the flash player.
so, if i use the updated 'Revision 1.3' from cvs, i get my origial problem with the player, which is, if any filter returns a true result it fills the flash player playlist with all nodes, but this time the xspf link does respect the filter.
Below is the page source after i applied a filter, the result should be one node, the xspf link confirms that the filter is working if i click and have a look, but there are two nodes in the playlist in the flash player
also, if i apply the patch above, the player goes blank like in the screen grab before, and the xspf link returns error
Fatal error: Cannot use object of type stdClass as array in xxxxxxx\sites\all\modules\audio\contrib\audio_feeds\audio_feeds_views.inc on line 65
Comment #21
drewish commented.-_-. is there any reason for the repost every two hours?
Comment #22
zirafa commentedTrue, it seems to still choke up when using more complex GET url strings.
Ok, well this is because I tried to encode the views exposed filter query using audio_query_string_encode, which returns an encoded string imploded with &. Then, this playlist_url is passed again through audio_query_string_encode and the ampersands become
amp;which flash chokes on since it doesn't realize the difference between it's own query string and the playlist url query string.So, this patch appears to fix the problem by imploding the playlist url query string with %26 to make sure it's not confused with the & used in the resultant flash query string.
Committed this patch to HEAD.
Comment #23
zirafa commentedDo'h. Accidentally squashed drewish's $audio->audio_file['playtime'] again. Reapplied patch #15, so should be up-to-date now.
Comment #24
.-_-. commentedyep, thats done the trick
thanks 50 million, now i can pass play list refined by taxonomy to the flash player! brilliant functionality.
the flashvars now appear;
flashvars="playlist_url=http%3A%2F%2Flocalhost%2Faudio5%2Fsearch%3Fop0%3DOR%2526filter0%5B0%5D%3D2%2526xspf
rather than;
flashvars="playlist_url=http%3A%2F%2Flocalhost%2Faudio5%2Fsearch%3Fop0%3DOR%26amp%3Bfilter0%5B0%5D%3D3%2526xspf
cheers
Comment #25
(not verified) commented