WordPress.org

Ready to get started?Download WordPress

Forums

podPress
Add media button not responsive (5 posts)

  1. Intracommunities Inc
    Member
    Posted 3 years ago #

    I just upgraded to podpress Version 8.8.10.8 and WordPress 3.2

    The "add media" button on my post add/edit page appears to be broken. It does not respond when clicked. There is no trouble when uploading to other modules and upload systems in this blog installation.

    Checking on paths and URLS, the usual suspects... all normal, pointed to the right places for uploads to go, and downloads to be found.

    Logs and other server documents turned up no real error, but...

    When looked at in a DOM inspector, the problem is quite clear :
    The error appears to be in the javascript in the page.

    post.php:807ReferenceError: Can't find variable: podPressGenerateVideoPreview
    post.php:970ReferenceError: Can't find variable: podPressGenerateVideoPreview
    post.php:1133ReferenceError: Can't find variable: podPressGenerateVideoPreview
    post.php:1296ReferenceError: Can't find variable: podPressGenerateVideoPreview
    post.php:1459ReferenceError: Can't find variable: podPressGenerateVideoPreview
    post.php:1661ReferenceError: Can't find variable: podPressDisplayMediaFiles

    The first 5 errors happen on page load (onload), while the last error, 'podPressDisplayMediaFiles' happens whenever the button is clicked.

    Any idea why Podpress would have this problem?

    http://wordpress.org/extend/plugins/podpress/

  2. ntm
    Member
    Plugin Author

    Posted 3 years ago #

    Thank you for your diligent report.

    A click on this button makes usually the input fields visible which may use to insert and retrieve the data related to a media file.
    This action is based on Javascript only.

    The error messages say that one function from the podpress.js and one function of the podpress_admin.js file is not available. You should find reference to both files in the header ( <head> - in the source code) of the page with the with post editor.
    If there are lines like

    <script type='text/javascript' src='http://www.example.com/wp-content/plugins/podpress/js/podpress.js?ver=3.2'></script>

    then control whether these file exist at this location and whether the permission for these file are right (0644 should be sufficient).

    I can only speculate about the reason for this problem. It is definitely no general problem of this podPress version. one likely cause may be an incomplete upgrade (or installation). But that are only speculation.

    Regards,
    Tim

  3. Intracommunities Inc
    Member
    Posted 3 years ago #

    As you say, those JS calls should be initialized with a plug-in call in the header.

    The script tag you've placed above is what I was looking for too. It is not on the post/add/edit page at all, in the source.

    I've de-insatlled and then re-installed podpress, to no real change.

    The post/add/edit page does not have the script tag and therefore the JS is failing.

    As deinstall and then install had no bearing on this, is there another procedure to test if podpress is missing something?

    Jeremy

  4. Intracommunities Inc
    Member
    Posted 3 years ago #

    SOLVED

    Thank you for the hint.

    Looking at the podpress.php code, I noticed the following line, which convinced me that wordpress was not seeing the environment correctly. One look at the php5.cgi wrapper script told me that I was not exporting environment variables around PHP correctly.

    607       $page_with_podPress = Array('post.php', 'page.php', 'post-new.php', 'page-new.php', 'categories.php', 'admin.php', 'edit-tags.php');
    608       if ( in_array($pagenow, $page_with_podPress) ) {

    It was clear at this point that the $pagenow scalar was not correct, but instead reading the location of my wrapper script!

    If using wordpress in cgi wrappermode, please make sure you have the following code above the execute call in your wrapper script :

    SCRIPT_FILENAME=$PATH_TRANSLATED
    PHP_SELF=$REQUEST_URI
    SCRIPT_NAME=$REQUEST_URI
    export SCRIPT_FILENAME
    export PHP_SELF
    export SCRIPT_NAME

  5. ntm
    Member
    Plugin Author

    Posted 3 years ago #

    Jeremy,

    thank you for all your efforts and for sharing your solution in this forum.
    I'm no expert in server configuration and I have no experience with this CGI mode. I would not have guessed that cause nor the solution.

    Thanks again,
    Tim

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags