WordPress.org

Ready to get started?Download WordPress

Forums

GD bbPress Attachments
[resolved] undefined function d4p_bbpress_version() (14 posts)

  1. graphicgeek
    Member
    Posted 1 year ago #

    I installed the plugin, and it seems to work on the front end, but I cannot access the settings. When I go to the settings page I get this:

    Fatal error: Call to undefined function d4p_bbpress_version() in .../wp-content/plugins/gd-bbpress-attachments/code/shared.php on line 24

    I've tried deleting and reinstalling, but no luck.
    Any ideas?

    http://wordpress.org/extend/plugins/gd-bbpress-attachments/

  2. ricardocorbetta
    Member
    Posted 1 year ago #

    The same happen to me. Anyone have another alternative?

  3. lykos
    Member
    Posted 1 year ago #

    I am experiencing the exact same issue and suspect it may have to do with WordPress 3.5? Just a hunch.

  4. ThemeCatcher
    Member
    Posted 1 year ago #

    Add this code to an empty line in the file gd-bbpress-attachments/code/shared.php

    if (!function_exists('d4p_bbpress_version')) {
        /**
         * Get version of the bbPress.
         *
         * @param string $ret what version format to return: code or version
         * @return mixed version value
        */
        function d4p_bbpress_version($ret = 'code') {
            if (function_exists('bbpress')) {
                $bbp = bbpress();
            } else {
                global $bbp;
            }
    
            if (isset($bbp->version)) {
                if ($ret == 'code') {
                    return substr(str_replace('.', '', $bbp->version), 0, 2);
                } else {
                    return $bbp->version;
                }
            }
    
            return null;
        }
    }
  5. chetan0412
    Member
    Posted 1 year ago #

    heeyyyy

    thanks ThemeCatcher

    now its working....

  6. kraigg
    Member
    Posted 1 year ago #

    I've added the code above to the /code/share.php file, but now I receive the following error:
    "Fatal error: Call to undefined function d4p_bbpress_get_user_roles() in .../wp-content/plugins/gd-bbpress-attachments/code/admin.php on line 128."

    I'm still not able to get into the settings page. Is there a way to fix this?

  7. Casyi
    Member
    Posted 1 year ago #

    I'm getting the same error as the user above. Please help us out? I'd like to use this plugin.

  8. Christopher Harris
    Member
    Posted 1 year ago #

    @themecatcher

    Thanks. I was having the same problem and your code saved the day!

  9. Kevin Ryman
    Member
    Posted 1 year ago #

    @ThemeCatcher

    Thanks for the quick fix, it works for me!

  10. Maruti Mohanty
    Member
    Posted 1 year ago #

    I too now get the fatal error PHP Fatal error: Call to undefined function bbp_get_dynamic_roles() in .../wp-content/plugins/gd-bbpress-attachments/code/shared.php on line 57

    and the reason is the function bbp_get_dynamic_roles() is missing from the GD bbPress Attachments plugin..

    Any Help will be highly appreciated.

  11. Milan Petrovic
    Member
    Plugin Author

    Posted 1 year ago #

    Fixed all now. Sorry for the problem.

  12. Kevin Ryman
    Member
    Posted 1 year ago #

    Thank you, Milan! I just updated the plugin on my site, I appreciate it!

  13. kraigg
    Member
    Posted 1 year ago #

    Thank you Milan, the new update has fixed the problem!

  14. Maruti Mohanty
    Member
    Posted 1 year ago #

    Thanks @Milan it worked :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic