WordPress.org

Ready to get started?Download WordPress

Forums

Front-end Editor
[resolved] Warning: Missing argument 2 for FEE_Field_Widget_Text::wrap() (12 posts)

  1. BAC
    Member
    Posted 2 years ago #

    FEE 2.2
    WP 3.2.1 (Multisite)

    I use the section widget plugin to manage sidebar jQuery UI tabs.

    I see the following error above each instance of the section widget in the sidebar, when logged in as Admin and FEE is active,

    Warning: Missing argument 2 for FEE_Field_Widget_Text::wrap() in /.../.../public_html/wp-content/plugins/front-end-editor/php/fields/widget.php on line 101

    here is a screen cap if it helps: http://goo.gl/vUwSq

    if you would like me to test this out or give you admin rights to debug - just let me know.

    Cheers
    Ben

  2. scribu
    Member
    Plugin Author

    Posted 2 years ago #

    You're referring to this one, right: http://wordpress.org/extend/plugins/section-widget/

    That means that the Section Widget plugin is not passing all the required arguments to the 'widget_title' and/or 'widget_text' filters.

    I suggest you look for an alternative to Section Widget, as it seems to be abandoned.

  3. BAC
    Member
    Posted 2 years ago #

    Dear Scribu,

    Thank you for the timely response.

    > Section Widget? - Yes that is the correct plugin. I am aware that the plugin had been abandoned and that I need to replace it soon - Unfortunately this is a very daunting task, as I have *a*great*deal* of logic and content mixed in it :( Guess I will have to face up to it sooner or later.

    Until I find the time to swap it out and learn how to code new a new UI tabs widget, I think I'll have to downgrade to the previous version of FEE, which did not output errors, unless of course there is a very easy way indeed to suppress the warnings for the time being? Had a v. q. crack but ended up wrecking the plugin.

    Thanks again Scribu - your plugin is easily one of my users' favourite. Thank you for the time and effort spent to release and support this plugin.

    Yours,
    Ben

  4. johnny_n
    Member
    Posted 2 years ago #

    I'm getting this same error... pretty sure it's on two different sites I administer.

    I think on one site it's Events Calendar Pro plugin -- on this site it appears on the front end. I'll have to investigate to find out what plugin it is on the other one...

    I'll probably downgrade FEE as well, much easier and it worked well.

    Thanks!

  5. scribu
    Member
    Plugin Author

    Posted 2 years ago #

    The development version (2.2-alpha) contains a fix that will prevent warnings caused by older widgets.

  6. Paul de Wouters
    Human Made
    Posted 2 years ago #

    having the same error with the Image widget plugin. I will notify the plugin author

  7. BAC
    Member
    Posted 2 years ago #

    big up Scribu! Seriously.. thanks!
    B

  8. jivyb
    Member
    Posted 2 years ago #

    I made my own widget areas and I'm getting this error from FEE. To make the widget areas, I just defined the widget areas in my functions.php file and then added the template code to where I want them in the home page.

    Are there instructions anywhere on how to fix the widgets? What else should I do if that's now out of date?

  9. scribu
    Member
    Plugin Author

    Posted 2 years ago #

    @jivyb: please post your widget code: http://pastebin.com/

  10. jivyb
    Member
    Posted 2 years ago #

    THanks, Scribu--It's here: http://pastebin.com/F8NZ7Am6

  11. scribu
    Member
    Plugin Author

    Posted 2 years ago #

    Oh, right. I thought you were making a custom widget.

    As I said above, the easiest solution is to simply download the development version.

  12. writeclick
    Member
    Posted 2 years ago #

    I was able to fix this error by removing the $instance argument from the function on line 101 of front-end-editor/php/fields/widget.php.

    The new version looks like this:

    function wrap( $content, $id_base = null ) {
    	// Only target text widgets
    	if ( 'title' == $this->field && 'text' != $id_base )
    		return $content;
    
    	if ( 'text' == $this->field )
    		$content = $this->placehold($content);
    
    	return FEE_Field_Base::wrap( $content, array() );
    }

    Hopefully this helps out a few people. No warranty or guarantees this won't break something else, but so far, so good on several of my installs. For what it's worth, the $instance parameter of the wrap function above doesn't seem to be used in the function, so I'm not sure why it's there anyway.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic