• If you find yourself getting errors like this:

    Notice: Undefined variable: type_attribute in /wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement-js-wp.php on line 428

    Then you may find this solution works for you as it did for me, including partial fix from old post. Put this code before line 346 in file mediaelement-js-wp.php

    <br/>
    	// all of the $*_source vars need to be initialized with null.<br />
    	// reference: https://www.ads-software.com/support/topic/undefined-variable-notices-after-update<br />
    	// Ron 1/26/2015<br />
    		$type_attribute<br />
    		= $poster_attribute<br />
    		= $autoplay_attribute<br />
    		= $mediahtml<br />
    		= $loop_option<br />
    		= $mp4_source<br />
    		= $mp3_source<br />
    		= $webm_source<br />
    		= $flv_source<br />
    		= $wmv_source<br />
    		= $ogg_source<br />
    		= $captions_source<br />
    		= $width_attribute<br />
    		= $height_attribute<br />
    		= null;<br />

    https://www.ads-software.com/plugins/media-element-html5-video-and-audio-player/

Viewing 1 replies (of 1 total)
  • Thread Starter Ron Fredericks

    (@ronf)

    Using WordPress 4.1 and the bundled theme twentyten, the fix described here was not necessary.

    But the was needed when I used the Avada theme 3.7.1. In fact other plugins including Jetpack and my own theme wpmathpub don’t work either on Avada theme. But I suspect by “Don’t Work” I mean there is some sort of initialization taken for granted in code that needs to be nailed down more correctly when using an advanced theme like Avada.

Viewing 1 replies (of 1 total)
  • The topic ‘many undefined variables after installation and first use’ is closed to new replies.