Tuesday, November 25, 2008

Re: Help with cake and soundmanager2: SOLUTION

So I found out what was causing the problem, but I'm not sure why. Maybe someone can help me with that.

Basically it was the navigation links I had in the default layout. I had
<? echo $html->link('All Songs', '/songs/'); ?>
instead of
<? echo $html->link('All Songs', '/songs'); ?>

I was trying to get to the index controller and in a haze of late night over-caffeinated-ness I left a '/' on the end of the link. It would still bring up the index view, but for some reason it was not running the soundmanager javascript files even thought they were being put into the view. ?? 

All good now, but if anyone can shed some light as to why it would still render the page and not run the javascript I would love to know.

Thanks



On Nov 25, 2008, at 11:03 AM, Jay Reeder wrote:

We're using Soundmanager2 in a Cake app w/ajax and it's working fine.  Do you have debugging turned on?  There are a number of things that could be causing your issue.

Try turning on debugging and also try turning off .useHighPerformance in the soundmanager2.js file (it creates problems with some browsers).

On Tue, Nov 25, 2008 at 11:55 AM, farfignugin <drewpearson1@gmail.com> wrote:

I'm putting together a cake app with an inline mp3 player using
soundmanager2 similar to this demo: http://www.schillmania.com/projects/soundmanager2/demo/page-player/
. I'm using <?php echo $scripts_for_layout; ?> to get the
soundmanager2 javascripts into the head, and everything works fine
when a page is first pulled up, but when I link to a different
controller <? echo $html->link('Song by Genre', '/genres/'); ?> or  <?
echo $html->link('All Songs', '/songs/'); ?> from the navigation I put
in the default layout, the javascripts are not working properly. Is it
possible that cake isn't reloading the entire page. I have view
caching turned off site wide. (//core.php Configure::write
('Cache.disable', true);)

If I don't use the navigation i put in the default layout and just
type the controller and action name into the browser manually it works
fine.

any help would be much appreciated. I'm stuck.










--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: