WordPress.org

Ready to get started?Download WordPress

Forums

Audio Player
Podpress broke Audio Player? (13 posts)

  1. scythe000
    Member
    Posted 3 years ago #

    I have WordPress 3.1 with the latest podpress and Audio Player 2.0.41. It seems when I installed Podpress, all my old posts no longer show the Audio Player when the code is there i.e. [audio:file.mp3].

    Any suggestions? I need both to work.

  2. ntm
    Member
    Posted 3 years ago #

    I have installed the WP Audio Player plugin and tried reproduce the situation in order to find the problem and its cause. But with the default settings of the WP Audio Player plugin and my podPress settings, I was not able to reproduce the problem. In other words both plugin should work simultaneously in one blog (at least under certain circumstances).

    Maybe post your general settings of the WP Audio Player plugin.

    But I have some question:

    all my old posts no longer show the Audio Player when the code is there i.e. [audio:file.mp3]

    Does this problem occur only in older posts? How old? What is different in the newer posts?

    The player is not there. But can you see the [audio: ... ] place-holder instead? Or is there only a empty line where player should be?

    Please open the Javascript error console of your web browser and load a blog page with a post which contains such an Audio Player element. Does the error console show errors?

    Regards,
    Tim

  3. scythe000
    Member
    Posted 3 years ago #

    Thanks for the quick response, ntm!
    I should clarify, we aren't using the Audio Player in the new posts - Just PodPress, but we still need it to work for the old posts using it.

    I tried a test post with the code snippet. The code doesn't show, but a blank line or two appears as if the player were trying to load.

    In IE9, it even tells me I need to install Flash, but Flash is installed just fine. A sample post is here:
    http://brainstorminonline.com/test/

    Here's some output from FireBug:

    <div class="content">
    <div class="post-title">
    <div class="post-date">
    <div class="post-excerpt"></div>
    <p class="audioplayer_container">
    <p class="fb-like">
    <fb:share-button class=" FB_share_button FB_ElementReady" type="box_count" href="http://brainstorminonline.com/test/">
    <p>Related posts:</p>
    <ol>
  4. scythe000
    Member
    Posted 2 years ago #

    Anybody?

  5. ntm
    Member
    Posted 2 years ago #

    Thank you for the URL to your test post.

    The error console shows an error:

    Error: N.width is undefined
    Source: http://brainstorminonline.com/wp-content/plugins/podpress/players/1pixelout/1pixelout_audio-player.js
    Line: 6

    This is an unusual error and it has maybe something to do with you theme or a different plugin. I think that because the Javascript section of podPress which you can find in in the <head> section of your blog pages is doubled. That may lead to the error.
    I use in my test blogs the Twenty Ten, Twenty Eleven and the K2 theme and a few plugins but such a doubled script section is in none of my test blogs.
    I have no good explanation. There are various possibilities why this happens.
    But you could try to find out whether a different plugin interferes with podPress (or vice versa) by deactivating the other plugins (other than podPress and WP Audio Player) and reloading the test post. If the problem disappears (and the WP Audio Player appears) then activate one plugin after another and look whether it makes a difference.
    When I know which combination causes the problem, I might be able to reproduce the problem and fix it in the end.

  6. scythe000
    Member
    Posted 2 years ago #

    Dang, maybe we can get a PodPress person to look at this...

  7. ntm
    Member
    Posted 2 years ago #

    Well, I am a podPress person.

    Some errors occur only in combination of with certain themes or plugins. It is impossible to test all of them. That is why I test at least with the most popular themes and some other plugins.
    Further so far I haven't seen this error before and that is why I can only guess what is wrong. But there is one thing I can tell for sure and that is that this error does not occur in all blogs with this podPress version. The most likely reason for that is probably another plugin which you are using (or maybe the theme). Well, obviously in interaction of podPress and another plugin.
    Sometimes an error message is enough to know what is wrong. But like this time it is not enough and I need to know more about the circumstances in order to make changes which will help to avoid this situation. ... and since I don't know which plugins with which settings you are and your theme is unfortunately a non-free theme, it is not possible to reproduce, find and fix the error - at least not without your help.
    That is why it would be great if you could test yourself if one of your plugins is responsible for the doubled section in the <head> sections of your blog pages. It would also be interesting to know the code of the header.php and the index.php or the single.php of your theme. (If you want to post this code then please use one of the pastebin services and post the link(s) here)

  8. scythe000
    Member
    Posted 2 years ago #

    Gotcha. here's:
    header.php: http://tinypaste.com/343087
    index.php: http://tinypaste.com/b8f59
    single.php: http://tinypaste.com/aa4c09

    Thank you so much for your help!

  9. ntm
    Member
    Posted 2 years ago #

    The 3 content of these files looks fine.

    But I have made tests (which you could have done easily, too) and installed e.g the plugin WordPress Popular Posts (v2.1.4).
    I could observe exactly the same effect as in your blog right after the activation of this plugin: the podPress script section was twice in the head section of the page and the JS error occurred too.

    If you deactivate this plugin, the problem should go away.

    I will try to find out what this plugin does and why it does what it does. But this might take while.
    You may report this to the author of the other plugin as a new thread with the tag of the plugin, too.

  10. scythe000
    Member
    Posted 2 years ago #

    Thank you so much, sir!
    Sorry, I'm not much talented at PHP editing yet :-).

  11. scythe000
    Member
    Posted 2 years ago #

    I can confirm, the problem is fixed!!!

  12. ntm
    Member
    Posted 2 years ago #

    Sorry, I'm not much talented at PHP editing yet

    No problem! (I meant earlier that you could have deactivated temporarily the plugins in your blog one by one, too. No PHP editing necessary).

    But if you want to edit one more file then edit line 463 of the wordpress-popular-posts.php file:
    old:

    wp_print_scripts('jquery');

    new:

    wp_enqueue_script('jquery');

    It will solve the problem and you can use all plugins.

    wp_enqueue_script is the saver way to add jQuery to the <head> section.

    http://wordpress.org/support/topic/wp_print_scripts-jquery-function-above-jquery-src

    http://codex.wordpress.org/Function_Reference/wp_enqueue_script

  13. scythe000
    Member
    Posted 2 years ago #

    You are a king, sir!
    Worked perfectly. +1 internets to you.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic