WordPress.org

Ready to get started?Download WordPress

Forums

Business Directory Plugin
[resolved] Get "error" after posting new listing (14 posts)

  1. paulbrett
    Member
    Posted 2 years ago #

    Has anyone seen the following error? I just downloaded this and can't get it working.

    Fatal error: Cannot redeclare _wpbdp_is_fee_selected() (previously declared in /home/content/62/9094962/html/wp-content/plugins/business-directory-plugin/templates/listing-form-fees.tpl.php:2) in /home/content/62/9094962/html/wp-content/plugins/business-directory-plugin/templates/listing-form-fees.tpl.php on line 5

    http://joaniebaby.com

    http://wordpress.org/extend/plugins/business-directory-plugin/

  2. businessdirectoryplugin
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Paul,

    Can you tell me what you were doing when you got that error? Do you have the plugin installed in Plugins more than once?

    Have you modified the templates at all?

  3. PhillipDyhrHobbs
    Member
    Posted 2 years ago #

    I am getting the same thing:
    http://www.your-virtual-ninja.dk/phill/2012-06-30_1707.swf

    Plugin installed once
    trying to add a listing as admin (and also tried as subscriber)

  4. @PhillipDyhrHobbs1, you may want to post a new topic as this one is marked resolved already. Those often get overlooked.

    http://wordpress.org/support/plugin/business-directory-plugin#postform

    Nice swf by the way, it really helps demonstrate the problem concisely. ;)

  5. businessdirectoryplugin
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Phillip,

    Thanks for that awesome demonstration! I wish all posters gave me so much to work with. :)

    I will make sure this is in the fix coming out early this week.

  6. PhillipDyhrHobbs
    Member
    Posted 2 years ago #

    Thanks guys :)
    I work daily with the web so understand how important it is that you can SEE what my issue is.
    I have a deadline on friday,
    Will it be fixed by then?
    Thanks mate!

  7. businessdirectoryplugin
    Member
    Plugin Author

    Posted 2 years ago #

    My developer is out of town until today, so it won't be ready then. We will have it available very shortly though.

  8. PhillipDyhrHobbs
    Member
    Posted 2 years ago #

    Maybe this is connected?
    http://staerk-reklamebureau.dk/jing/2012-07-14_1105.swf

    How soon could your developer help?
    I am happy to pay a small amount

  9. businessdirectoryplugin
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Phillip,

    It appears that my developer fixed it and it should be in 2.0.5 which was made public the first week of July (approx 11 days ago). What version are you running?

  10. PhillipDyhrHobbs
    Member
    Posted 2 years ago #

  11. businessdirectoryplugin
    Member
    Plugin Author

    Posted 2 years ago #

    Two other questions:

    - Have you modified BD at all?
    - Are you using the templates and overriding them inside of your theme? If so, you need to get the latest copy of the listing-form-fees.tpl.php and use that instead (or at least, move the code that checks to see if the function is already defined into your template)

    At the top of my file right now, I see this:

    <?php
    if (!function_exists('_wpbdp_is_fee_selected')) {
    	function _wpbdp_is_fee_selected($category, $feeid) {
    		$fees = isset($_POST['fees']) ? $_POST['fees'] : array();
    		return wpbdp_getv($fees, $category) == $feeid;
    	}
    }
    ?>

    Do you see that in your file? Perhaps I am mistaken whether it made it out or not in 2.0.5. The date looked OK to me, but I may be wrong. That code above should fix the issue.

  12. PhillipDyhrHobbs
    Member
    Posted 2 years ago #

    Actually I have this:

    <?php
    function _wpbdp_is_fee_selected($category, $feeid) {
    	$fees = isset($_POST['fees']) ? $_POST['fees'] : array();
    	return wpbdp_getv($fees, $category) == $feeid;
    }
    ?>

    It now works PERFECT thanks to your Great code!
    Thankyou so much!

  13. businessdirectoryplugin
    Member
    Plugin Author

    Posted 2 years ago #

    Glad to hear it's working now. :)

  14. PhillipDyhrHobbs
    Member
    Posted 2 years ago #

    Thankyou :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.