WordPress.org

Forums

Root Relative URLs
Error with wp_mail function (4 posts)

  1. TimBHowe
    Member
    Posted 2 years ago #

    Hello,
    I love the plugin. It is a huge time saver but I'm getting an error.

    extract() expects parameter 1 to be array, null given in /wp-includes/pluggable.php on line 216

    This error occurs when gravity forms tries to send an email through the WordPress wp_mail function. This didn't cause an issue with saving the form submission just sending it. I deactivated the Root Relative URLs plugin resolved the issue but I do want to continue using the plugin.

    To fix the issue and keep the plug in active I commented out the following on line 258 of sb_root_relative_urls.php
    'wp_mail'
    This also fixed the issue.

    Sorry I can't offer more help but I just wanted to alert you to the issue so it can be fixed in future releases.

    Thanks
    Tim

    http://wordpress.org/extend/plugins/root-relative-urls/

  2. andyadams
    Member
    Posted 1 year ago #

    I just wanted to follow up to say 'me too'. The hook 'enable_content_massage' on 'wp_mail' turns the array passed to other functions filtering wp_mail to NULL, when it should include all of the info about the just-sent email. I haven't delved into why this happens, but I've also had to remove the filter to make other plugins work.

    Let me know if you have any questions!

  3. Joshua Ray
    Member
    Posted 1 year ago #

    Had to make the above edit also to fix gravity forms submission issues.

  4. tomas.kuba
    Member
    Posted 1 year ago #

    I had a similar problem with WP e-commerce plugin and have found the cause - the funcion "enable_content_massage" is added as a filter and therefore it should return the passing argument but it does not.

    Open sb_root_relative_urls.php, find this:

    static function enable_content_massage() {
            //this is only called when an external feed is being called
            //this lets the content filter know that we should convert root relative urls back in to absolute urls since
            //some external sources don't understand the html spec
            self::$massage = true;
    
            //massage global post object
            global $post;
            $post->post_content = self::massage_external_content($post->post_content);
            $post->post_excerpt= self::massage_external_content($post->post_excerpt);
        }

    and change it to this:

    static function enable_content_massage($myarg) {
            //this is only called when an external feed is being called
            //this lets the content filter know that we should convert root relative urls back in to absolute urls since
            //some external sources don't understand the html spec
            self::$massage = true;
    
            //massage global post object
            global $post;
            $post->post_content = self::massage_external_content($post->post_content);
            $post->post_excerpt= self::massage_external_content($post->post_excerpt);
            return $myarg;
        }

    i.e. add a $myarg argument to the function header and return it in the end. This should do the trick.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Root Relative URLs
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic