• Resolved zimbo000

    (@zimbo000)


    I have just updated the plugin to 4.1.13.2 and now when doing an ‘Edit Your Listing’, when I click ‘Continue’ after ‘2 – Listing Images’, the ‘3 – Submission Received’ page is displayed with this PHP Warning at the top of the page, shown twice.

    Warning: mysqli_real_escape_string() expects parameter 2 to be string, array given in /www/sites/fd7/491/dev.henleyherald.com/web/wp-includes/wp-db.php on line 1171

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Business Directory Plugin

    (@businessdirectoryplugin)

    Hi @zimbo000,

    Sorry that you ran into issues here! That issue doesn’t look like it’s coming directly out of BD from the path I see above…so it would help to know a bit more…

    Can you tell me a bit more?
    – What version of WP are you running here?
    – What exact version of BD? (number, please)
    – What version of PHP do you have? We support 5.3 and higher. You can see that under Directory Admin->Debug.
    – Are you running WP-PageNavi?
    – If NOT, can you install it and see if that fixes the issue? We integrate with it quite well…
    – Have you tried a conflict test yet? Here is an article about how to test for theme and plugin conflicts with Business Directory, which may help pinpoint the issue: http://businessdirectoryplugin.com/support-forum/faq/how-to-check-for-plugin-and-theme-conflicts-with-bd/

    Please let me know.

    Thread Starter zimbo000

    (@zimbo000)

    It is a plugin conflict with WordPress Mail Queue, WPMQ, https://semperplugins.com/wordpress-mail-queue-wpmq/

    The problem is that we are a news website and send out a daily news digest email to our subscribers. WPMQ queues up the emails and sends them out in batches of 80 so as to get around the email sending limits of our hosting service. In other words we cannot do without WPMQ.

    WPMQ appears quite simple, it’s one PHP file of 768 lines. The version we are running hasn’t been updated in 2 years. The site giving the BD error is an off-line development site and for various reasons I hadn’t updated BD for quite a while, so I went from a late v3 version, which was OK, to 4.1.13.2 a couple of days ago, and in testing the new BD came across this error.

    I’d be happy to send you the WPMQ file if you can take a look as to what might be causing the conflict with BD, so I could modify WPMQ or you could alter the BD code.

    • This reply was modified 8 years, 12 months ago by zimbo000.
    Plugin Author Business Directory Plugin

    (@businessdirectoryplugin)

    Hi @zimbo000,

    If you’re seeing this issue with their plugin active, given the output I see above, it doesn’t seem to be related to Business Directory Plugin in any way (you’ll notice that this error file: /www/sites/fd7/491/dev.henleyherald.com/web/wp-includes/wp-db.php Does not include “business-directory-plugin” in the output, which would indicate our files were at fault), other than the fact that we send mail using the wp_mail() interface, which many plugins do.

    If they haven’t updated in over 2 years, that may be part of the problem.

    I would recommend contacting them for support. Since BD works by itself with a default theme and no other plugins running, the problem lies elsewhere.

    Thread Starter zimbo000

    (@zimbo000)

    But I only get this error when using BD to Edit a listing and it seems to occur when you send an email (I’m guessing) when you load the Submission Received page. I do not see this problem at any other time.

    However… the plot thickens.

    WPMQ has a settings page with one option as follows.

    Which emails should be added to the queue: 
    [Only Subscribe2 post notifications]  
    [All emails generated through WordPress]

    There’s a tick box by each and you select one or the other. Subscribe2 is the plugin that controls subscription management and the email notification system. I think it was written by the same guy who wrote WPMQ.

    On the live news site I had the ‘Only Subscribe2’ option ticked but for some reason on the dev site I had ‘All emails’ ticked. When I changed this just now to ‘Only Subscribe2’… the PHP Warning is no longer given when I Edit a BD listing on the dev site. All is OK.

    I’m not sure what this means for your plugin but as far as I’m concerned all is OK now. But if you want to investigate further as to how WPMQ is interfering with BD (or whatever) my offer stands to send you their source code. Their website says “WPMQ extends the default WordPress wp_mail() function” and the description in the code says “Plugs wp_mail() to use a queuing system in the database” so maybe they are doing something they shouldn’t to wp_mail() that is affecting BD.

    • This reply was modified 8 years, 12 months ago by zimbo000.
    • This reply was modified 8 years, 12 months ago by zimbo000.
Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘PHP Warning on Edit Your Listing’ is closed to new replies.