Add Media button not working WP 4.2.2

Support Area Forums Foundation Add Media button not working WP 4.2.2

Viewing 4 posts - 1 through 4 (of 4 total)
URL to the page in question: http://apoyomexico.com
  • Author
    Posts
  • #31434
    Dale Eby
    Participant

    Hello Bill,

    I am in the process of fixing a website I built a few years ago for a non profit.
    It has gone through several different persons who updated it.

    The site is has foundation theme 3.17 and wordpress 4.2.2.

    The problem is the add media button is not working. I believe the problem was with WPML.

    I found this to be quite a common problem. I checked WPML website and found this as a suggested solution to be added into the functions.php

    ##

    function icl_load_jquery_ui() {
    wp_enqueue_script( ‘jquery-ui-dialog’, false, array(‘jquery’), false, true );
    }

    add_action( ‘admin_enqueue_scripts’, ‘icl_load_jquery_ui’ );

    ##

    I added this into the functions.php and the site went off line. It was easy enough to replace the file with a back up.

    Is there something here that you feel may be causing the problem? I really do not want to have to upgrade. It was just quick fix I was hoping for.

    Thank you

    #31437
    Bill Robbins
    Moderator

    Good Morning Dale,

    It sounds like adding that function in created a PHP error. Nothing leaps out there to me as not being workable. One thing to check is that all the quotes are single, straight quotes. Curly quotes are as different in PHP as the letter “l” is from “2” and they are often replaced while copying and pasting.

    You might try a simple version of the function like this:

    
    function dale_scripts() {
    
    	wp_enqueue_script( 'jquery-ui-dialog' );
    
    }
    add_action( 'admin_enqueue_scripts', 'dale_scripts' );
    

    and see if it works. The admin will already have jQuery loaded so we don’t really have to list it as a dependency.

    Let me know how it goes.

    Take care,
    Bill

    #31439
    Dale Eby
    Participant

    Good Afternoon Bill,

    Thank you for your response and the modified code you included.

    I tried the code you sent, and the good news is the site did not crash.
    I also tried the other code I sent in the prior post.

    Neither worked.

    Have you seen this problem before? It seems to be know with WPML as that is where
    I found the snippet of code to try.

    Would you have any other suggestions? I have been researching and nothing seems to stand out.

    Thank you

    #31440
    Bill Robbins
    Moderator

    Dale,

    While I’m glad that didn’t crash your site, I’m sorry it didn’t work either. Occasionally I have seen the media pop up stop working over the years. It’s javascript powered so when it stops that typically means there is a conflict someplace. There are a couple of things you can try.

    1. Clear out your browser’s cache and then refresh the edit page screen in your admin. Often times with a WordPress update there are new files loaded, or new versions of existing ones. Usually there is a version number applied to the file, but every now and again, the old file will be used instead of the new one by a browser. If it is, clearing the browser’s cache will fix it.

    2. I’ve also seen a few instances where reinstalling the current version of WordPress worked to fix this. Go to the updates spot in your dashboard. At the top there is a spot where you can reinstall the current WordPress version. After you do that, clear out the cache and refresh the page.

    I’ve seen both of those fix this issue before, though their combined success rate is probably only around 20%.

    Next up would be checking plugins. Since you think it might be WPML, try disabling it for a minute and see if the issue improves. If it doesn’t, then disable the others and see what happens. If it still won’t go, then switch the the TwentyFifteen theme and see what happens there.

    Let me know what you turn up,
    Bill

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Add Media button not working WP 4.2.2’ is closed to new replies.