Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

hillak on "custom plugin producing 'dead' content in some browsers"

$
0
0

I've searched until I'm blue and tried everything I can think of. Problem: I can display a form and the footer w/link but they don't work in ff or chrome. Works in IE. Form comes from a custom plugin with classes -just getting started (new to wp but not php). The plugin is activated and the relevant portion looks like this:

class MyClass
{
    // the class constructor

    public function __construct()
    	{
                //left from another failed attempt in case I end up back here...
                //add_filter( 'abo_listings',array( $this, 'init' ) );
	}

	public static function init()
	{
	    if (isset($_POST['submitted']))
	    	{
		self::callfunctiontodealwithdata($_POST);
		}
	    else
	    	{
		    require_once('views/myformview.php');
		    $content = myForm::render();
		    return $content;
		    }
	}//end init
}//end class

if (!is_admin())
{$new = new MyClass;
}

myForm::render() returns the html markup for the form. I've tried packaging the markup in multiple ways (ob_start/clean for ex) but same result.
A custom theme page template (listings) has this code:

$content = MyClass::init();
                 echo $content;

I've also tried apply_filter hook (hence commented out constructor code) here but same result: dead form and footer link in ff and chrome.

I think it is a wp issue since a/the footer link is dead too and b/ if I put the init() code in the constructor, it generates a working form in all browsers. However it displays the form before the page loads.

BTW I've tested the form markup and validated it for html5. Anyway I pared it down to a simple 2 element form with no divs, no footer and same result. Any suggestions would be appreciated as I'm hours on this with no progress... Again, form works and access to all classes work (see results in IE of all things...)
Temporary link : http://www.corridorwest.com/wp/lisings/
Thanks for looking!


Viewing all articles
Browse latest Browse all 8245

Trending Articles